21 CoordType = itk.ctype(
'float')
23 if platform.system() ==
'Windows':
24 ElementIdentifierType = itk.ctype(
'unsigned long long')
26 ElementIdentifierType = itk.ctype(
'unsigned long')
30 PointSetType =
itk.PointSet[CoordType, Dimension, MeshTraits]
32 pointSet = PointSetType.New()
33 points = pointSet.GetPoints()
50 points.InsertElement(0, p0)
51 points.InsertElement(1, p1)
52 points.InsertElement(2, p2)
57 Dimension, CoordType, VecContType]
59 boundingBox = BoundingBoxType.New()
60 boundingBox.SetPoints(points)
61 boundingBox.ComputeBoundingBox()
63 print(
"bounds: " + str(boundingBox.GetBounds()))
64 print(
"center: " + str(boundingBox.GetCenter()))
65 print(
"diagonal length squared: " + str(boundingBox.GetDiagonalLength2()))