Hi,<br><br>First of all, I thought that unsigned short are 2 bytes integers. Correct me if I mistake! <br>Then, could you give more precision on what doesn't work? Do you get a VTK error message, an empty volume, a segfault, or something else?<br>
<br>Best regards,<br>Jerome<br><br><div class="gmail_quote">2009/10/19 Orlinn <span dir="ltr"><<a href="mailto:MeinDatenLaufwerk@googlemail.com">MeinDatenLaufwerk@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
hello VTK world,<br>
<br>
i have a raw(32-bit signed integers) file which contains my images.<br>
>From the 4 bytes i need only the 2 last bytes, i thought i can set a mask<br>
like 0x00FF.<br>
but it does not work. I use the the class vtkImageReader.<br>
When i try with 16 and 8 bit raw files, it works.<br>
<br>
this is my code<br>
vtkImageReader rawreader= new vtkImageReader();<br>
rawRedaer.SetFileName("C:/Desktop/rawFile.dat");<br>
rawReader.SetDataExtent(0, 511, 0, 511, 0, 249);<br>
rawReader.SetDataScalarTypeToUnsignedShort();<br>
rawReader.SetDataByteOrderToBigEndian();<br>
rawReader.SetFileDimensionality(3);<br>
rawReader.SetDataSpacing(0.40234375, 0.40234375, 0.5);<br>
rawReader.SetNumberOfScalarComponents(1);<br>
rawReader.Update();<br>
<br>
can somebody tell me what i have to add????<br>
<br>
sorry for my english and my VTK knowledge<br>
<br>
thank you<br>
--<br>
View this message in context: <a href="http://www.nabble.com/read-a-raw-file-%2832-bit-signed-integers%29-with-vtkImageReader-tp25956561p25956561.html" target="_blank">http://www.nabble.com/read-a-raw-file-%2832-bit-signed-integers%29-with-vtkImageReader-tp25956561p25956561.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>