How to change the name of a folder in the subject hierarchy

I want to change the name of a folder in the Subject hierarchy in the ‘Data’ module.

I tried using SetItemName() like this:
subject_hierarchy_node.SetItemName(296, 'new_name')
but this only changed the name in the ‘Subject hierarchy item information’ and not in the folder name in the hierarchy tree.

Here you can see that I wanted to change the name of the ‘NewFolder’ folder to ‘new_name’ but the name ‘NewFolder’ did not change:
image

Slicer 5.10-2022-05-08 MacOS

I just checked and this call works for me in Slicer 5.1 on Windows. I call shNode.SetItemName(18, 'NewName') and NewName appears in the tree.

Can someone else using MacOS try it?

1 Like

This should work well. Could your provide the complete list of steps that reproduces the issue? (start Slicer, go to Data module, right-click on…)

1 Like

I tried it again today and it worked - maybe I have made a mistake before that I didn’t realise. Thanks for your responses!

1 Like