View Issue Details

IDProjectCategoryView StatusLast Update
0003145Slicer4Core: MRMLpublic2017-06-07 23:27
ReporterFranklin King Assigned Tojohan.andruejol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.2.2-1 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.4.0 
Summary0003145: New Units code leading to mrml xml issues
Description

Loading a scene results in the following error:

ERROR: In ....\VTK\IO\vtkXMLParser.cxx, line 483
vtkMRMLParser (000000000E11C7A0): Error parsing XML in stream at line 5, column 117, byte index 431: not well-formed (invalid token)

which seems to be referring to:

selected="false" ="vtkMRMLUnitNodeApplicationLength" "vtkMRMLUnitNodeApplicationTime" activeVolumeID="NULL"

Working scenes lack vtkMRMLUnitNodeApplicationLength and vtkMRMLUnitNodeApplicationTime.

TagsNo tags attached.

Relationships

has duplicate 0003146 closedjohan.andruejol MRML scene with units are unvalid. 

Activities

johan.andruejol

johan.andruejol

2013-06-04 13:13

manager   ~0008705

Fixed in revision 22705, see
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22075

jcfr

jcfr

2014-03-06 05:15

administrator   ~0011081

Closing resolved issues that have not been updated in more than 3 months

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file edb07a87

2013-06-04 15:31:29

johan.andruejol

Details Diff
BUG: Fix MRMLScene import and export

In the selection node, the unit didn't add a
NodeReferenceMRMLAttributeNames for each of its reference role. These
attributes are used when saving the mrml scene to describe what the
reference role is used for. Most notably, this can be used when importing
a scene.
However, since there wasn't any defined for the selection node, a saved
scene would look like this:
... selected="false" ="vtkMRMLUnitNodeApplicationLength" "vtkMRMLUnitNodeApplicationTime" activeVolumeID="NULL" ...
Which is an invalid format for the scene.

Adding a NodeReferenceMRMLAttributeNames is usually done in the class
constructor. In our case, we assume that we don't know what kind of unit
quantity can be added. Thus we don't know the ReferenceRoles we will need
at constructor time. So we add theses roles in the SetUnitNodeID().
The roles names are based on the quantity, and aren't actually used
anywhere.

To make sure this works, a test opening Slicer, saving a scene and loading
it again is added.

See Issue 0003145

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22075 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Applications/SlicerApp/Testing/Python/CMakeLists.txt Diff File
add - Applications/SlicerApp/Testing/Python/MRMLSceneImportAndExport.py Diff File
mod - Libs/MRML/Core/vtkMRMLSelectionNode.cxx Diff File

Issue History

Date Modified Username Field Change
2013-06-04 07:05 Franklin King New Issue
2013-06-04 07:05 Franklin King Status new => assigned
2013-06-04 07:05 Franklin King Assigned To => alexy
2013-06-04 07:14 jcfr Assigned To alexy => johan.andruejol
2013-06-04 07:15 jcfr Target Version => Slicer 4.3.0
2013-06-04 07:16 jcfr Relationship added has duplicate 0003146
2013-06-04 13:13 johan.andruejol Note Added: 0008705
2013-06-04 13:13 johan.andruejol Status assigned => resolved
2013-06-04 13:13 johan.andruejol Resolution open => fixed
2014-03-06 05:15 jcfr Note Added: 0011081
2014-03-06 05:16 jcfr Status resolved => closed
2014-03-06 05:55 jcfr Fixed in Version => Slicer 4.4.0
2017-06-07 23:27 johan.andruejol Changeset attached => Slicer 2145-support-for-installing-extension-from-file edb07a87