[Insight-users] Reading Analyze 7.5 images with ITK

A.Burak Yoldemir yoldemir at gmail.com
Sun Nov 8 15:40:01 EST 2009


Hello,

I am trying to read Analyze 7.5 images using ITK, however I am getting
segfault. Here is the relevant code:

            typedef unsigned char PixelType;
            const unsigned int Dimension = 3;
            typedef itk::Image< PixelType, Dimension > ImageType;

            typedef itk::ImageSeriesReader< ImageType > ReaderType;

            ReaderType::Pointer reader = ReaderType::New();

            typedef itk::NumericSeriesFileNames    NameGeneratorType;
            NameGeneratorType::Pointer nameGenerator =
NameGeneratorType::New();

            nameGenerator->SetSeriesFormat(
"/root/Desktop/default_10-v1.0.3/default_10-v1.0.3/phantom_01/clean/dwi-%02d.hdr"
);

            nameGenerator->SetStartIndex( 0 );
            nameGenerator->SetEndIndex( 66 );
            nameGenerator->SetIncrementIndex( 1 );

            reader->SetImageIO( itk::AnalyzeImageIO::New() );

            reader->SetFileNames( nameGenerator->GetFileNames() );
            reader->Update();

I am getting a segmentation fault when the update method is called. Any
ideas?

Thanks in advance,


Ahmet Burak Yoldemi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091108/e34224d1/attachment.htm>


More information about the Insight-users mailing list