A user gives me a vtkMRMLMarkupsCurveNode (or something similar such as a closed curve). For each of several user-supplied points on the curve (though not necessarily control points), I want to store a camera orientation.
- I can specify a user-supplied
locationalong the curve by its world coordinates (3 floating-point numbers) or I could boil it down to a distance along the user’s supplied curve (1 floating-point number). - I can specify the
orientationfor a location as (angle, axis_x, axis_y, axis_z) or a quaternion (also four floating point numbers), or a 3×3 matrix (which could be a numpy array or vtk.vtkMatrix3x3).
How do I associate several (location, orientation) pairs with the user’s supplied vtkMRMLMarkupsCurveNode? One way I see: create a second vtkMRMLMarkupsCurveNode
- Somehow make the second
vtkMRMLMarkupsCurveNodesubservient to the first one – in a way that it would be saved or loaded each time the save or load operation is applied to the firstvtkMRMLMarkupsCurveNode. What’s the best way to associate these? - Set the control points of this subservient
vtkMRMLMarkupsCurveNodeto be the points where the user has supplied camera orientations. - Use the subservient
vtkMRMLMarkupsCurveNode’s methodSetNthControlPointOrientationto set the corresponding user-supplied orientation for each of these control points.
Is this the best way to do this? I looked at the vtkMRMLMarkupsCurveNode.SetMeasurement method, but I don’t see how to make the key of a supplied measurement be a 3-dimensional world coordinate position, nor do I see how to make a value of a supplied measurement be an orientation (4-dimensional or 3×3-dimensional).
Thanks!