Hi, I need to clone a markups node but I can’t find a way to do it. I know that for volumes there is (using python):
slicer.vtkSlicerVolumesLogic().CloneVolume()
I would like to know if there’s a similar method for markups, as I would like to make multiple copies of a set of markups and apply different transforms to them.
# Get a node from SampleData that we will clone
import SampleData
nodeToClone = SampleData.SampleDataLogic().downloadMRHead()
# Clone the node
shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
itemIDToClone = shNode.GetItemByDataNode(nodeToClone)
clonedItemID = slicer.modules.subjecthierarchy.logic().CloneSubjectHierarchyItem(shNode, itemIDToClone)
clonedNode = shNode.GetItemDataNode(clonedItemID)