ITK
ITK copied to clipboard
TubeSpatialObject bounding box includes rounded ends even after they are turned off
Description
The bounding box for TubeSpatialObject always includes rounded ends.
Steps to Reproduce
tso = itk.TubeSpatialObject.x3.New()
tso.SetEndRounded(False)
for z in (-1, 1):
tsop = itk.TubeSpatialObjectPoint.x3()
tsop.SetPositionInObjectSpace((0, 0, z))
tsop.SetRadiusInObjectSpace(1)
tso.AddPoint(tsop)
tso.Update()
bbox = tso.GetMyBoundingBoxInWorldSpace()
print(bbox.GetMinimum(), bbox.GetMaximum())
Expected behavior
itkPointD3 ([-1, -1, -1]) itkPointD3 ([1, 1, 1])
Actual behavior
itkPointD3 ([-1, -1, -2]) itkPointD3 ([1, 1, 2])
The results do not change when EndRounded is toggled, though they should. Moreover, the bounding box extent in z increases when RadiusInObjectSpace is increased, which should only be expected when EndRounded is True.
Reproducibility
Happens every time.
Versions
Tested on v5.3 and v5.4rc4.