[vtkusers] some questions about example Imagereslicing.cxx

晓彦 隽晓彦 juanxiaoyan at hotmail.com
Tue Oct 26 22:16:16 EDT 2010


   i find the value of SetDataSpacing is not used when read the 2D CT images using vtkImageReader2, but i want to read 2D CT images as 3D according to value of SetDataSpacing in order to extract a interpolated slice in desired orientation. i wonder it can be implemented? i will appreciate any answer from you. thank you.
 
some program of the example is as follows:
 vtkImageReader2 *reader = vtkImageReader2::New();
  reader->SetFilePrefix(argv[1]);
  reader->SetDataExtent(0, 63, 0, 63, 1, 93);
  reader->SetDataSpacing(3.2, 3.2, 1.5);
  reader->SetDataOrigin(0.0, 0.0, 0.0);
  reader->SetDataScalarTypeToUnsignedShort();
  reader->UpdateWholeExtent();
 
 
  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101027/fd1c501c/attachment.htm>


More information about the vtkusers mailing list