[vtkusers] Where's my Reslice?

Scott Johnson Scott.Johnson at neuwave.com
Wed Apr 28 14:32:28 EDT 2010


Thanks Eric.

That's what I'm trying to do, and your approach seems very similar to
mine.  But I'm not seeing the plane.  At this point I'm looking to use
it as a debugging tool to figure out exactly where the plane is located.
At this point I'm dumping coordinates and trying to see if they are in
the right range.

I'll keep poking at it.

		-- Scott

-----Original Message-----
From: Eric E. Monson [mailto:emonson at cs.duke.edu] 
Sent: Wednesday, April 28, 2010 12:59 PM
To: Scott Johnson
Cc: VTK Mailing List
Subject: Re: [vtkusers] Where's my Reslice?

Hey Scott,

Well, you're starting to get out of my experience range here with
combining volume rendering and other geometry, plus I'm not a core
developer, so hopefully someone higher up will think about your ideas of
creating more similar APIs for these classes.

As a test I was able to take what I think might be a MIP volume
rendering example (vtk/Examples/VolumeRendering/Python/SimpleRayCast.py)
and add a plane using basically the pipeline you mentioned. After the
reader I added:

reader.Update()
(xmin,xmax,ymin,ymax,zmin,zmax) = reader.GetOutput().GetBounds() plane =
vtk.vtkPlaneSource() plane.SetOrigin((xmin-5, ymin-5, zmax/2))
plane.SetPoint1((xmax+5, ymin-5, zmax/2)) plane.SetPoint2((xmin-5,
ymax+5, zmax/2))

mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(plane.GetOutputPort(0))
actor = vtk.vtkActor()
actor.SetMapper(mapper)

and then later on just added:

ren.AddActor(actor)

and it seemed to work. I'll attach a small screen shot. If this isn't
what you're trying to do, then someone else might have to chime in with
ideas.

Good luck,
-Eric




More information about the vtkusers mailing list