[Insight-users] Problem for reading vtk images
luis.ibanez at kitware.com
Wed Oct 31 09:05:13 EDT 2007
Why are you using the ImageIO classes directly ?
You *should not* need to access them at all.
You can read image by simply using the ImageFileReader:
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
catch( itk::ExceptionObject & excp )
std::cerr << excp << std::endl;
The ImageFileReader will deal with the ImageIOFactories for you.
Please give us more details about what you are doing,
Alexandre Abadie wrote:
> Hi itk users,
> I am currently using the itkImageIOFactory class for reading the data
> formats supported by itk. This works very well with versions 3.0 and 3.2
> but I recently made an update to 3.4 and now I can't read vtk data. I
> tested with NIFTI and Mha data and it always works.
> Here is how I am proceeding :
> itk::ImageIOBase::Pointer imageIO = itk::ImageIOFactory::CreateImageIO (
> entree, itk::ImageIOFactory::ReadMode );
> This return a null pointer when I am trying to load a vtk data with itk
> Any suggestion ?
> Thanks in advance.
> Insight-users mailing list
> Insight-users at itk.org
More information about the Insight-users