Page MenuHomePhabricator

mitk::IOUtil cannot save DiffusionImages, loading works
Closed, InvalidPublic

Description

I use the IOUtil in a test in DiffusionCore Module to load/save (diffusion-)images. With

RegisterDiffusionCoreObjectFactory();
mitk::Image::Pointer inputImage  = mitk::IOUtil::LoadImage(str_filename);

the corresponding image is loaded correctly, but at the end of the test, when I call

mitk::IOUtil::SaveImage( dwi_image_out, "/tmp/output.dwi" )

the IOUtil reponses with:

!2.989! WARNING: .dwi extension is unknown. Extension set to default:  /tmp/output.nrrd
[4.429] Diffusion-Image successfully initialized.
[4.440] Writing image: /tmp/output.nrrd

This should not happen, the factory is correctly registered.

Event Timeline

Ok, the call to SaveImage( <DWI_IMAGE> ) is not correct, as it instantiates the FileWriter ( from MITK/Core ) and is hence not able to handle DWI images.

But it should work with SaveBaseData( <DWI_IMAGE> ), but the behaviour is the same, it exits with the statement:

".dwi extension is unknown."

The issue is meanwhile invalid, after re-factoring the Reader/Writer to a Service.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:32 PM
kislinsk removed hering as the assignee of this task.
kislinsk added a project: Bulk Edit.
kislinsk added a subscriber: hering.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:36 PM
kislinsk removed a project: Bulk Edit.