<html>
<body>
Hi Deepak,<br><br>
You could try appending your two vtkPolyDatas together using the
vtkAppendPolyData filter, and then run the vtkMassProperties on the
output of the vtkAppendPolyData filter. There is a method in
vtkMassProperties called GetVolume that appears to do what you
want.<br><br>
You do need to make sure that your data sets are composed only of
triangles before running vtkMassProperties. From
vtkMassProperties.h:<br><br>
// Currently only triangles are processed. Use vtkTriangleFilter to<br>
// convert any strips or polygons to triangles.<br><br>
So, actually you need a vtkTriangleFilter before vtkMassProperties and
after vtkAppendPolyData.<br><br>
- Amy<br><br>
At 06:45 PM 11/16/2005, Deepak Roy wrote:<br>
<blockquote type=cite class=cite cite="">I have two open surfaces in the
form of vtkPolyData. I want to find the volume enclosed between them.
Does anyone know how to do this ?<br>
&nbsp;<br>
For example, consider two open surfaces <br>
&nbsp;<br>
1. a hemisphere<br>
&nbsp;<br>
2. a square shaped plane sheet.<br>
&nbsp;<br>
&nbsp;<br>
Now if i place the hemispherical surface on the plane sheet with the
plane sheet acting as a base for the hemispherical surface.<br>
&nbsp;<br>
Now we have a hemispherical volume enclosed between the two surfaces.
<br>
&nbsp;<br>
The question is how can i find this volume in VTK ?<br>
&nbsp;<br>
I have an idea to do this in opengl:<br>
&nbsp;
<ol>
<li>I will first render the plane sheet to an offscreen buffer. Then i
will read the z-values&nbsp; or the in other words the depth values from
the z-buffer. 
<li>I will then render t! he hemipsherical surface to the offscreen
buffer and read the depth values again. 
<li>Then the difference between these two depth maps gives the volume
enclosed between the two surfaces.
</ol>I did not find features in VTK to do this.....<br>
&nbsp;<br>
Does anyone know a better way to calculate the volume than this ?<br>
&nbsp;<br>
Please help !!!!!!<br>
&nbsp;<br>
Thanks in advance !!!!<br>
&nbsp;<br>
Regards,<br>
&nbsp;<br>
Deepak Roy<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br><br>
<br>
<a href="http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/">
Yahoo! FareChase - Search multiple travel sites in one click.</a> <br>
_______________________________________________<br>
This is the private VTK discussion list. <br>
Please keep messages on-topic. Check the FAQ at:
<a href="http://www.vtk.org/Wiki/VTK_FAQ" eudora="autourl">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" eudora="autourl">
http://www.vtk.org/mailman/listinfo/vtkusers</a></blockquote></body>
</html>