[vtkusers] vtk Tiff support -32 bit float
yakk yeti
yakkyeti at gmail.com
Sun Mar 7 14:15:09 EST 2010
Hi all,
I am new to vtk and have been trying to read a group of TIFF images.
These are 32 bit Floating point TIFF files. In the following case, I am just
reading one image.
vtkSmartPointer<vtkTIFFReader> v16 =
vtkSmartPointer<vtkTIFFReader>::New();
int testRet = v16->CanReadFile("C:\\vtk\\testData\\07_1.tif"); //
Returns 3
v16->SetFilePrefix("C:\\vtk\\testData\\07_1.TIF");
v16->SetFilePattern("%s");
v16->SetDataByteOrderToLittleEndian();
v16->SetDataScalarTypeToFloat();
v16->SetDataSpacing(1, 1,1);
v16->SetDataOrigin(0,0,0);
v16->Update();
vtkImageData* image = v16->GetOutput();
double *testDouble = image->GetScalarRange();
//Returns 52685.000 - the max and min in file are
//0.999640 and -9999
What is it I am doing wrong here?
Thanks in advance.
Yaji
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100307/da0be6a6/attachment.htm>
More information about the vtkusers
mailing list