Skip to content

Commit

Permalink
fix: correctly rescale intens from export to video dialogue
Browse files Browse the repository at this point in the history
  • Loading branch information
ElpadoCan committed Oct 16, 2024
1 parent a06e1e7 commit d32c6ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cellacdc/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13602,7 +13602,7 @@ def __init__(
if rescaleIntensHow is not None:
rescaleIntensCombobox.setCurrentText(rescaleIntensHow)
gridLayout.addWidget(rescaleIntensCombobox, row, 1)
rescaleIntensCombobox.currentTextChanged.connect(
rescaleIntensCombobox.textActivated.connect(
partial(self.emitRescaleIntens, channel=channel)
)

Expand Down
10 changes: 4 additions & 6 deletions cellacdc/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3373,7 +3373,7 @@ def rescaleIntensitiesLut(
triggeredByUser = True
if action is None:
triggeredByUser = False
action = self.imgGrad.rescaleActionGroup.checkedAction()
action = imageItem.lutItem.rescaleActionGroup.checkedAction()

posData = self.data[self.pos_i]
how = action.text()
Expand Down Expand Up @@ -3421,7 +3421,6 @@ def rescaleIntensitiesLut(
maximum_max_value=dtype_max,
parent=self
)
self.customLevelsImageItem = imageItem
win.sigLevelsChanged.connect(
partial(self.customLevelsLutChanged, imageItem=imageItem)
)
Expand Down Expand Up @@ -4379,6 +4378,7 @@ def gui_createPlotItems(self):
)
)
self.imgGrad.setImageItem(self.img1)
self.img1.lutItem = self.imgGrad
self.imgGrad.sigRescaleIntes.connect(self.rescaleIntensitiesLut)
self.ax1.addItem(self.img1)

Expand Down Expand Up @@ -13282,10 +13282,7 @@ def keyPressEvent(self, ev):
return

if ev.key() == Qt.Key_Q and self.debug:
# from . import _debug
# _debug._debug_lineage_tree(self)

self.rescaleIntensExportToVideoDialog('Choose custom levels...')
...

if not self.isDataLoaded:
self.logger.info(
Expand Down Expand Up @@ -26185,6 +26182,7 @@ def getOverlayItems(self, channelName):
lutItem = widgets.myHistogramLUTitem(
parent=self, name='image', axisLabel=channelName
)
imageItem.lutItem = lutItem

lutItem.removeAddScaleBarAction()
lutItem.removeAddTimestampAction()
Expand Down

0 comments on commit d32c6ea

Please sign in to comment.