Load attached 2D Image.
Save as PNG file.
Enjoy.
Description
Event Timeline
For an (yet) unknown reason the memory consumption increases VERY rapidly. So be aware of this fact when testing.
The memory problem occurs in the itk::NumericFileNameWriter called inside of
template < typename TPixel, unsigned int VImageDimension >
void _mitkItkPictureWrite
at this point:
line 53: writer->SetFileNames(numericFileNameWriter->GetFileNames());
The image passed to the _mitkItkPictureWrite method is correctly initialized, i.e. the Region.Size and Region.Index have both valid entries.
[e77086]: Merge branch 'bug-11512-PNG-2DFileWriter-MemoryLeak'
Merged commits:
2012-05-10 12:59:23 Jan Hering [b09f27]
Adding new mitkImageWriterTest instance
2012-05-09 18:17:29 Jan Hering [07d14c]
Enhancing ImageWriterTest to test saving of 2D PNG images
2012-05-09 18:16:23 Jan Hering [499201]
Fixing memory leak in case of 2D images
- splitting the control flow to separate processing 2D and 3D images
and to remove the access to uninitialized memory
[c71db6]: Merge branch 'bug-11512-PNG-2DFileWriter-MemoryLeak'
Merged commits:
2012-05-10 13:27:19 Jan Hering [21789f]
Correcting test label typo