Save subject hierarchy

Hello,

I am trying to save the subject hierarchy

. The problem is, when I use the normal save command, it does not save the organization as I have it now.

Do I need to do something different in order to preserve the organization?

Thanks,

Tracy

Subject hierarchy is saved in the scene file (.mrml) which is an XML file that can be parsed quote easily. You can also write a short Python script that iterates through the subject hierarchy node and writes it into any format you prefer.

Are you saying it doesn’t reload in Slicer the way you saved it? It’s should. Or are you saying you want to access the hierarchy from external software?

Hi Sir,

When I open up the .mrml file many of the .vtk models do not open up in the folders I put them into.

This is why I thought I was doing something wrong.

Thanks,

Tracy

Hi Mr. Pieper,

Thank you for your reply.

Yes. It does not reload into Slicer the way that I thought it would, based on the Subject hierarchy that I have.

I want to get this working right in Slicer before I do anything else.

Thanks,

Tracy

Hello,

If anyone is curious they can go to my filemail link below and download a zip file of may’s files. The link will stop working Oct 17 2019.

Link to scene data.

Thanks,
Tracy

Which Slicer version did you use to save the scene?
Did you make a model hierarchy in the Models module, or folders in Data module / Subject hierarchy?

Please note that I basically reimplemented the way folders work with models, which includes an updated model hierarchy import from scene. This should be integrated in Slicer tonight or tomorrow, so it will be in Friday’s preview version. I’ll try to load your scene tomorrow and let you know if it’s different from your screenshot.

I tried to load the scene in the latest version, I got a good-looking hierarchy. Please download the preview version tomorrow and try with that.

Hi Pinter,

I downloaded and installed the preview version and while I greatly appreciate your work unfortunately the preview version has other problems for me.

Here are a few of the abnormalities in the preview version.

  1. It has duplicate instances of the same model. Both instances have the same MRML ID.
  2. One instance, I can rename the other instance I cannot rename.
  3. If I try to delete one instance the geometry is deleted from the scene but the other instance remains (sometimes).

Sorry about the bad news. I am sure you and the Slicer team will eventually get it right.

Thanks,

Tracy

@cpinter asked you to download the preview version tomorrow or later. Today’s version does not contain any of his fixes.

1 Like

Yes, please try it today (here’s the MacOS link). After integrating someone it takes one night for the changes to appear in the downloaded installer.

If you find any errors in today’s preview or later, don’t hesitate to report it. It’s still fresh, so I’m happy to fix arising issues.