[vtkusers] Reader object - reading extra information from a file.
Chris Hughes
chughes at informatics.bangor.ac.uk
Wed Mar 3 07:17:52 EST 2004
Hi!
I have appended 3 UINTS to the beginning of my raw data, representing
the dimensions of the data. I have been using the reader object in the
following way to read the volume data, but I need to extend this so that
the reader reads the 3 UINTS first, before reading the raw data. Can
anyone point me in the right direction??
vtkImageReader *reader = vtkImageReader::New();
reader->SetFileName(fileName);
reader->SetFileDimensionality(3);
reader->SetDataExtent(0, xDims-1, 0, yDims-1, 0, zDims-1);
reader->SetDataOrigin(0, 0, 0);
reader->SetDataScalarTypeToUnsignedChar();
reader->SetDataSpacing(xRes, yRes, zRes);
reader->SetHeaderSize(0);
Thanks!
Chris
More information about the vtkusers
mailing list