View Issue Details

IDProjectCategoryView StatusLast Update
0003276Slicer4Core: MRMLpublic2018-03-02 11:02
Reporterjmk1 Assigned Toalexy  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.2.2-1 
Target VersionFixed in VersionSlicer 4.7.0 
Summary0003276: loading FreeSurfer aparc.annot corrupts scene
Description

I can successfully load a FreeSurfer pial surface in slicer, and then load the corresponding aparc.annot label file as a scalar overlay. When I go to save the scene, the "File Name" for the model is changed to be a combination of the original model file name and the aparc.annot file name. It also has no format, and I can't select one. When I just try saving this and reloading the scene, the file name for the model is this incorrect file name, so nothing gets loaded.

Additional Information

I've attached a screenshot of the aparc loaded onto the model, and the save dialog with the corrupted file name, along with the model and aparc.annot.

TagsNo tags attached.

Activities

2013-08-06 08:18

 

aparc_overlay_error.png (214,174 bytes)
aparc_overlay_error.png (214,174 bytes)

2013-08-06 08:19

 

lh_t88_305_pial.pial (4,890,731 bytes)

2013-08-06 08:19

 

lh.aparc.annot (1,087,946 bytes)
jmk1

jmk1

2013-08-22 10:35

reporter   ~0009549

Any updates on this?

nicole

nicole

2013-08-22 13:09

administrator   ~0009550

Hadn't had a chance to look at it before, but verified that it is a problem today.

Looks like loading the overlay is changing the storage node settings on the pial model node so that it's pointing to two copies of the same storage node id, that of the scalar overlay storage node:
pial = getNode("lh_t88_305_pial")
print pial
[...]
StorageNodeIDs[0]: vtkMRMLFreeSurferModelOverlayStorageNode1
StorageNodeIDs[1]: vtkMRMLFreeSurferModelOverlayStorageNode1

So when the save dialog comes up, it's trying to save a model with a scalar overlay storage node, which can't write that kind of file.
This is probably stemming from the fact that we're trying to import FreeSurfer geometry and overlay files into one VTK geometry structure that contains the overlay information.

I'll dig into the code in the load data dialog to see if I can pin down where the storage node confusion is happening.

nicole

nicole

2013-08-22 14:01

administrator   ~0009555

Stepping through the code, all is well while loading the scalar overlay (it's storage node is set as the second storage node reference on the model node) until ReadData is called on the overlay storage and it hits:
Slicer/Libs/MRML/Core/vtkMRMLStorageNode.cxx:1095
storableNode->SetAndObserveStorageNodeID(this->GetID());
thus overwriting the 0th storage node id on the model node. I'm going to ping the developer who reworked the node references and see if he has a quick answer as to what that code needs to change to.

nicole

nicole

2013-08-22 14:06

administrator   ~0009556

Last edited: 2013-08-22 14:28

Reminder sent to: alexy

Hi Alex,

This looks like a leftover bug from the reworking of the node references. The freesurfer models end up with two storage node ids, but in ReadData on the vtkMRMLStorageNode superclass, when loading the second file (the overlay for the model) ReadData is calling:
SetAndObserveStorageNodeID
line 1095
and over writting the storage node id for the geometry file rather than adding a storage node id for the overlay file. The thing is that the storable node has already had it's reference storage node ids set up before it got to this point, so it seems like ReadData needs to check if this id is already observed first. Can the call just be changed to
AddAndObserveStorageNodeID
to fix this bug or is there a different way you'd suggest doing it?

Edit: nope, tried it out and you end up with 4 storage node refs instead of 2:
StorageNodeIDs[0]: vtkMRMLFreeSurferModelStorageNode1
StorageNodeIDs[1]: vtkMRMLFreeSurferModelStorageNode1
StorageNodeIDs[2]: vtkMRMLFreeSurferModelOverlayStorageNode1
StorageNodeIDs[3]: vtkMRMLFreeSurferModelOverlayStorageNode1

lassoan

lassoan

2017-06-14 17:03

developer   ~0014839

Fixed in r26092.

Issue History

Date Modified Username Field Change
2013-08-06 08:18 jmk1 New Issue
2013-08-06 08:18 jmk1 Status new => assigned
2013-08-06 08:18 jmk1 Assigned To => alexy
2013-08-06 08:18 jmk1 File Added: aparc_overlay_error.png
2013-08-06 08:19 jmk1 File Added: lh_t88_305_pial.pial
2013-08-06 08:19 jmk1 File Added: lh.aparc.annot
2013-08-06 08:39 alexy Assigned To alexy => nicole
2013-08-22 10:35 jmk1 Note Added: 0009549
2013-08-22 13:09 nicole Note Added: 0009550
2013-08-22 14:01 nicole Note Added: 0009555
2013-08-22 14:06 nicole Note Added: 0009556
2013-08-22 14:28 nicole Note Edited: 0009556
2013-08-22 14:41 nicole Assigned To nicole => alexy
2017-06-14 17:03 lassoan Status assigned => resolved
2017-06-14 17:03 lassoan Resolution open => fixed
2017-06-14 17:03 lassoan Fixed in Version => Slicer 4.7.0
2017-06-14 17:03 lassoan Note Added: 0014839
2018-03-02 11:02 jcfr Status resolved => closed