[vtkusers] problem with vtkImageReader reading raw data
Veelion Chong
veelion at gmail.com
Sun Apr 23 23:35:48 EDT 2006
Hi, all vtkusers
I want to read one 3D raw file with vtkImageReader as following:
reader = vtkImageReader() reader.SetFileDimensionality(3)
# all the slices are in one file reader.SetFileName("myfile.raw")
reader.SetNumberOfScalarComponents(1) # image is greyscale
reader.SetDataScalarTypeToShort() # 2 bytes per voxel
reader.SetDataExtent(0,255, 0,255, 0,119) # 256 x 256 x 120 slices
reader.SetDataSpacing(1.0, 1.0, 1.6) # voxel spacing
reader.SetDataOrigin(0.0, 0.0, 0.0) # set to zero unless you
know
the "myfiel.raw" 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?
Thanks.
--
veelion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060424/130a942f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4cells.JPG
Type: image/jpeg
Size: 17302 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060424/130a942f/attachment.jpeg>
More information about the vtkusers
mailing list