[vtkusers] polydata cell blanking

Dean Inglis dean.inglis at camris.ca
Thu Mar 15 10:02:18 EDT 2007


I have written a vtk widget that does a transparent 
overlay with some line segments defining an in/out of 
bounds region for image cropping, similar to what 
is done in VolView.  The widget is made up of 16 points:

11--1--3--10
|   |  |   |
6---15-14--7
|   |  |   |
2---12-13--5
|   |  |   |
8---0--2---9

so that 2 vertical lines are defined by 0-1, 2-3,
2 horizontal lines by 2-5, 6-7, and the
cropped region by 8 polygon cells defined by
8-0-12-2, 2-12-15-6 etc.  The widget is overlaid
on a vtkImageActor such that for 3D images, when 
scrolling through the image, if a slice is out
of bounds in the out of plane direction and additional
cell 12-13-14-15 needs to become part of the cropped
region.  There are a few ways to tackle this:
1) check for out of plane bounds inclusion and
completely redefine the polydata from 8 cells to
1 large cell: i.e., 8-9-10-11
2) maintain a separate actor for the cell 8-9-10-11
and control its visibility
3) maintain a 9 polygon cell but blank cell 12-13-14-15
on or off

I am interested in 3) and am asking if vtkPolyData
methods such as AddCellReference/RemoveCellReference
(or others) would do this or is there a filter(s) that can do this?

thanks,
Dean



More information about the vtkusers mailing list