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
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:
We’re trying to enable 3D Slicer to read and write vector image sequences (displacement field or velocity field: 3D spatial + component + time = 5 dimensions) into a single file. The format of choice is NRRD, and we thought the most correct way would be to use ITK’s NrrdImageIO (the alternative would be to improve vtkTeemNRRDWriter/Reader, but ITK is a much more core dependency than teem).
I started testing the IO with a valid-looking 5D nrrd file that I created using pynrrd. The heade…
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!