Use JoinSeriesImageFilter to append 4D images into 5D

Hi all,

I have a series of 4D images (3D + scalar component) with the same dimensions, scalar type, number of scalar components, and I’d like to append them into a single image (a time or other type of sequence of images) that would be in the end 5D (4D + component). Then I’d like to write the resulting 5D image into file using ImageFileWriter.

My question is whether this class can be safely used for this?

Or if not, what other possibilities do I have within ITK?

This question is related to this thread:

Thank you very much!

Join series should work. If it does not do exactly what you want, you could go a more manual path: construct a 5D image in memory, then use PasteImageFilter to populate it with constituent components.

Thank you very much for the fast answer! I’ll try the join series filter first and if there are problems continue with what you suggested.

Just for the record, it seems that JoinImageSeriesImageFilter does work. If some problem does arise I’ll report here.

Thanks for the help!