[vtkusers] Reslice extent off imagePlaneWidget
Dean Inglis
dean.inglis at sympatico.ca
Sun Oct 18 12:12:03 EDT 2009
Hi Michael,
have a look at the code for the class method UpdatePlane starting
at line 1528 in vtkImagePlaneWidget.cxx . The widget is controlling its
ivar vtkImageReslice to use power of 2 extents for efficient texture
mapping of the reslice output onto a plane. The pipeline is basically:
vtkImageData -> vtkImageReslice ->|
|->
vtkImageMapToColors -> vtkTexture ->|
vtkLookupTable ->|
|-> vtkActor
vtkPlaneSource ->
vtkPolyDataMapper ->|
Dean
www.camris.ca
In pyVTK, I'm slicing through a dataset using vtkImagePlaneWidget then
pulling the imageData off it via getResliceOutput. Now, I'd expect the size
of the imageData that comes off it to be proportional to the size of the
widget across that dimension, no? That doesn't seem to be the case; rather
it seems to round up to powers of two. Dimensions of 2 and 3 on the plane go
to extent of 16, 4-7 extent 32, 8-15 extent 64, etcetera. Obvious pattern
there. Now, I can see why it might do that if I'd pulled the texture off the
widget, since I believe OpenGL used to require powers of two, but surely the
direct reslice outut should be proportional to the widget size? Can anyone
tell me what's going on here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091018/18ffec8d/attachment.htm>
More information about the vtkusers
mailing list