View Issue Details

IDProjectCategoryView StatusLast Update
0003462Slicer4Core: MRMLpublic2017-06-10 08:51
Reporterungi Assigned Tojcfr  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.7.0Fixed in Version 
Summary0003462: ModelMaker functionality breaks display of Slice views
Description

After the user opens OpenIGTLinkIF module, creating models with the ModelMaker messes with slice intersections, slice views in 3D, and some models are not generated.

This video shows the situation:
https://dl.dropboxusercontent.com/u/7771079/26-10-2013_ModelMakerBug.mp4

Tried it on nightly build 2013 Oct 25, and latest stable. Windows 64-bit.

How to reproduce:

  • Open OpenIGTLinkIF module.
  • Use Editor module to create labels 1 and 2.
  • Use ModelMaker module to create surface models for the two labels.
    After this, you will not be able to see the green and yellow slice intersections. They will show up as surface intersections around the labels. You will also not be able to show the coronal slice in the 3D viewer.
Additional Information

I could reproduce this bug with other modules that use qMRMLSceneModel-derived classes, including Annotations and Tractography Display.

In case of OpenIGTLinkIF, I could avoid this issue by removing line 113

d->SceneModel->setMRMLScene(scene);

in qMRMLIGTLConnectorTreeView::setMRMLScene(vtkMRMLScene* scene). This calls qMRMLSceneModel::setMRMLScene(scene).

TagsNo tags attached.

Relationships

related to 0002576 closednicole It would be good to have a way to turn off/on all models 
related to 0003803 closednicole Slice intersections for navigation don't work 
related to 0002906 closednicole Extra model hierarchy nodes showing up in Models module 
related to 0002849 assignedpinter Hierachy not respected when loading the same scene multiples times 
child of 0004081 assignedjcfr Ensure reference are updated before NodeAddedEvent is invoked 

Activities

ungi

ungi

2013-10-28 10:50

developer   ~0010233

Last edited: 2013-10-28 10:54

This bug is only reproducible when OpenIGTLinkIF is set as start-up module in the application settings/module settings.

lassoan

lassoan

2013-10-29 07:28

developer   ~0010234

Some more info:

It's not necessary to set the OpenIGTLinkIF module as startup module. It's enough if you just switch to the OpenIGTLinkIF module at any time, and after that if a model is generated the slices disappear from the 3D view.

If I skip the import of the MRML scene that the model maker generates, then the problem doesn't occur.

The implementation of MRML scene import from CLI results is very messy, so there may be some issues there. But probably the main culprit is the OpenIGTLinkIF module, as if it is not opened, then the issue doesn't occur.

tokuda

tokuda

2013-11-01 05:48

developer   ~0010248

Thanks for reporting. I could reproduce this with the latest build on Mac OS X (10.7).

tokuda

tokuda

2013-11-01 09:41

developer   ~0010249

I could not reproduce the problem, when I comment out the code inside qSlicerOpenIGTLinkIFModule::setMRMLScene(vtkMRMLScene* scene). I suspect that the bug is related to mrml event handlers in qSlicerOpenIGTLinkIFModule class.

lassoan

lassoan

2013-11-01 10:36

developer   ~0010250

I would suspect that the issue is not related to event handlers as they cannot really change classes. For me it seems more probably that the Qt MVC classes (qMRMLSceneModel-derived classes) have some problem, because these classes are only instantiated when the module GUI is created, they are able to modify the nodes, and they are very complex (therefore easy to make mistakes in the implementation).

tokuda

tokuda

2013-11-01 11:41

developer   ~0010251

That is possible. I tracked down my previous finding, and found that the qMRMLSceneModel::setMRMLScene(scene) call in qMRMLIGTLConnectorTreeView::setMRMLScene(vtkMRMLScene* scene) caused the issue.

tokuda

tokuda

2013-11-01 11:48

developer   ~0010252

I could reproduce the same bug with Annotations instead of OpenIGTLinkIF. Annotations also uses qMRMLSceneModel.

tokuda

tokuda

2013-11-01 11:53

developer   ~0010254

Tractography Display module also reproduced the bug.

ungi

ungi

2013-11-01 12:02

developer   ~0010255

Wow. I think it's time to notify the others on the slicer-devel list. Looks like we found an important bug.

tokuda

tokuda

2013-11-01 12:06

developer   ~0010256

I agree! I updated the category and assigned this issue to Jc.

jcfr

jcfr

2014-03-06 13:27

administrator   ~0011301

On Ubuntu 13.10, using a Debug build of Slicer r22924, I am not able to reproduce the issue following the same sequence as the video.

lassoan

lassoan

2014-03-06 18:24

developer   ~0011304

Unfortunately, the problem is still the same (just tried on the latest Win64 nightly build).

How to reproduce:

  • Start Slicer
  • Open the Annotations module (or open the OpenIGTLinkIF module, or probably other module with a GUI that has a scene model based widget)
  • Go to the Sample data module and download MRHead
  • Go to the Editor module and paint with 2 different labels
  • Go to the Model maker module and create models from the labelmap
  • Click the eye icon of the red slice in the 3D view => red slice appears in the 3D view
  • Click the eye icon of the yellow slice in the 3D view => ERROR: yellow slice does not appear in the 3D view
  • Click the eye icon of the green slice in the 3D view => ERROR: green slice does not appear in the 3D view
ungi

ungi

2014-03-07 07:55

developer   ~0011342

I confirm, the problem is still there with today's nightly.
What I didn't know at the time of reporting this issue was that it's not OpenIGTLinkIF specific. Annotations module does the same. Maybe the bug should be renamed.

There is only one thing I see different. With today's version, when I open/close the eye icon of the green slice, the green model does not change its color.

But the slice still cannot be visualized, the slice intersections are not visible, and there are those contours around the segmented areas in the red slice.

jcfr

jcfr

2014-05-27 09:47

administrator   ~0011962

Last edited: 2014-05-27 09:48

I confirm this an issue. I will be looking at this in the coming days.

Wonder if this is related to 0003707

lassoan

lassoan

2014-06-21 20:45

developer   ~0012088

The problem is still there with the latest nightly build

nicole

nicole

2014-07-29 15:14

administrator   ~0012286

Reproducible after updating the slice intersections code:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=23495

nicole

nicole

2014-07-31 07:29

administrator   ~0012317

Last edited: 2015-11-03 09:46

I can get to an error state (non updating slice intersections) with these steps:

  • start slicer
  • download sample data MRHead
  • enter Annotations or Markups or Models module
  • turn on Slice Intersections from Crosshairs drop down

If you move the slice offest slider, the slice intersections don't update. I toggled visibility on the yellow slice, it did show up and update the slice intersections on sliding, but the red and green sliders don't update slice intersections. Toggling the red and green slices visible updates the slice intersections in 2D and the slices do show up in 3D.

It might possibly be related to bug 0003783 in that the annotations or model hierarchy is over riding the slice model display settings?

jcfr

jcfr

2014-08-15 11:08

administrator   ~0012383

I am unable to reproduce the problem. Please, re-open if this is still a problem.

lassoan

lassoan

2014-08-15 11:37

developer   ~0012385

Unfortunately, the problem is still the same (just tried on the latest
Win64 nightly build).

How to reproduce:

  • Start Slicer
  • Open the Annotations module (or open the OpenIGTLinkIF module, or probably other module with a GUI that has a scene model based widget)
  • Go to the Sample data module and download MRHead
  • Go to the Editor module and paint with 2 different labels
  • Go to the Model maker module and create models from the labelmap
  • Click the eye icon of the red slice in the 3D view => red slice appears in the 3D view
  • Click the eye icon of the yellow slice in the 3D view => ERROR: yellow slice does not appear in the 3D view
  • Click the eye icon of the green slice in the 3D view => ERROR: green slice does not appear in the 3D view
lassoan

lassoan

2014-08-15 11:47

developer   ~0012386

If I skip the scene import step when model maker processing is finished then there is no issue.

If Annotation module is opened after the model making then there is no issue.

So, probably mini-scene import at the end of CLI execution and qMRMLSceneModel initialization has some interference. Both are large and complicated code, so it is not surprising, it's just very difficult to track down the issue.

jcfr

jcfr

2014-08-15 12:05

administrator   ~0012389

On windows 64-bit, downloading latest nightly (2014-08-15), I was using the default parameter for ModelMaker.

Here is a list of updated steps leading to the problem:

1) Start Slicer
2) Open the Annotations module
3) Go to the Sample data module and download MRHead
4) Go to the Editor module and paint with 2 different labels
5) Go to the Model maker module
6) Create a new model hierarchy for the output
7) Click Apply
8) Click the eye icon of the red slice in the 3D view => red slice appears in the 3D view
9) Click the eye icon of the yellow slice in the 3D view => ERROR: yellow slice does not appear in the 3D view
10) Click the eye icon of the green slice in the 3D view => ERROR: green slice does not appear in the 3D view

jcfr

jcfr

2015-09-22 10:05

administrator   ~0013297

Last edited: 2015-09-22 10:08

As of 2015-09-22, after following steps reported in note 12389 I confirm this is still an issue.

Menu -> file -> Close scene .. leads to a crash.

nicole

nicole

2015-11-03 09:49

administrator   ~0013530

From JC, these commands in the console also lead to the error state:
m = slicer.qMRMLSceneDisplayableModel()
m.setMRMLScene(slicer.mrmlScene)

jcfr

jcfr

2015-11-11 11:09

administrator   ~0013590

Fixed in r24723
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24723

lassoan

lassoan

2017-06-09 21:10

developer   ~0014701

This issue has been fixed quite a long time ago. Status of ticket was not updated.

Related Changesets

Import 2017-06-07 23:51:09: master dd5c50f1

2015-11-11 15:04:19

jcfr

Details Diff
BUG: Workaround MRML Scene import limitation. Fixes 0003462, 0002849 and 0004080

As documented in 0004081 [1], references to other nodes are not valid
when the NodeAddedEvent is invoked during the import of a scene in
an existing scene.

This prevented the qMRMLSceneModel from working well when it is
observing the scene and updating itself as new node are added
during import.

This commit workarounds the root issue by forcing all SceneModel
to have "lazyUpdate" enabled.

When lazyUpdate is enabled, the model ignores added node events when the
scene is importing/restoring, but synchronize with the scene once its
imported/restored.

This affected a broad set of modules and was captured in the following
issues:

* 3462: ModelMaker functionality breaks display of Slice views
* 2849: Hierachy not respected when loading the same scene multiples times
* 4080: Transform module is not updated properly after importing a scene

Reviewed-by: Andras Lasso <lasso@queensu.ca>
Reviewed-by: Steve Pieper <pieper@isomics.com>
Tested-by: Andras Lasso <lasso@queensu.ca>
Tested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24723 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLSceneModel.cxx Diff File

Import 2017-06-07 23:51:09: master 7c91689f

2015-11-12 12:50:11

jcfr

Details Diff
BUG: Revert workaround for MRML Scene import limitation. See 0004081

This commit reverts r24723 (BUG: Workaround MRML Scene import
limitation. Fixes 0003462, 0002849 and 0004080).

It turns out that this commit had unintended side effects. The following
tests were failing:

py_LandmarkRegistration
py_SlicerMRBMultipleSaveRestoreTest
py_SlicerMRBMultipleSaveRestoreLoopTest
py_SlicerMRBTest
py_NeurosurgicalPlanningTutorialMarkupsSelfTest
qMRMLSceneModelTest

After concerting with the core team, since the correct fix involves
changes in the core of MRML, we decided to revert this commit and mark
the tickets 0003462, 0002849, 0004080 as known issues in the release note.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24734 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLSceneModel.cxx Diff File

Issue History

Date Modified Username Field Change
2013-10-26 09:33 ungi New Issue
2013-10-26 09:33 ungi Status new => assigned
2013-10-26 09:33 ungi Assigned To => nicole
2013-10-28 10:50 ungi Note Added: 0010233
2013-10-28 10:54 ungi Note Edited: 0010233
2013-10-29 07:28 lassoan Note Added: 0010234
2013-10-29 08:10 ungi Assigned To nicole => tokuda
2013-10-29 08:13 ungi Summary ModelMaker interferes with slice widgets and slice intersections => OpenIGTLinkIF breaks ModelMaker functionality
2013-10-29 08:13 ungi Description Updated
2013-10-29 08:14 ungi Category Module ModelMaker => Module OpenIGTLinkIF
2013-11-01 05:48 tokuda Note Added: 0010248
2013-11-01 09:41 tokuda Note Added: 0010249
2013-11-01 10:36 lassoan Note Added: 0010250
2013-11-01 11:41 tokuda Note Added: 0010251
2013-11-01 11:48 tokuda Note Added: 0010252
2013-11-01 11:53 tokuda Note Added: 0010254
2013-11-01 12:02 ungi Note Added: 0010255
2013-11-01 12:02 tokuda Assigned To tokuda => jcfr
2013-11-01 12:02 tokuda Category Module OpenIGTLinkIF => Core: MRML
2013-11-01 12:02 tokuda Additional Information Updated
2013-11-01 12:06 tokuda Note Added: 0010256
2014-03-06 13:27 jcfr Note Added: 0011301
2014-03-06 13:27 jcfr Status assigned => resolved
2014-03-06 13:27 jcfr Fixed in Version => Slicer 4.4.0
2014-03-06 13:27 jcfr Resolution open => unable to reproduce
2014-03-06 13:27 jcfr Target Version => Slicer 4.4.0
2014-03-06 18:24 lassoan Note Added: 0011304
2014-03-06 18:24 lassoan Status resolved => assigned
2014-03-07 07:55 ungi Note Added: 0011342
2014-05-27 09:45 jcfr Summary OpenIGTLinkIF breaks ModelMaker functionality => ModelMaker functionality breaks display of Slice views
2014-05-27 09:47 jcfr Note Added: 0011962
2014-05-27 09:47 jcfr Status assigned => confirmed
2014-05-27 09:48 jcfr Note Edited: 0011962
2014-06-21 20:45 lassoan Note Added: 0012088
2014-07-29 15:14 nicole Note Added: 0012286
2014-07-31 07:29 nicole Note Added: 0012317
2014-08-14 11:16 nicole Relationship added related to 0003803
2014-08-15 11:08 jcfr Note Added: 0012383
2014-08-15 11:08 jcfr Status confirmed => resolved
2014-08-15 11:37 lassoan Note Added: 0012385
2014-08-15 11:37 lassoan Status resolved => acknowledged
2014-08-15 11:47 lassoan Note Added: 0012386
2014-08-15 12:05 jcfr Note Added: 0012389
2014-11-02 03:31 jcfr Target Version Slicer 4.4.0 => Slicer 4.4.1
2015-09-01 10:35 jcfr Target Version Slicer 4.4.1 => Slicer 4.5.0-1
2015-09-22 10:05 jcfr Note Added: 0013297
2015-09-22 10:06 jcfr Note Edited: 0013297
2015-09-22 10:08 jcfr Note Edited: 0013297
2015-11-03 09:46 jcfr Note Edited: 0012317
2015-11-03 09:49 nicole Note Added: 0013530
2015-11-03 15:26 jcfr Relationship added related to 0002576
2015-11-03 19:37 jcfr Relationship added related to 0002906
2015-11-03 20:14 jcfr Relationship added related to 0002849
2015-11-11 08:17 jcfr Relationship added parent of 0004081
2015-11-11 08:18 jcfr Relationship deleted parent of 0004081
2015-11-11 08:18 jcfr Relationship added child of 0004081
2015-11-11 11:09 jcfr Note Added: 0013590
2015-11-11 11:09 jcfr Status acknowledged => resolved
2015-11-11 11:09 jcfr Fixed in Version Slicer 4.4.0 => Slicer 4.5.0-1
2015-11-11 11:09 jcfr Resolution unable to reproduce => fixed
2015-11-12 08:16 jcfr Status resolved => assigned
2015-11-12 08:16 jcfr Fixed in Version Slicer 4.5.0-1 =>
2015-11-12 08:16 jcfr Target Version Slicer 4.5.0-1 => Slicer 4.5.1
2016-10-12 02:56 jcfr Target Version Slicer 4.5.1 => Slicer 4.7.0
2017-06-09 21:10 lassoan Status assigned => closed
2017-06-09 21:10 lassoan Note Added: 0014701
2017-06-10 08:51 jcfr Changeset attached => Slicer master 7c91689f
2017-06-10 08:51 jcfr Changeset attached => Slicer master dd5c50f1