<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>
<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>
<br>
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<br>
<br>
Is this a bug. Or am I not using vtkHull correctly?<br>
<br>
Any insight would be most appreciated.<br>
<br>
Thanks.<br>
<br>
Regards, <br>
<br>
Audrius<br>
<br>
================================<br>
<br>
The relevant code fragment follows:<br>
<br>
isosurfacePolyData->Update();<br>
isosurfacePolyData->ComputeBounds();<br>
isosurfacePolyData->GetBounds( isosurfaceBounds );<br>
<br>
<br>
vtkHull *isosurfaceBoundsBox = vtkHull::New();<br>
isosurfaceBoundsBox->SetInput( isosurfacePolyData);<br>
float boundingPlaneNormal[_3D];<br>
<br>
<a href="file://-----Left">///---Left</a> plane<br>
<br>
boundingPlaneNormal[0] = -1.0;<br>
boundingPlaneNormal[1] = 0.0;<br>
boundingPlaneNormal[2] = 0.0;<br>
<br>
int testReturn = isosurfaceBoundsBox->AddPlane(
boundingPlaneNormal); <br>
<br>
<a href="file://-----Right">///-----Right</a> plane<br>
<br>
boundingPlaneNormal[0] = 1.0;<br>
boundingPlaneNormal[1] = 0.0;<br>
boundingPlaneNormal[2] = 0.0;<br>
testReturn = isosurfaceBoundsBox->AddPlane(
boundingPlaneNormal); <br>
<br>
<a href="file://-----Anterior">///-----Anterior</a> plane<br>
<br>
boundingPlaneNormal[0] = 0.0;<br>
boundingPlaneNormal[1] = 1.0;<br>
boundingPlaneNormal[2] = 0.0;<br>
<br>
testReturn = isosurfaceBoundsBox->AddPlane(
boundingPlaneNormal); <br>
<br>
<a href="file://-----Posterior">///-----Posterior</a> plane<br>
<br>
boundingPlaneNormal[0] = 0.0;<br>
boundingPlaneNormal[1] = -1.0;<br>
boundingPlaneNormal[2] = 0.0;<br>
<br>
testReturn = isosurfaceBoundsBox->AddPlane(
boundingPlaneNormal); <br>
<br>
<a href="file://-----Inferior">///-----Inferior</a> plane<br>
<br>
boundingPlaneNormal[0] = 0.0;<br>
boundingPlaneNormal[1] = 0.0;<br>
boundingPlaneNormal[2] = -1.0;<br>
<br>
testReturn = isosurfaceBoundsBox->AddPlane(
boundingPlaneNormal);<br>
<br>
<a href="file://-----Superior">///-----Superior</a> plane<br>
<br>
boundingPlaneNormal[0] = 0.0;<br>
boundingPlaneNormal[1] = 0.0;<br>
boundingPlaneNormal[2] = 1.0;<br>
<br>
testReturn = isosurfaceBoundsBox->AddPlane( boundingPlane);
<br>
<br>
isosurfaceBoundsBox->Update();<br>
int nPlanes = isosurfaceBoundsBox->GetNumberOfPlanes();<br>
<br>
float hullBounds[_3DBounds];<br>
isosurfaceBoundsBox->GetOutput()->ComputeBounds();<br>
isosurfaceBoundsBox->GetOutput()->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>