<html><div style='background-color:'><DIV>Hi, </DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm trying to use vtkHull to enclose an isosurface in its bounding box.</DIV>
<DIV>I'd expect the bounds of the vtkHull object to correspond to those</DIV>
<DIV>of the isosurface bounding box. In the following, they don't agree</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;isosurfaceBounds[0]&nbsp;-69.7140<BR>&nbsp;hullBounds[0]&nbsp;-88.5630<BR>&nbsp;<BR>&nbsp;isosurfaceBounds[1]&nbsp;73.5724<BR>&nbsp;hullBounds[1]&nbsp;84.0858<BR>&nbsp;<BR>&nbsp;isosurfaceBounds[2]&nbsp;-68.9686<BR>&nbsp;hullBounds[2]&nbsp;-68.9686<BR>&nbsp;<BR>&nbsp;isosurfaceBounds[3]&nbsp;94.0632<BR>&nbsp;hullBounds[3]&nbsp;94.0632<BR>&nbsp;<BR>&nbsp;isosurfaceBounds[4]&nbsp;-58.7823<BR>&nbsp;hullBounds[4]&nbsp;-65.2978<BR>&nbsp;<BR>&nbsp;isosurfaceBounds[5]&nbsp;64.5568<BR>&nbsp;hullBounds[5]&nbsp;64.5568</DIV>
<DIV>&nbsp;</DIV>
<DIV>Is this a bug. Or am I not using vtkHull correctly?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any insight would be most appreciated.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards, </DIV>
<DIV>&nbsp;</DIV>
<DIV>Audrius</DIV>
<DIV>&nbsp;</DIV>
<DIV>================================</DIV>
<DIV>&nbsp;</DIV>
<DIV>The relevant code fragment follows:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;isosurfacePolyData-&gt;Update();<BR>&nbsp;isosurfacePolyData-&gt;ComputeBounds();<BR>&nbsp;isosurfacePolyData-&gt;GetBounds( isosurfaceBounds );</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;vtkHull *isosurfaceBoundsBox = vtkHull::New();<BR>&nbsp;isosurfaceBoundsBox-&gt;SetInput( isosurfacePolyData);</DIV>
<DIV>&nbsp;float boundingPlaneNormal[_3D];</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;<A href="file://-----Left">///---Left</A> plane</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;boundingPlaneNormal[0] = -1.0;<BR>&nbsp;boundingPlaneNormal[1] =&nbsp; 0.0;<BR>&nbsp;boundingPlaneNormal[2] =&nbsp; 0.0;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;int testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlaneNormal); </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;<A href="file://-----Right">///-----Right</A> plane</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;boundingPlaneNormal[0] = 1.0;<BR>&nbsp;boundingPlaneNormal[1] = 0.0;<BR>&nbsp;boundingPlaneNormal[2] = 0.0;</DIV>
<DIV>&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlaneNormal); </DIV>
<DIV>&nbsp;</DIV>
<DIV><A href="file://-----Anterior"><FONT color=#000000>///</FONT>-----Anterior</A> plane</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;boundingPlaneNormal[0] = 0.0;<BR>&nbsp;boundingPlaneNormal[1] = 1.0;<BR>&nbsp;boundingPlaneNormal[2] = 0.0;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlaneNormal); </DIV>
<DIV>&nbsp;</DIV>
<DIV><A href="file://-----Posterior"><FONT color=#000000>///</FONT>-----Posterior</A> plane</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;boundingPlaneNormal[0] =&nbsp; 0.0;<BR>&nbsp;boundingPlaneNormal[1] = -1.0;<BR>&nbsp;boundingPlaneNormal[2] =&nbsp; 0.0;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlaneNormal); </DIV>
<DIV>&nbsp;</DIV>
<DIV><A href="file://-----Inferior"><FONT color=#000000>///</FONT>-----Inferior</A> plane</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;boundingPlaneNormal[0] =&nbsp; 0.0;<BR>&nbsp;boundingPlaneNormal[1] =&nbsp; 0.0;<BR>&nbsp;boundingPlaneNormal[2] = -1.0;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlaneNormal);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;<A href="file://-----Superior">///-----Superior</A> plane</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;boundingPlaneNormal[0] = 0.0;<BR>&nbsp;boundingPlaneNormal[1] = 0.0;<BR>&nbsp;boundingPlaneNormal[2] = 1.0;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;testReturn = isosurfaceBoundsBox-&gt;AddPlane( boundingPlane); </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;isosurfaceBoundsBox-&gt;Update();</DIV>
<DIV>&nbsp;int nPlanes = isosurfaceBoundsBox-&gt;GetNumberOfPlanes();<BR>&nbsp;<BR>&nbsp;float hullBounds[_3DBounds];</DIV>
<DIV>&nbsp;isosurfaceBoundsBox-&gt;GetOutput()-&gt;ComputeBounds();<BR>&nbsp;isosurfaceBoundsBox-&gt;GetOutput()-&gt;GetBounds( hullBounds);<BR></DIV></div><br clear=all><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><br></html>