Hi,
My understanding about markups is pretty limited and I don’t have much experience yet.
From C++ I need to visualize points of constant size regardless of the zoom.
Probably it would be pretty nice if every point could have its name and multiple points are set in the list with the ability to add/delete points.
Also the points must be undraggable by user (locked).
I think I could try to use markups especially vtkMRMLMarkupsNode
with LockedOn()
method enabled. I have made some attempts to avoid using vtkMRMLMarkupsModuleLogic
and instead I linked to vtkSlicerMarkupsModuleMRML
. The code that I used:
vtkNew<vtkMRMLMarkupsNode> mNode;
mNode->SetCenterPosition(0, 0 0);
mNode->LockedOn();
this->GetMRMLScene()->AddNode(mNode);
mNode->CreateDefaultDisplayNodes();
but the application has broken when I triggered this function.
Do I need to use markups logic instead? Or something like:
vtkSmartPointr<vtkMRMLMarkupsNode> mNode =
vtkMRMLMarkupsNode::SafeDownCast(
this->GetMRMLScene()->AddNewNodeByClass("vtkMRMLMarkupsNode"));
Appreciate for advice.