For example, I created an arrow and I want to modify the scale and the orientation.
For the orientation I can use (before the actor creation) the vtkArrowSource “InvertOn” method, and for the scale the vtkGlyph3D “SetScaleFactor” method. But I don’t know if it’s possible to access to this method after the actor creation. I tried in many ways but I couldn’t do it.
def create_arrow():
arrowSource = vtk.vtkArrowSource()
arrowSource.InvertOn()
glyph3D = vtk.vtkGlyph3D()
glyph3D.SetSourceConnection(arrowSource.GetOutputPort())
glyph3D.SetVectorModeToUseNormal()
glyph3D.SetInputData(centro.GetOutput())
glyph3D.SetScaleFactor(7)
glyph3D.OrientOn()
glyph3D.Update()
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(glyph3D.GetOutputPort())
actor = vtk.vtkActor()
actor.SetMapper(mapper)
return actor