Page MenuHomePhabricator

MITK cannot write png image
Closed, ResolvedPublic

Description

When I acquire a .png image with a (ToF) camera and try to save it, the following message occurs:
/usr/local/thomas/MITK/Core/Code/IO/mitkIOUtil.cpp:837:
No suitable writer found for the current data of type Image with extension .png

I tried loading a .png image with open file and saving it. This works. If you load a .png first, and then try to save a generated image as .png, this still does not work.

Event Timeline

I also tried to save Pic3D as .png. This should save everything as a set of 2D slices, however, the following occurs:

No mime-type available which can handle "/media/tommy/hdd/thomasHdd/Pictures/iPad4_ColorCalibration/DepthScreenShot/Pic3D.png".

Todo: Write a test for this feature. I remember it was broken once already and we still do not have any test.

Taking this from Sascha, looking into it.

User maerz has pushed new remote branch:

bug-18644-MitkCannotWritePng

I have fixed the behaviour for the following case: 3D image with one slice. Those should be completely supported now. I also added a positive and a negative Testcase (1-slice and 2-slice image). I'd like to merge the bug at this state to provide a relief for the release and will continue working on the 3D stacks at a later point, as I don't want to include such a complicated fix into the release directly.

[535314]: Merge branch 'bug-18644-MitkCannotWritePng'

Merged commits:

2015-03-18 16:35:07 Keno März [5ca7e4]
Two new test cases check writing of a one-slice and a two-slice mitkImage as nrrd and as png


2015-03-18 16:34:20 Keno März [4dbda0]
Fixed a bug which made many valid images unsupported


2015-03-18 14:58:25 Keno März [0db244]
Added a check to allow 3D images with one slice to be saved


2015-02-18 16:45:54 Keno März [9f8509]
Corrected Paths for two tests


2015-02-18 16:38:01 Keno März [ae7c64]
Converted ImageWriter Test from CMAKE to CPPUNIT

I am closing this bug, further development will happen in T18940