[vtkusers] spheres drawn onto an image

Scott Johnson Scott.Johnson at neuwave.com
Thu May 27 16:43:44 EDT 2010


Hi Doug,

 

I've recently been dealing with the same kind of thing.  I ended up with
a pipeline which looks something like:

 

vtkSphereSource->vtkCutter->vtkTransformPolyDataFilter->vtkPolyDataMappe
r->vtkActor

                                                 ^
^

                                                 |
|

                                        vtkPlane
vtkMatrixToLinearTransform

 

The matrix assigned to vtkMatrixToLinearTransform should be the Inverse
of the matrix in the vtkImageReslice.  The vtkPlane should be in the
same orientation and position as the vtkImageReslice.  The normal to the
plane is the cross product of the X and Y direction cosines of the
vtkImageReslice.

 

This will work for a single sphere, I'm not sure if you'll need the same
pipeline for each sphere.

 

Good Luck.

 

                                -- Scott

 

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
Behalf Of Doug Hoppes
Sent: Thursday, May 27, 2010 2:40 PM
To: vtkusers at vtk.org
Subject: [vtkusers] spheres drawn onto an image

 

Hi all,

 

                I'm trying to figure out the best way to solve this
problem:  I have an image volume (say 1000 x 1000 x 200).  In that
volume, I have random spheres placed.  I would like to get any image
slice (I'm using the vtkImageReslice to grab the images slices)  with
the sphere image imprinted on the image slice. 

 

      For example, say that I'm moving down through the Z plane and
there are 5 blue spheres in my volume.  I would like to see blue circles
on different image slices (depending on what spheres interact with which
plane).  Does this make sense?

 

Doug

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100527/e68e0cbe/attachment.htm>


More information about the vtkusers mailing list