# CLI modules ignore parent transform

**URL:** <https://discourse.slicer.org/t/cli-modules-ignore-parent-transform/25987>\
**Category:** Support\
**Created:** [October 31, 2022, 7:09pm UTC](https://discourse.slicer.org/t/cli-modules-ignore-parent-transform/25987 "2022-10-31T19:09:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 31, 2022, 7:09pm UTC](https://discourse.slicer.org/t/cli-modules-ignore-parent-transform/25987/1 "2022-10-31T19:09:39Z")

</div>

It seems confusing that CLI modules ignore the parent transform and users need to harden the transform to get the results that they expect. See this discussion for a recent example:

> [@Multiple partial volumes reconstruction](https://discourse.slicer.org/t/multiple-partial-volumes-reconstruction/25786/17):
>
> Is there a way to automatically add a warning of some kind to CLI modules if a user tries to select a transformed node as an input? It is not always obvious to end users that a module they select is a CLI module behind the scenes, and even if they did know, it is not obvious that soft transforms are ignored for these modules. I’ve unexpectedly run into that multiple times over the years before I learned to check for it (so much so that, as you can see above, I assumed that it might be a Slice…

- Does anyone know the reason why CLI modules are implemented like this?
- Should we transform to/from RAS space before sending a node to a CLI module and convert outputs from RAS to the node’s parent transform’s space?
- Or should we at least display a warning when a node under a transform is used as CLI module input or output?

@pieper @jcfr @cpinter @jamesobutler

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 31, 2022, 7:47pm UTC](https://discourse.slicer.org/t/cli-modules-ignore-parent-transform/25987/2 "2022-10-31T19:47:35Z")

</div>

> [@lassoan](#):
>
> Does anyone know the reason why CLI modules are implemented like this?

As I recall transforms were being added and improved around the same time CLIs were being developed and I think this feature just never got implemented. It would definitely be nice to handle this automatically at the CLI GUI/logic layer by assuming that CLIs expect all their inputs to be in the same space (RAS).

We could do this by extending the node combo box to have a method like currrentNodeInWorldSpace that would do the clone/harden step if needed. If a transformable node has a nonlinear transform parent, then the combo box could have a submenu that selects a reference volume to define the desired resampling (and maybe the option not to delete the clone volume in case you want to reuse it).
