I am not being able to recover the ID of the parent directory of a node. I am using:
subjectHierarchyNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
dirID = subjectHierarchyNode.CreateFolderItem(subjectHierarchyNode.GetSceneItemID(), 'test folder') # this returns the value 10
Then I move a volume to the test folder, using the Data module, and execute:
childID = subjectHierarchyNode.GetItemByDataNode(slicer.util.getNode('test node'))
subjectHierarchyNode.GetItemParent(subjectHierarchyNode.GetItemParent(childID))
But the result is 3 instead of ID 10 of the directory. What am I doing wrong? Thank you!