Hi,<br><br>I see that you use a vtkDataSetMapper. vtkDataSet is a high level class in the vtk hierarchy that represents data. Therefore, the render process is not able to "choose" a better specialized rendering, e.g is it a mesh or a volume or a graph or ... ?<br>
<br>Take a look at a vtkVolumeMapper for a volume rendering, or the widget vtkmagePlaneWidget if you wish to slice the data.<br><br>Hope that helps,<br>Jerome<br><br><div class="gmail_quote">2009/6/4 -Daniel- <span dir="ltr"><<a href="mailto:dk-80@gmx.de">dk-80@gmx.de</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;"><div class="im"><br>
Hello,<br>
<br>
I wrote in my last message<br>
> reader.SetDataScalarTypeToUnsignedChar();<br>
but the raw format is "16bits unsigned". <Thanks burlen><br>
</div>Therefore I changed this to:<br>
reader.SetDataScalarTypeToUnsignedShort();<br>
<div class="im"><br>
But that won't solve my case. The result is a colorized cube.<br>
</div><div class="im">Please look at the attached picture.<br>
</div><a href="http://www.nabble.com/file/p23875911/snapshot_1.jpg" target="_blank">http://www.nabble.com/file/p23875911/snapshot_1.jpg</a> snapshot_1.jpg<br>
<div class="im"><br>
Any ideas about a Solution is welcomed, thanks!<br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">-Daniel- wrote:<br>
><br>
> Hi all,<br>
><br>
> I want to read a 3D raw file (512x512x151) of a head with vtkImageReader.<br>
> But the result is a cube and this is wrong. It should be a 3D volume.<br>
> Please look at the attached picture.<br>
><br>
> information about this raw file:<br>
> 16bits unsigned<br>
> BigEndian<br>
> min 0 max 4096 (12 bits)<br>
> Dimensions: 512x512x151<br>
> voxel size: 0.4863 0.4863 1 (mm)<br>
><br>
> My java-code is following:<br>
> vtkImageReader reader = new vtkImageReader();<br>
> reader.SetFileName(file);<br>
> reader.SetFileDimensionality(3);<br>
> reader.SetDataExtent(0,511,0,511,0,150);<br>
> reader.SetDataSpacing(0.4863, 0.4863, 1);<br>
> reader.SetDataByteOrderToBigEndian();<br>
> reader.SetDataScalarTypeToUnsignedChar();<br>
> reader.Update();<br>
><br>
> vtkDataSetMapper map = new vtkDataSetMapper();<br>
> map.SetInputConnection(reader.GetOutputPort());<br>
><br>
><br>
> what's wrong in my code? and how I can create a volume?<br>
> thanks in advance,<br>
><br>
> Daniel<br>
><br>
> --<br>
> GMX FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss nur 17,95<br>
> Euro/mtl.!<br>
> <a href="http://dslspecial.gmx.de/freedsl-aktionspreis/?ac=OM.AD.PD003K11308T4569a" target="_blank">http://dslspecial.gmx.de/freedsl-aktionspreis/?ac=OM.AD.PD003K11308T4569a</a><br>
><br>
><br>
</div></div><div class="im">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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>
><br>
><br>
<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/3D-volume-problem-with-vtkImageReader-reading-RAW-file-tp23870080p23875911.html" target="_blank">http://www.nabble.com/3D-volume-problem-with-vtkImageReader-reading-RAW-file-tp23870080p23875911.html</a><br>
</font><div><div></div><div class="h5">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>
</div></div></blockquote></div><br>