<html><div style='background-color:'><DIV>Hi, </DIV>
<DIV> </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> </DIV>
<DIV> isosurfaceBounds[0] -69.7140<BR> hullBounds[0] -88.5630<BR> <BR> isosurfaceBounds[1] 73.5724<BR> hullBounds[1] 84.0858<BR> <BR> isosurfaceBounds[2] -68.9686<BR> hullBounds[2] -68.9686<BR> <BR> isosurfaceBounds[3] 94.0632<BR> hullBounds[3] 94.0632<BR> <BR> isosurfaceBounds[4] -58.7823<BR> hullBounds[4] -65.2978<BR> <BR> isosurfaceBounds[5] 64.5568<BR> hullBounds[5] 64.5568</DIV>
<DIV> </DIV>
<DIV>Is this a bug. Or am I not using vtkHull correctly?</DIV>
<DIV> </DIV>
<DIV>Any insight would be most appreciated.</DIV>
<DIV> </DIV>
<DIV>Thanks.</DIV>
<DIV> </DIV>
<DIV>Regards, </DIV>
<DIV> </DIV>
<DIV>Audrius</DIV>
<DIV> </DIV>
<DIV>================================</DIV>
<DIV> </DIV>
<DIV>The relevant code fragment follows:</DIV>
<DIV> </DIV>
<DIV> isosurfacePolyData->Update();<BR> isosurfacePolyData->ComputeBounds();<BR> isosurfacePolyData->GetBounds( isosurfaceBounds );</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> vtkHull *isosurfaceBoundsBox = vtkHull::New();<BR> isosurfaceBoundsBox->SetInput( isosurfacePolyData);</DIV>
<DIV> float boundingPlaneNormal[_3D];</DIV>
<DIV> </DIV>
<DIV> <A href="file://-----Left">///---Left</A> plane</DIV>
<DIV> </DIV>
<DIV> boundingPlaneNormal[0] = -1.0;<BR> boundingPlaneNormal[1] = 0.0;<BR> boundingPlaneNormal[2] = 0.0;</DIV>
<DIV> </DIV>
<DIV> int testReturn = isosurfaceBoundsBox->AddPlane( boundingPlaneNormal); </DIV>
<DIV> </DIV>
<DIV> <A href="file://-----Right">///-----Right</A> plane</DIV>
<DIV> </DIV>
<DIV> boundingPlaneNormal[0] = 1.0;<BR> boundingPlaneNormal[1] = 0.0;<BR> boundingPlaneNormal[2] = 0.0;</DIV>
<DIV> testReturn = isosurfaceBoundsBox->AddPlane( boundingPlaneNormal); </DIV>
<DIV> </DIV>
<DIV><A href="file://-----Anterior"><FONT color=#000000>///</FONT>-----Anterior</A> plane</DIV>
<DIV> </DIV>
<DIV> boundingPlaneNormal[0] = 0.0;<BR> boundingPlaneNormal[1] = 1.0;<BR> boundingPlaneNormal[2] = 0.0;</DIV>
<DIV> </DIV>
<DIV> testReturn = isosurfaceBoundsBox->AddPlane( boundingPlaneNormal); </DIV>
<DIV> </DIV>
<DIV><A href="file://-----Posterior"><FONT color=#000000>///</FONT>-----Posterior</A> plane</DIV>
<DIV> </DIV>
<DIV> boundingPlaneNormal[0] = 0.0;<BR> boundingPlaneNormal[1] = -1.0;<BR> boundingPlaneNormal[2] = 0.0;</DIV>
<DIV> </DIV>
<DIV> testReturn = isosurfaceBoundsBox->AddPlane( boundingPlaneNormal); </DIV>
<DIV> </DIV>
<DIV><A href="file://-----Inferior"><FONT color=#000000>///</FONT>-----Inferior</A> plane</DIV>
<DIV> </DIV>
<DIV> boundingPlaneNormal[0] = 0.0;<BR> boundingPlaneNormal[1] = 0.0;<BR> boundingPlaneNormal[2] = -1.0;</DIV>
<DIV> </DIV>
<DIV> testReturn = isosurfaceBoundsBox->AddPlane( boundingPlaneNormal);</DIV>
<DIV> </DIV>
<DIV> <A href="file://-----Superior">///-----Superior</A> plane</DIV>
<DIV> </DIV>
<DIV> boundingPlaneNormal[0] = 0.0;<BR> boundingPlaneNormal[1] = 0.0;<BR> boundingPlaneNormal[2] = 1.0;</DIV>
<DIV> </DIV>
<DIV> testReturn = isosurfaceBoundsBox->AddPlane( boundingPlane); </DIV>
<DIV> </DIV>
<DIV> isosurfaceBoundsBox->Update();</DIV>
<DIV> int nPlanes = isosurfaceBoundsBox->GetNumberOfPlanes();<BR> <BR> float hullBounds[_3DBounds];</DIV>
<DIV> isosurfaceBoundsBox->GetOutput()->ComputeBounds();<BR> isosurfaceBoundsBox->GetOutput()->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>