I am using NDDR files to load a volume, each file references a consecutively numbered raw file type from 1 to 10; my idea to avoid having to create ten NDDR files is to concatenate all the files into a single one named data.raw and read it with a single NDDR file. I believe this is possible, but when I try it, the image gets corrupted.
The content of each file is as follows:
NRRD0004
Thank you, pieper, I have based my work on that documentation to generate the NRRD file. I believe my problem lies in how to merge the image files into a single one. Should I only keep the portion corresponding to the image data, or can the complete files be concatenated with their headers? That is, is the “byte skip” command used on each of the slices stored in the file, or only at the beginning of its reading?
As I recall byte skip only refers to the start of a single file and I don’t think there’s a way to skip the headers of each of the files in a data file list, but I could be wrong about that. As I recall there’s also an option to give a -1 for byte skip so that it figures out from the file size and expected image size how big the header is. If you want to merge all the files into a single raw file you almost certainly need to concatenate only the image parts (uncompressed). Also if you are working with named files be sure to check the option of giving a printf-style string to create the filenames from the number pattern.
I pointed to the nrrd documentation also so you would have a look at unu and the rest of the nrrd utility set. There are lots of ways to create and manipulate nrrd files and with some experiments you can pretty much do anything.