[vtkusers] How to SetDataOrigin when I use vtkImageReslice to getsagittal and coronal images?

Liang Ma leo at esit.com
Sat Apr 18 18:02:42 EDT 2009


Hi folks

It is me again. I got some progress. When I added the following sentence to realice2 and reslice3. Finally I can see part of the image in some slices. 

   reslice3->SetOutputExtent(0,255,0,255,0,255);
   reslice3->SetOutputSpacing(1, 1, 1);

It seems that the images are not on the center of the viewer. I guess the reson is wrong rotation origin. but I do not know how to set it. Also the output is not correct.

I will appreciate your help so much if you will give me a hand on following setting for a series of dicom files.

SetDataOrigin 
SetOutputSpacing
SetOutputExtent

Thanks.

Regards

Liang

  ----- Original Message ----- 
  From: Liang Ma 
  To: vtkusers at vtk.org 
  Sent: Saturday, April 18, 2009 4:17 PM
  Subject: [vtkusers] How to SetDataOrigin when I use vtkImageReslice to getsagittal and coronal images?


  Hi all,

  I want to get axial, sagittal and coronal images from a series of dicom files. And then get the 3D coordinate of a point in the image. Now I can see the axial image. But The sagittal and coronal images seem not correct. Most of them are black. I can only see a band on sagittal's bottom and coronal's left in few slices. 

  (1) I guess the reason is I did not use  SetDataOrigin function. I tried but do not know how to choose the parameters. And when I use  SetDataOrigin, the program become very slow.

  (2) In the sample program, a vtkVolume16Reader is created to read the Dicom files. I got a error:
  ERROR: In E:\vtk-5.0.3\IO\vtkVolume16Reader.cxx, line 384
  vtkVolume16Reader (0x023250E0): Error reading raw pgm data!
  So I use vtkDICOMImageReader to read the dicom images. Is it a problem?

  (3) Is there any other parameters to be set?

  Thanks

  Liang


------------------------------------------------------------------------------


  _______________________________________________
  Powered by www.kitware.com

  Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

  Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

  Follow this link to subscribe/unsubscribe:
  http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090418/0e29baf1/attachment.htm>


More information about the vtkusers mailing list