Writing my first module.
When I use the DICOM widget to load an image set, and use a qMRMLNodeComboBox, the newly-loaded node is automatically displayed in the Red, Yellow, and Green MRML slice views. I’m hoping to override this action, so that the newly-loaded volume is only displayed in either (but only one of) the Red or Yellow view. How would I do that? Thanks.
Code is below:
def setup(self):
ScriptedLoadableModuleWidget.setup(self)
#Link to image database for SSFP
self.LoadSSFPButton = qt.QPushButton("Load SSFP Image Series")
self.LoadSSFPButton.toolTip = "Select the SSFP image series from the image database"
self.LoadSSFPButton.enabled = True
self.layout.addWidget(self.LoadSSFPButton)
# SSFP volume selector
self.SSFPSelector = slicer.qMRMLNodeComboBox()
self.SSFPSelector.nodeTypes = ["vtkMRMLScalarVolumeNode"]
self.SSFPSelector.selectNodeUponCreation = True
self.SSFPSelector.addEnabled = False
self.SSFPSelector.removeEnabled = False
self.SSFPSelector.noneEnabled = False
self.SSFPSelector.showHidden = False
self.SSFPSelector.showChildNodeTypes = False
self.SSFPSelector.setMRMLScene( slicer.mrmlScene )
self.addRow("SSFP Image Volume: ", self.SSFPSelector)
#Connections
self.LoadSSFPButton.connect('clicked()', self.loadImageSeriesClicked)
self.SSFPSelector.connect("currentNodeChanged(bool)", self.onSSFPSelect)
def loadImageSeriesClicked(self):
slicer.modules.dicom.widgetRepresentation()
slicer.modules.DICOMWidget.enter()