Skip to content

Commit

Permalink
change when to calculate pixel size
Browse files Browse the repository at this point in the history
  • Loading branch information
rifqiharrys committed Mar 15, 2021
1 parent 1fbee54 commit 654b796
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sdb_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@ def loadImageAction(self):
global bands_array
bands_array = bands_dummy.T

coord1 = np.array(image_raw.transform * (0, 0))
coord2 = np.array(image_raw.transform * (1, 1))

global pixel_size
pixel_size = abs(coord2 - coord1)

self.loadImageLabel.setText(
os.path.split(self.imglocList.toPlainText())[1]
)
Expand Down Expand Up @@ -986,6 +980,10 @@ def results(self, result_list):
time_diff = time_array[1:] - time_array[:-1]
runtime = np.append(time_diff, time_list[-1] - time_list[0])

coord1 = np.array(image_raw.transform * (0, 0))
coord2 = np.array(image_raw.transform * (1, 1))
pixel_size = abs(coord2 - coord1)

global print_result_info
print_result_info = (
'Image Input:\t\t' + self.imglocList.toPlainText() + ' (' +
Expand Down

0 comments on commit 654b796

Please sign in to comment.