Hi, dear all,<br><br>I want to read raw data(3D) which is skull.raw(128x128x69). I have tried vtkImageReader, but the result is wrong. my code is following:<br><br><br>vtkImageReader *RawReader = vtkImageReader::New();<br>
RawReader->SetFileDimensionality(3);<br> RawReader->SetFileName("skull.raw");<br> // RawReader->SetNumberOfScalarComponents(1);<br> RawReader->SetDataExtent(0, 127, 0, 127, 0, 68);
<br> RawReader->SetHeaderSize(headersize);<br> RawReader->SetDataByteOrderToLittleEndian();<br> RawReader->SetDataScalarTypeToUnsignedShort();<br>// RawReader->SetDataOrigin(0,0,0);
<br> RawReader->SetDataSpacing(spacing_x, spacing_y, spacing_z);<br> RawReader->Update();<br>and when it be run, it gived a warning:<br>Generic Warning: In E:\WorkSation\VtkWork\new_down_VTK\vtk-
5.0.0\IO\vtkImageReader.cxx, line 313<br>File operation failed. row = 0, Tried to Read = 256, Read = 0, Skip0 = -512, Skip1 = 65536, FilePos = 1146624<br><br>but the raw data had been read in to memery, but the rendering result is very wrong!!! the
skull.raw data is only a skull, but the rendering result of data read in my way(with vtkImageReader) is 4 small skull on a white cube. why?<br><br>who can help? Thanks<br>Best Regards<br clear="all"><br>-- <br>veelion