[vtkusers] Quantifying the Intersection of two Volumes
David E. Jones
jonesde at rainbow.es.dupont.com
Thu Mar 28 15:24:00 EST 2002
Erik Sobel wrote:
> Does anyone have an example of how to measure the volume produced by the
> intersection (overlap) of two volumes?
>
> Thanks,
> Erik
> ----------------------------------------------------------------------------------------------------------
> Erik Sobel
> esobel at alphatech.com
> ----------------------------------------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
I assume that you have only a polygonal surface to define the volumes.
1) If both volumes are convex you can actually calculate the surface defining
the intersection using vtkHull (I think it's vtkHull). vtkMassProperties
will calculate the volume for you.
2) For non-convex (or convex) volumes, the best approach to calculating the
volume of the intersection is to calculate the polygonal boundaries of the
intersections of the volumes with a set of planes and use the areas of the
polygons to integrate in 3D.
The intersection of the polygons in a plane is equivalent to the scan-conversion
algorithm for rendering polygons. (The is some code in Graphics Gems
which does this.) A really cool way to do it would be to draw the polygons
into an offscreen buffer using transparency using certain colors for the
polygonal interiors. The numbers of pixels with the appropriate blended color
measures the area of the intersection.
You don't really need to integrate. Just count the pixels in one of the
volumes and in the intesection in a series of planes. The ratio of these
pixel counts is a number < 1 which can the multiplied by the original
volume to get the intersection volume.
I yield to other people with another approach which is plausible.
I have dealt with related problems and don't know of a better way
to do this.
Dav
--
David E Jones
Du Pont Central Research
Experimental Station, Bldg 320
Wilmington, DE 19880-0320
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020328/a7fb793d/attachment.htm>
More information about the vtkusers
mailing list