[Insight-users] problems with GE5ImageIO

Bryn Lloyd blloyd at bwh.harvard.edu
Thu Jun 23 05:56:15 EDT 2005


Hi All,

I am using the itkGE5ImageIO to read Genesis files.

Sofar I have been using the ITK 1.6 release. This worked fine for me.

Now I would like to use the newest release. I would like to add the 
orientation (direction cosines) to the image - use an itkOrientedImage.

For some reason the new version of the GE5ImageIO cannot read the files 
anymore.
I get the following (very short) message:

 >Could not read file. Exiting ...

Is this a BUG?

What should I do? I was planning to copy the itkOrientedImage.h/txx to a 
seperate folder, but otherwise use the 1.6 release. I guess I might run 
into some dependancies though.

Thanks


----------------
This is my code:

  const unsigned int Dimension = 3;
  typedef   double  PixelType;

  typedef itk::Image< PixelType,   Dimension >        ImageType;

  typedef itk::ImageFileReader< ImageType >      ReaderType;
  typedef itk::ImageFileWriter< ImageType >      WriterType;
  typedef itk::GE5ImageIO                       ImageIOType;

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

  std::cout << "Starting to read file " << filenameGE5 << std::endl;
  if (!imageIO->CanReadFile( filenameGE5 ))
    {
    exit(0);
    }
   reader->SetImageIO( imageIO );
   reader->SetFileName( filenameGE5 );
   reader->Update();




More information about the Insight-users mailing list