[Insight-users] Unable to load the correct filenames into itk::ImageSeriesReader
Panagiotis Foteinos
pafotein at gmail.com
Tue Sep 6 12:23:21 EDT 2011
Hello users.
I have a folder that contains slices of a 3D image in Analyze format.
It contains an hdr file (header) and the series of img files. I am
interested in reading the series and then converting it into one 3D
mha volume. I have noticed that the series reader does not work as
expected or that I have not understood it.
First of all the reader is defined as follows:
*******************************************************************
typedef itk::ImageSeriesReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetImageIO( itk::AnalyzeImageIO::New() );
*******************************************************************
I used the itk::NumericSeriesFileNames to generate few .img filenames.
It seems that the reader automatically tries to find the header file
in the beginning, but then it tries to find another one too... For
example, if the generated filenames are name1.img, name2.img,
...name57.img, then the reader attempts to load name1.hdr, name2.hdr
and so forth...
How should I use the generator? How can I instruct the reader to first
read a single header and then load the series of the img files? There
is only one header file in the folder.
Best Regards,
Panagiotis Foteinos
More information about the Insight-users
mailing list