Skip to content

Commit

Permalink
Fix bug where example ROI in invertcontrast would be placed outside i…
Browse files Browse the repository at this point in the history
…mage boundaries
  • Loading branch information
kspaceKelvin committed Feb 27, 2025
1 parent 384a971 commit 59ef109
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def read_close(self):
logging.info(" Total received acquisitions: %5d", self.recvAcqs)
logging.info(" Total received images: %5d", self.recvImages)
logging.info(" Total received waveforms: %5d", self.recvWaveforms)
logging.info("------------------------------------------")

if self.savedata is True:
if self.dset is None:
Expand Down
2 changes: 1 addition & 1 deletion invertcontrast.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def create_example_roi(img_size):
x = (x-np.min(x)) / (np.max(x) - np.min(x))
y = (y-np.min(y)) / (np.max(y) - np.min(y))
x = (x * 0.10*np.min(img_size[:2])) + (img_size[1]-0.2*np.min(img_size[:2]))
y = (y * 0.10*np.min(img_size[:2])) + (img_size[1]-0.2*np.min(img_size[:2]))
y = (y * 0.10*np.min(img_size[:2])) + (img_size[0]-0.2*np.min(img_size[:2]))

rgb = (1,0,0) # Red, green, blue color -- normalized to 1
thickness = 1 # Line thickness
Expand Down

0 comments on commit 59ef109

Please sign in to comment.