[vtkusers] clip one vtkPolyData with another?

Alle Meije Wink alle_meije at yahoo.co.uk
Tue Feb 21 04:11:22 EST 2006


Hi David,

Thanks a lot for these pointers!

>>I now have 2 scripts:
>>One script uses vtkCutter on the 3D data set. This makes it possible to
>>show the cutplanes with grey values. However, the edges of the cut-plane
>>are defined via grey value thresholding, resulting in a rough shape that
>>does not follow the iso-value. (1st attachment, result
>>http://www.wbic.cam.ac.uk/~amw71/SurfaceCut.png)
> 
> Did you try vtkImplicitSelectionLoop to clip the rough edges?

I can't see how I should do this. From the test code for
vtkImplicitSelectionLoop I saw that you can use it to extract a piece of
a surface (such as the isosurface), but what I would need is a piece of
the cut-plane

>>Another script has nicer cut-planes, where vtkCutter uses the planes and
>>the normals of the iso-surface (the clipcow way). The edges now look
>>much better, but I haven't managed to display the grey values on the
>>planes. I thought that this should be possible with vtkProbeFilter? I
>>tried this for one plane, but the only thing that shows up (very
>>vaguely) is a sort of inner contour (2nd attachment, result:
>>http://www.wbic.cam.ac.uk/~amw71/SurfaceCut2.png).
> 
> Perhaps there are not enough points on the cut surface to get decent
> resolution when probing? (render the cut plane in wireframe to see the
> sampling density you are using). If this is the problem you could try one
> of the subdivision filters eg vtkLinearSubdivisionFilter (2 or 3
> iterations) to generate more points on the plane before probing.

Ah. now this is true. When I do

eval [actorSag GetProperty] SetRepresentationToWireframe

and do not add the other actors (actorCor and actorAx) in the second
script, the lines span a number of triangles (many small ones near the
edges, larger ones in the centre). The very faint colour differences
that I saw may be the average probed colours in the triangles? I guess
it's one colour / triangle?

Would it be possible to probe the volume at the right resolution (ie,
the points in the volume) by increasing the number of points on the
plane? That would be the ideal case.

Thanks
Alle Meije

		
___________________________________________________________ 
Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/blackberry



More information about the vtkusers mailing list