View Issue Details

IDProjectCategoryView StatusLast Update
0002263Slicer4Core: Base Codepublic2014-03-06 04:58
Reporterfinetjul Assigned Tonicole  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product VersionSlicer 4.1.1 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.2.1 
Summary0002263: Fail a reload a scene containing a color node with '&' char in color name
Description

Some characters (&) fail the parsing of the mrml scene.
Maybe use CDATA (http://en.wikipedia.org/wiki/CDATA) to wrap the entire color names.

Steps To Reproduce

Add into Slicer a color table containing a color name with a & character
Save the scene
Reload the scene
-> parsing error when reading the char & in vtkMRMLParser (vtkXMLParser)

Additional Information

The current conversion of ' ' (space) into '' is suboptimal. Some color names can use '' in their names, they would be converted to ' ' at reading.
Suggestion: use " " instead or a character less often used (not on the keyboard but an ascii value)?
Consider:
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20490
Maybe there should be a similar method: "vtkMRMLColorNode::GetColorNameAsXMLName()"

TagsNo tags attached.

Activities

nicole

nicole

2012-07-02 14:04

administrator   ~0005047

The conversion of spaces to underscores is to deal with the very simple parsing of the file in the storage node, where it relies on white space to separate out the columns. The names are then converted back to use spaces when they're read in. I'd rather not meddle with that format too much for backward compatibility reasons.

The fact that the color tables are also printed out in the MRML file is a redundancy similar to the fiducial lists that I'm willing to jettison, but we might have to convince Ron first.

A larger issue is that any node name can have any characters in them if someone edits a mrml file or enters a name in a Qt entry widget or a developer auto generates a name for an output node. A general MRML utility to convert a string to an XML parsable string (and another to go back to a human readable one) would be my suggestion.

nicole

nicole

2012-08-07 13:20

administrator   ~0005520

Slicer dev meeting Aug 7/12: remove writing the colors to the MRML file. Will need to keep the reading for backward compatibility (svn 20729 removes tick marks around names).

nicole

nicole

2013-07-09 07:57

administrator   ~0008945

Removed from MRML file.

jcfr

jcfr

2014-03-06 04:56

administrator   ~0010801

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

Issue History

Date Modified Username Field Change
2012-06-26 13:32 finetjul New Issue
2012-06-26 13:32 finetjul Status new => assigned
2012-06-26 13:32 finetjul Assigned To => nicole
2012-06-26 13:34 finetjul Additional Information Updated
2012-07-02 14:04 nicole Note Added: 0005047
2012-08-07 13:20 nicole Note Added: 0005520
2012-08-20 10:34 nicole Target Version => Slicer 4.2.5
2012-08-21 09:40 jcfr Target Version Slicer 4.2.5 => Slicer 4.3.0
2013-07-09 07:57 nicole Note Added: 0008945
2013-07-09 07:57 nicole Status assigned => resolved
2013-07-09 07:57 nicole Fixed in Version => Slicer 4.2.1
2013-07-09 07:57 nicole Resolution open => fixed
2014-03-06 04:56 jcfr Note Added: 0010801
2014-03-06 04:58 jcfr Status resolved => closed