[vtkusers] re ad a raw file (32-bit signed integers) with vtkImageReader
Orlinn
MeinDatenLaufwerk at googlemail.com
Mon Oct 19 07:13:12 EDT 2009
hello VTK world,
i have a raw(32-bit signed integers) file which contains my images.
>From the 4 bytes i need only the 2 last bytes, i thought i can set a mask
like 0x00FF.
but it does not work. I use the the class vtkImageReader.
When i try with 16 and 8 bit raw files, it works.
this is my code
vtkImageReader rawreader= new vtkImageReader();
rawRedaer.SetFileName("C:/Desktop/rawFile.dat");
rawReader.SetDataExtent(0, 511, 0, 511, 0, 249);
rawReader.SetDataScalarTypeToUnsignedShort();
rawReader.SetDataByteOrderToBigEndian();
rawReader.SetFileDimensionality(3);
rawReader.SetDataSpacing(0.40234375, 0.40234375, 0.5);
rawReader.SetNumberOfScalarComponents(1);
rawReader.Update();
can somebody tell me what i have to add????
sorry for my english and my VTK knowledge
thank you
--
View this message in context: http://www.nabble.com/read-a-raw-file-%2832-bit-signed-integers%29-with-vtkImageReader-tp25956561p25956561.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list