[vtkusers] vtkImageReader

panayiotis foteinos pafotein at gmail.com
Wed Mar 18 21:27:28 EDT 2009


Hello to all.

I have a VTK, 2D,  binary image. To be more precise, this 2D image is a slice 
extracted from an ITK, 3D volume. The goal is to extract the boundaries of 
this slice, for example, the vtkContourFilter or the vtkMarchingContourFilter 
class.

Slicer3 and Paraview can succesfully read this slice and display it. 
Therefore, I assume that the format of the slice is correct...

However, the vtlImageReader class does not read the image correctly. I have to 
pass the dimension and the spacing of the slice manually by calling the 
functions vtlImageReader::SetDataExtent(...) and 
vtlImageReader::SetDataExtent(...) with the correct arguments. Only then the 
vtlImageReader succesfully reads the vtk slice.

This is strange since all the information that vtkImageReader needs is stored 
in this slice. Any suggestions? Am I making any mistake or I should use 
another vtk Reader?


Thank you very much,
Panagiotis




More information about the vtkusers mailing list