[vtkusers] VTI Read Whole Extent

Brad King brad.king at kitware.com
Mon Jul 24 15:59:22 EDT 2006


Kevin H. Hobbs wrote:
> Is there some way to get vtkXMLImageDataReader to read the whole extent
> and other descriptive information of a ".vti" image file without reading
> any of the data. I tried UpdateInformation like but it doesn't work.
> 
> #include "vtkImageData.h"
> #include "vtkXMLImageDataReader.h"
> 
> int main( int argc, char *argv[] )
> {
> 
> 	vtkXMLImageDataReader * reader 
> 		= vtkXMLImageDataReader::New();
> 	reader->SetFileName( argv[1] );
> 	reader->UpdateInformation();

That should work.  Try calling

  reader->GetOutput()->Print(cout);

here.  The WholeExtent should be correct.  GetDimensions is failing
because it returns information about the data currently in memory, not
what is available.

-Brad




More information about the vtkusers mailing list