Page MenuHomePhabricator

Provide a filter for combining set of 3D Volumes to a 4D Image
Closed, WontfixPublic

Description

There was a new query on the mailing-list for the creation of a 4D Image from a vector of 3D images. By searching the mailing-list archive for the 4D keyword, and I have found few more similar questions.

ITK itself does not provide this functionality, but it could be useful to provide such functionality. Either as an own method of the mitk::Image class or as a filter.

Event Timeline

I came across a post [1] about the use of the itk::CastImageFilter to make a 4D dataset from multiple 3D dataset. Would it be possible to use this?

Also, would it be possible to use the ImageNavigator time slice navigation on a 4D dataset created in such way?

[1]: http://www.itk.org/pipermail/insight-users/2003-December/005796.html

If the 3D images have all the same geometrie, this is not very complicated. Here some code that should almost work:

// Assume we have image3D_a, image3D_b, image3D_c

mitk::Image::Pointer image4D = image3D_a->Clone();
image4D->Expand(3);
image4D->SetVolume(image3D_b, 1);
image4D->SetVolume(image3D_c, 2);

If the single 3D images have different geometries, this would propably work as well. Single timesteps in 4D images can have different geometries. However the overall geometry (image4D->GetGeometry()) might have to be adapted. Maybe, not quite sure. Unfortunatly I do not have time to test this now. Maybe wednesday.

It is possible to set different geometries to the different timesteps. To do so, the TimeGeometry for image4D must fetched with image4D->GetTimeGeometry();

Since the functionality is already implemented in MITK i close this bug.

kislinsk added a project: Bulk Edit.
kislinsk removed a project: Bulk Edit.