Hi, all vtkusers<br>I want to read one 3D raw file with vtkImageReader as following:<br>reader = vtkImageReader() reader.SetFileDimensionality(3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # all the slices are in one file reader.SetFileName(&quot;
myfile.raw&quot;) <br>reader.SetNumberOfScalarComponents(1)&nbsp; # image is greyscale reader.SetDataScalarTypeToShort()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 2 bytes per voxel <br>reader.SetDataExtent(0,255, 0,255, 0,119)&nbsp; # 256 x 256 x 120 slices <br>
reader.SetDataSpacing(1.0, 1.0, 1.6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # voxel spacing <br>reader.SetDataOrigin(0.0, 0.0, 0.0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # set to zero unless you know<br><br>the &quot;myfiel.raw&quot; is a nerve cell, but the rendering tesult has 4 small instance but not one int the rendering window(please see the attached picture). why? and who can tell me how to read the one 3D raw data?
<br>Thanks.<br clear="all"><br>-- <br>veelion