<html>
Hello Audrius,<br>
<br>
Do they look incorrect visually? I am wondering if there is a stray point
or two in the output of the vtkHull that is causing the larger bounds. If
you pass an outline filter around both what do you see?<br>
<br>
Lisa<br>
<br>
<br>
At 11:00 PM 9/15/2001, Audrius Stundzia wrote:<br>
<blockquote type=cite class=cite cite>Hi, <br>
&nbsp;<br>
I'm trying to use vtkHull to enclose an isosurface in its bounding
box.<br>
I'd expect the bounds of the vtkHull object to correspond to those<br>
of the isosurface bounding box. In the following, they don't agree<br>
&nbsp;<br>
&nbsp;isosurfaceBounds[0] -69.7140<br>
&nbsp;hullBounds[0] -88.5630<br>
&nbsp;<br>
&nbsp;isosurfaceBounds[1] 73.5724<br>
&nbsp;hullBounds[1] 84.0858<br>
&nbsp;<br>
&nbsp;isosurfaceBounds[2] -68.9686<br>
&nbsp;hullBounds[2] -68.9686<br>
&nbsp;<br>
&nbsp;isosurfaceBounds[3] 94.0632<br>
&nbsp;hullBounds[3] 94.0632<br>
&nbsp;<br>
&nbsp;isosurfaceBounds[4] -58.7823<br>
&nbsp;hullBounds[4] -65.2978<br>
&nbsp;<br>
&nbsp;isosurfaceBounds[5] 64.5568<br>
&nbsp;hullBounds[5] 64.5568<br>
&nbsp;<br>
Is this a bug. Or am I not using vtkHull correctly?<br>
&nbsp;<br>
Any insight would be most appreciated.<br>
&nbsp;<br>
Thanks.<br>
&nbsp;<br>
Regards, <br>
&nbsp;<br>
Audrius<br>
&nbsp;<br>
================================<br>
&nbsp;<br>
The relevant code fragment follows:<br>
&nbsp;<br>
&nbsp;isosurfacePolyData-&gt;Update();<br>
&nbsp;isosurfacePolyData-&gt;ComputeBounds();<br>
&nbsp;isosurfacePolyData-&gt;GetBounds( isosurfaceBounds );<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;vtkHull *isosurfaceBoundsBox = vtkHull::New();<br>
&nbsp;isosurfaceBoundsBox-&gt;SetInput( isosurfacePolyData);<br>
&nbsp;float boundingPlaneNormal[_3D];<br>
&nbsp;<br>
&nbsp;<a href="file://-----Left">///---Left</a> plane<br>
&nbsp;<br>
&nbsp;boundingPlaneNormal[0] = -1.0;<br>
&nbsp;boundingPlaneNormal[1] =&nbsp; 0.0;<br>
&nbsp;boundingPlaneNormal[2] =&nbsp; 0.0;<br>
&nbsp;<br>
&nbsp;int testReturn = isosurfaceBoundsBox-&gt;AddPlane(
boundingPlaneNormal); <br>
&nbsp;<br>
&nbsp;<a href="file://-----Right">///-----Right</a> plane<br>
&nbsp;<br>
&nbsp;boundingPlaneNormal[0] = 1.0;<br>
&nbsp;boundingPlaneNormal[1] = 0.0;<br>
&nbsp;boundingPlaneNormal[2] = 0.0;<br>
&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane(
boundingPlaneNormal); <br>
&nbsp;<br>
<a href="file://-----Anterior">///-----Anterior</a> plane<br>
&nbsp;<br>
&nbsp;boundingPlaneNormal[0] = 0.0;<br>
&nbsp;boundingPlaneNormal[1] = 1.0;<br>
&nbsp;boundingPlaneNormal[2] = 0.0;<br>
&nbsp;<br>
&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane(
boundingPlaneNormal); <br>
&nbsp;<br>
<a href="file://-----Posterior">///-----Posterior</a> plane<br>
&nbsp;<br>
&nbsp;boundingPlaneNormal[0] =&nbsp; 0.0;<br>
&nbsp;boundingPlaneNormal[1] = -1.0;<br>
&nbsp;boundingPlaneNormal[2] =&nbsp; 0.0;<br>
&nbsp;<br>
&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane(
boundingPlaneNormal); <br>
&nbsp;<br>
<a href="file://-----Inferior">///-----Inferior</a> plane<br>
&nbsp;<br>
&nbsp;boundingPlaneNormal[0] =&nbsp; 0.0;<br>
&nbsp;boundingPlaneNormal[1] =&nbsp; 0.0;<br>
&nbsp;boundingPlaneNormal[2] = -1.0;<br>
&nbsp;<br>
&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane(
boundingPlaneNormal);<br>
&nbsp;<br>
&nbsp;<a href="file://-----Superior">///-----Superior</a> plane<br>
&nbsp;<br>
&nbsp;boundingPlaneNormal[0] = 0.0;<br>
&nbsp;boundingPlaneNormal[1] = 0.0;<br>
&nbsp;boundingPlaneNormal[2] = 1.0;<br>
&nbsp;<br>
&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlane);
<br>
&nbsp;<br>
&nbsp;isosurfaceBoundsBox-&gt;Update();<br>
&nbsp;int nPlanes = isosurfaceBoundsBox-&gt;GetNumberOfPlanes();<br>
&nbsp;<br>
&nbsp;float hullBounds[_3DBounds];<br>
&nbsp;isosurfaceBoundsBox-&gt;GetOutput()-&gt;ComputeBounds();<br>
&nbsp;isosurfaceBoundsBox-&gt;GetOutput()-&gt;GetBounds(
hullBounds);<br>
<br>
<hr>
Get your FREE download of MSN Explorer at
<a href="'http://go.msn.com/bql/hmtag_itl_en.asp'">http://explorer.msn.com</a></blockquote></html>