IGSIO / SlicerIGSIO

Utility extension for 3D Slicer, containing tools and algorithms for building image guided surgery applications
BSD 3-Clause "New" or "Revised" License
12 stars 14 forks source link

ENH: Use name property in meta file sequence reader #12

Closed nathanbmnt closed 2 years ago

nathanbmnt commented 2 years ago

I have a program where users can load .seq.mha's one at a time. My program reads meta info in those mha's and groups the sequence images accordingly into one sequence browser. Unfortunately every time a new sequence file is loaded, a new browser is created, so I end up having to write a lot of code to delete the browser, then add the sequence nodes to the compilation browser, then delete the proxy nodes that are automatically created when AddSynchronizedSequenceNode is called.

I've noticed that when loading .seq.nrrd's the "name" property is used in that reader. image

This PR adds the ability to import a sequence metafile with the name property set. The browser, image proxy, and image sequence nodes will use this name. If a browser exists with that name the new sequences will be added to it. image

I'm also open to instead having a property like "browserID" to explicitly define the browser?

nathanbmnt commented 2 years ago

Closing this PR in favor of a new PR which just adds a outputBrowserNodeID argument. https://github.com/IGSIO/SlicerIGSIO/pull/13