View Issue Details

IDProjectCategoryView StatusLast Update
0003468Slicer4Core: CLI infrastructurepublic2018-03-02 11:06
Reporterlassoan Assigned Tomillerjv  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.3.0 
Target VersionSlicer 4.5.0-1Fixed in VersionSlicer 4.5.0-1 
Summary0003468: CLI input and output node selection is not restored during scene load
Description

The selected input and output nodes of a CLI module is saved correctly in the scene, however when the scene is loaded, this information is lost.

How to reproduce

  • Start slicer, load the MRHead, CTChest, CTACardio samples
  • Open the CheckerBoard filter module
  • Choose input/output nodes:
    Input volume 1: MRHead
    Input volume 2: CTChest
    ** Output volume: CTACardio
  • Save the scene
  • Restart Slicer
  • Open the CheckerBoard filter module, the following nodes are selected
    Input volume 1: MRHead
    Input volume 2: MRHead - wrong!
    ** Output volume: MRHead - wrong!
TagsNo tags attached.

Relationships

related to 0004090 closedlassoan input/output parameter set up issue 

Activities

lassoan

lassoan

2013-10-29 13:41

developer   ~0010239

The issue seems to be caused by initializing the CLI GUI with a valid parameter node and an invalid scene. See details below.

  • MRMLCommandLineModuleNodeSelector->setMRMLScene is called, it finds a good node in the scene, so selects it
  • currentNodeChanged event, which calls
  • qSlicerCLIModuleWidget::setCurrentCommandLineModuleNode, which triggers
  • qMRMLNodeComboBox::setCurrentNodeID methods, but the scene is not set yet
  • qMRMLNodeComboBox::setScene

void qMRMLNodeComboBox::setCurrentNodeID(const QString& nodeID)

QModelIndexList indexes = d->indexesFromMRMLNodeID(nodeID);
if (indexes.size() == 0)
=> it shouldn’t be 0!!! – the index is empty somehow

The problem is that the MRMLscene is set after setupui?

qSlicerAbstractModuleRepresentation* qSlicerAbstractCoreModule::createNewWidgetRepresentation()
newWidgetRepresentation = this->createWidgetRepresentation();
...
newWidgetRepresentation->setModule(this);
...
newWidgetRepresentation->setMRMLScene(this->mrmlScene());

QWidget* qSlicerCLIModuleUIHelperPrivate::createImageTagWidget(const ModuleParameter& moduleParameter)
widget->setMRMLScene(this->CLIModuleWidget->mrmlScene()); <= scene is NULL

lassoan

lassoan

2015-09-17 05:57

developer   ~0013280

Fixed in https://github.com/Slicer/Slicer/commit/ed8673edd99afc9718d5e6f2198f7ed08f36cc9b

Issue History

Date Modified Username Field Change
2013-10-29 13:38 lassoan New Issue
2013-10-29 13:38 lassoan Status new => assigned
2013-10-29 13:38 lassoan Assigned To => millerjv
2013-10-29 13:41 lassoan Note Added: 0010239
2015-09-17 05:57 lassoan Note Added: 0013280
2015-09-17 05:57 lassoan Status assigned => resolved
2015-09-17 05:57 lassoan Resolution open => fixed
2015-09-17 12:51 jcfr Fixed in Version => Slicer 4.5.0-1
2015-09-17 12:51 jcfr Target Version => Slicer 4.5.0-1
2015-11-19 06:33 jcfr Relationship added related to 0004090
2018-03-02 11:06 jcfr Status resolved => closed