Passing hierarchies to CLIs

Hello.

I’m trying to develop a CLI module which takes a set of models as input and gives a set of models as output. It seems to be possible to use vtkMRMLModelHierarchy nodes for this, but is it possible to use vtkMRMLSubjectHierarchy nodes instead?

Thanks in advance.

First, I’d like to clarify something from the question that is incorrect. We cannot use vtkMRMLSubjectHierarchy nodeS, because subject hierarchy node is (now in its 2.0 form) a singleton, and contains the whole hierarchy. The elements in subject hierarchy are called items, and are internal to the one node. So making it work with CLIs the same way the old fashioned hierarchy nodes worked is not possible.

Unfortunately CLI support of subject hierarchy in this sense is not implemented yet (what is implemented is that it can put outputs to the same folder as the input was). One solution I can imagine for now is adding an application setting for skipping the auto-conversion from hierarchy nodes to SH items. What do you think @lassoan @pieper @jcfr ?

I added this as a discussion topic for the upcoming hangout, see 2020.05.26 Hangout

1 Like