Hey,
I am trying to create a plane with an origin/center set in the middle (ie. 0.5x_length, 0.5y_length).
I don’t have a problem creating a plane, playing around with set center and origin yield weird results, the only predictable setup is having origin and center set to 0 then i get that origin/center to be at the edge of the plane. ive tried all kinds of combination of values but doesnt seem to work. any suggestions?
tangential_plane = vtk.vtkPlaneSource()
tangential_plane.SetCenter(0,0,0)
tangential_plane.SetOrigin(0,0,0)
tangential_plane.SetNormal(1,0,0)
tangential_plane.SetPoint1(20.0, 0.0, 0.0)
tangential_plane.SetPoint2(0.0,34.0, 0.0)
tangential_plane.SetXResolution(1)
tangential_plane.SetYResolution(1)
tangential_plane_node = slicer.modules.models.logic().AddModel(tangential_plane.GetOutputPort())
tangential_plane_node.SetName(“tangential_plane”)
tangential_plane_node.GetDisplayNode().SetColor(255,255,0)
#tangential_plane_node.GetDisplayNode().SetOpacity(1.0)
tangential_plane_node.GetDisplayNode().SetSliceIntersectionVisibility(True)
tangential_plane_node.GetDisplayNode().SetSliceIntersectionThickness(2)transform = slicer.vtkMRMLTransformNode()
transform.SetName(“tangential_plane”+‘_trans’)
slicer.mrmlScene.AddNode(transform)
tangential_plane_node.SetAndObserveTransformNodeID(transform.GetID())
thanks