View Issue Details

IDProjectCategoryView StatusLast Update
0002783Slicer4Core: MRMLpublic2013-02-12 09:40
Reporterpinter Assigned Toalexy  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.2.0 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002783: Color names that contain spaces are not correctly set when loading a scene
Description

Although this scenario was kept in mind when implementing vtkMRMLColorNode, but it does not work correctly.

The function vtkMRMLColorNode::SetColorNameWithSpaces is supposed to take care of replacing underscores with spaces again, but it returns the same color name in both cases (when it contains underscore and when it does not).
I think the code that would do this replacing is missing from between the "if (strstr..." and the following return call.

TagsNo tags attached.

Activities

alexy

alexy

2012-11-27 06:22

developer   ~0007372

Could you provide a mrml file that is loaded incorrectly?

alexy

alexy

2012-11-27 07:03

developer   ~0007373

I was able to reproduce it by:

  • create a copy of a color in Color module
  • save scene (the color names are saved with "_" instead of " "
  • load scene back, the new color names have "_" instead of " "
alexy

alexy

2012-11-27 07:31

developer   ~0007374

Fixed vtkMRMLColorNode::SetColorNameWithSpaces() to replace '_' with ' '
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21463

pinter

pinter

2012-12-05 06:47

developer   ~0007412

Unfortunately the loaded colors still have their names with the underscores.
The problem is when loading the storage node, more closely in vtkMRMLColorTableStorageNode::ReadDataInternal

I'll attach a scene that you can test it with in a moment

2012-12-05 06:47

 

20121205_Bug179_ColorNodesWithSpaces_Test.zip (16,166 bytes)
alexy

alexy

2012-12-14 05:55

developer   ~0007501

Replaced '_' with spaces in color names on reading external files.
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21517

pinter

pinter

2012-12-18 09:38

developer   ~0007535

I checked with Slicer revision 21518 and the test MRML scene and it worked fine.

Issue History

Date Modified Username Field Change
2012-11-21 06:20 pinter New Issue
2012-11-21 06:20 pinter Status new => assigned
2012-11-21 06:20 pinter Assigned To => alexy
2012-11-27 06:22 alexy Note Added: 0007372
2012-11-27 06:22 alexy Status assigned => feedback
2012-11-27 07:03 alexy Note Added: 0007373
2012-11-27 07:04 alexy Status feedback => confirmed
2012-11-27 07:31 alexy Note Added: 0007374
2012-11-27 07:31 alexy Status confirmed => resolved
2012-11-27 07:31 alexy Resolution open => fixed
2012-12-05 06:47 pinter Note Added: 0007412
2012-12-05 06:47 pinter Status resolved => assigned
2012-12-05 06:47 pinter File Added: 20121205_Bug179_ColorNodesWithSpaces_Test.zip
2012-12-07 18:33 jcfr Target Version => Slicer 4.2.3
2012-12-14 05:55 alexy Note Added: 0007501
2012-12-14 05:55 alexy Status assigned => resolved
2012-12-18 09:38 pinter Note Added: 0007535
2012-12-18 09:38 pinter Status resolved => closed
2012-12-18 09:38 pinter Fixed in Version => Slicer 4.2.3
2013-02-12 09:39 jcfr Target Version Slicer 4.2.3 => Slicer 4.3.0
2013-02-12 09:40 jcfr Fixed in Version Slicer 4.2.3 => Slicer 4.3.0