[vtkusers] 3D volume problem with vtkImageReader reading RAW file

-Daniel- dk-80 at gmx.de
Thu Jun 4 14:58:58 EDT 2009


Hello,

I wrote in my last message 
>     reader.SetDataScalarTypeToUnsignedChar();
but the raw format is "16bits unsigned". <Thanks burlen>
Therefore I changed this. 

But that won't solve my case. The result is a colorized cube.
Please look at the attached picture.
http://www.nabble.com/file/p23875872/snapshot_1.jpg snapshot_1.jpg 

Here is my code (modified) again:
        vtkImageReader reader = new vtkImageReader();
	reader.SetFileName(file);
	reader.SetFileDimensionality(3);
	reader.SetDataExtent(0,511,0,511,0,150);
	reader.SetDataSpacing(0.4863, 0.4863, 1);
	reader.SetDataByteOrderToBigEndian();
	reader.SetDataScalarTypeToUnsignedShort();
	reader.Update(); 

        vtkDataSetMapper map = new vtkDataSetMapper();
	map.SetInputConnection(reader.GetOutputPort());


Any ideas about a Solution is welcomed, thanks!


-- 
View this message in context: http://www.nabble.com/3D-volume-problem-with-vtkImageReader-reading-RAW-file-tp23875872p23875872.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list