[vtkusers] how to create a generic reader?

Dominik Szczerba domi at vision.ee.ethz.ch
Fri Jul 14 10:29:43 EDT 2006


I want read a file without apriori knowledge of the file type. I use:

vtkDataReader* reader = vtkDataReader::New();
dataObject = reader->GetOutputDataObject(0);

but this aborts at runtime (see below). Is it possible to load an 
arbitrary file and downcast based on its type it as appropriate?


ERROR: In /home/domi/src/vtk/VTK-CVS-080706/Filtering/vtkAlgorithm.cxx, 
line 665
vtkDataReader (0x805ba60): FillOutputPortInformation is not implemented.

line 675
vtkStreamingDemandDrivenPipeline (0x805be90): Algorithm 
vtkDataReader(0x805ba60) did not create output for port 0 when asked by 
REQUEST_DATA_OBJECT and does not specify any DATA_TYPE_NAME.

More information about the vtkusers mailing list