@@ -34,7 +34,7 @@ def _buildGUI(self):
3434 # listOfChannelIdx = self.stackWidget.getStack().getChannelKeys()
3535 self ._listOfChannelIdx = self .stackWidget .getStack ().getChannelKeys ()
3636 # self._listOfChannelIdx = listOfChannelIdx
37- dictOfChannelNames = self .stackWidget .getStack ().getChannelNameDict ()
37+ # dictOfChannelNames = self.stackWidget.getStack().getChannelNameDict()
3838
3939 _shapeDict = self .getStack ().getMetadata ().shapeDict
4040 zSlice = _shapeDict ['z' ]
@@ -63,11 +63,12 @@ def _buildGUI(self):
6363 if 1 :
6464 # logger.info(f"channel index in loop {channelKey}")
6565 self .totalChannelsShown += 1
66- try :
67- channelPath = dictOfChannelNames [channelKey ]
68- except :
69- logger .error (f'xxx abb missing `dictOfChannelPaths`' )
70- channelPath = "xxx"
66+
67+ # try:
68+ # channelPath = dictOfChannelNames[channelKey]
69+ # except:
70+ # logger.error(f'xxx abb missing `dictOfChannelPaths`')
71+ # channelPath = "xxx"
7172
7273 # abb actualIndex and channelRowNum are redundant -> removed
7374 # Offset by 1, channel idx being 0 based
@@ -83,9 +84,13 @@ def _buildGUI(self):
8384 # Diplaying channel as seen in the row rather than actual index in backend
8485 self .gridLayout .addWidget (QtWidgets .QLabel (str (self .totalChannelsShown )), self .totalChannelsShown , 0 )
8586
86- self .gridLayout .addWidget (DraggableWidget (channelPath , self .totalChannelsShown , 1 , self , name = "widget " +
87- str (channelKey ), stackWidget = self .stackWidget ,
88- channelIdx = channelKey ), self .totalChannelsShown , 1 )
87+ self .gridLayout .addWidget (DraggableWidget (str (channelKey ),
88+ self .totalChannelsShown , 1 ,
89+ self , name = "widget " +
90+ str (channelKey ),
91+ stackWidget = self .stackWidget ,
92+ channelIdx = channelKey ),
93+ self .totalChannelsShown , 1 )
8994
9095 # ), channelKey + 1, 1)
9196
@@ -97,13 +102,13 @@ def _buildGUI(self):
97102 activateBox .addItem ("Off" )
98103
99104 # get activate channel value from backend
100- timePoint = self .getStack ().timepoint
101- activatedChannels = self .getStack ().getTimeSeriesCore ().getActivatedChannels (t = timePoint )
105+ # timePoint = self.getStack().timepoint
106+ # activatedChannels = self.getStack().getTimeSeriesCore().getActivatedChannels(t=timePoint)
102107
103- if channelKey in activatedChannels :
104- activateBox .setCurrentText ("On" )
105- else :
106- activateBox .setCurrentText ("Off" )
108+ # if channelKey in activatedChannels:
109+ # activateBox.setCurrentText("On")
110+ # else:
111+ # activateBox.setCurrentText("Off")
107112
108113 self .gridLayout .addWidget (activateBox , self .totalChannelsShown , 2 )
109114 activateBox .currentTextChanged .connect (partial (self ._onActivate , channelKey ))
@@ -174,9 +179,9 @@ def importChannel(self, channelIdx, tifFile = None):
174179 logger .info (f"cancelling import" )
175180 return
176181
177- with Image .open (tifFile ) as img :
178- newImgWidth , newImgHeight = img .size
179- newImgSlices = img .n_frames # z dimension
182+ # with Image.open(tifFile) as img:
183+ # newImgWidth, newImgHeight = img.size
184+ # newImgSlices = img.n_frames # z dimension
180185
181186 # confirmed, selectedChannelIdx = \
182187 # self.showConfirmationDialog(fileDimensions=(newImgWidth,newImgHeight,newImgSlices))
@@ -326,7 +331,7 @@ def dropEvent(self, event):
326331 self .importChannel (self .channelIdx , tifFile )
327332
328333class DraggableWidget (QtWidgets .QWidget ):
329- def __init__ (self , text , row , column , parent = None , name = None ,
334+ def __init__ (self , text : str , row , column , parent = None , name = None ,
330335 stackWidget = None , channelIdx = None ):
331336
332337 """ Draggable widget
0 commit comments