Commit 1fc756cf authored by Thomas Vincent's avatar Thomas Vincent

Remove some local/attribute duplicate

parent 0c53668e
......@@ -237,26 +237,26 @@ class QSpaceView(Qt.QMainWindow):
self.setWindowTitle('[XSOCS] {0}:{1}'.format(qspaceItem.filename,
qspaceItem.path))
self.__projectItem = item = qspaceItem
self.__projectItem = qspaceItem
self.__qspaceH5 = item.qspaceH5
self.__qspaceH5 = self.__projectItem.qspaceH5
self.__defaultIsoLevels = None
# plot window displaying the intensity map
self.__plotWindow = plotWindow = PlotIntensityMap(parent=self)
plotWindow.setToolTip('Intensity Map integrated on whole QSpaces')
plotWindow.setPointSelectionEnabled(True)
plotWindow.sigPointSelected.connect(self.__pointSelected)
self.__plotWindow = PlotIntensityMap(parent=self)
self.__plotWindow.setToolTip('Intensity Map integrated on whole QSpaces')
self.__plotWindow.setPointSelectionEnabled(True)
self.__plotWindow.sigPointSelected.connect(self.__pointSelected)
self.__roiPlotWindow = roiPlotWindow = ROIPlotIntensityMap(
parent=self, qspaceH5=item.qspaceH5)
roiPlotWindow.setPointSelectionEnabled(True)
roiPlotWindow.sigPointSelected.connect(self.__pointSelected)
self.__roiPlotWindow = ROIPlotIntensityMap(
parent=self, qspaceH5=self.__projectItem.qspaceH5)
self.__roiPlotWindow.setPointSelectionEnabled(True)
self.__roiPlotWindow.sigPointSelected.connect(self.__pointSelected)
self.__planePlotWindow = planePlotWindow = CutPlanePlotWindow(self)
self.__planePlotWindow = CutPlanePlotWindow(self)
with item.qspaceH5 as qspaceH5:
with self.__projectItem.qspaceH5 as qspaceH5:
sampleX = qspaceH5.sample_x
sampleY = qspaceH5.sample_y
self.__setPlotData(sampleX,
......@@ -305,7 +305,7 @@ class QSpaceView(Qt.QMainWindow):
sfTree.setSfView(self.__view3d)
# Register ROIPlotIntensity
self.__view3d.sigSelectedRegionChanged.connect(roiPlotWindow.roiChanged)
self.__view3d.sigSelectedRegionChanged.connect(self.__roiPlotWindow.roiChanged)
# Store the cut plane signals connection state
self.__connectedToCutPlane = True
......@@ -330,7 +330,7 @@ class QSpaceView(Qt.QMainWindow):
self.addDockWidget(Qt.Qt.RightDockWidgetArea, fitDock)
# widget that are to be disabled when the fit is running
self.__lockWidgets = lockWidgets = []
self.__lockWidgets = []
sfDock = Qt.QDockWidget()
sfDock.setWindowTitle('Isosurface options')
......@@ -338,31 +338,31 @@ class QSpaceView(Qt.QMainWindow):
features = sfDock.features() ^ Qt.QDockWidget.DockWidgetClosable
sfDock.setFeatures(features)
self.addDockWidget(Qt.Qt.LeftDockWidgetArea, sfDock)
lockWidgets.append(sfDock)
self.__lockWidgets.append(sfDock)
planePlotDock = Qt.QDockWidget('Cut Plane', self)
planePlotDock.setWidget(planePlotWindow)
planePlotDock.setWidget(self.__planePlotWindow)
features = planePlotDock.features() ^ Qt.QDockWidget.DockWidgetClosable
planePlotDock.setFeatures(features)
planePlotDock.visibilityChanged.connect(
self.__planePlotDockVisibilityChanged)
self.splitDockWidget(sfDock, planePlotDock, Qt.Qt.Vertical)
lockWidgets.append(planePlotDock)
self.__lockWidgets.append(planePlotDock)
roiPlotDock = Qt.QDockWidget('ROI Intensity', self)
roiPlotDock.setWidget(roiPlotWindow)
roiPlotDock.setWidget(self.__roiPlotWindow)
features = roiPlotDock.features() ^ Qt.QDockWidget.DockWidgetClosable
roiPlotDock.setFeatures(features)
self.splitDockWidget(sfDock, roiPlotDock, Qt.Qt.Vertical)
self.tabifyDockWidget(planePlotDock, roiPlotDock)
lockWidgets.append(roiPlotDock)
self.__lockWidgets.append(roiPlotDock)
plotDock = Qt.QDockWidget('Intensity', self)
plotDock.setWidget(plotWindow)
plotDock.setWidget(self.__plotWindow)
features = plotDock.features() ^ Qt.QDockWidget.DockWidgetClosable
plotDock.setFeatures(features)
self.tabifyDockWidget(roiPlotDock, plotDock)
lockWidgets.append(plotDock)
self.__lockWidgets.append(plotDock)
self.__showIsoView(firstX, firstY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment