View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000444ITKpublic2003-12-17 14:422003-12-19 13:47
Reporternicolas.savoire 
Assigned ToLydia Ng 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000444: Filename not changed when writing multiple mhd files to disk
DescriptionI use an ImageFileWriter to write several files in mhd format. I change the input and the filename for each file between updates. The name of the mhd file is correctly updated, but the name of the associated raw file remains the same one (corresponding to the first write).

Example code:
    writer->SetInput(...);
    writer->SetFileName("a.mhd");
    writer->Update();

    writer->SetInput(...);
    writer->SetFileName("b.mhd");
    writer->Update();

    writer->SetInput(...);
    writer->SetFileName("c.mhd");
    writer->Update();

This code will produce 3 files: a.mhd b.mhd c.mhd, but only one raw file: a.raw.

I tracked the source of the bug down to the file metaImage.cxx in the method Write. The test line 808:
if(_dataName == NULL && strlen(m_ElementDataFileName)==0)
implies that if m_ElementDataFileName has already been set (which is the case in my example) then it is not updated, which explains the bug.
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Files

 Relationships

  Notes
(0000380)
Lydia Ng (developer)
2003-12-19 13:47

This bug has been fixed in the 1.4 branch and will appear in 1.4.1 release.

In the meantime the patched 1.4 branch can be obtained via cvs. Please see www.itk.org/HTML/Download.htm for instructions.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team