# ProbeVolumeWithModel produces wrong output in code

**URL:** <https://discourse.slicer.org/t/probevolumewithmodel-produces-wrong-output-in-code/22485>\
**Category:** Support\
**Created:** [March 13, 2022, 4:36pm UTC](https://discourse.slicer.org/t/probevolumewithmodel-produces-wrong-output-in-code/22485 "2022-03-13T16:36:23Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [March 14, 2022, 1:24pm UTC](https://discourse.slicer.org/t/probevolumewithmodel-produces-wrong-output-in-code/22485/7 "2022-03-14T13:24:08Z")

</div>

> [@lassoan](#):
>
> @pieper what do you think about adding a flag to GetFirstNodeByName method to include/exclude hidden nodes and by default make hidden nodes excluded? This would change the behavior of the method by default, but since this is a high-level convenience function, the expected behavior is probably to not consider hidden nodes.

Yes, those convenience methods (also `getNode` in python) seem to regularly lead to some confusion; making them behave better could help. Maybe in `slicer.util` we should provide a `pickNode` method that pops up a gui node combo box and use that in the script repository instead of teaching people to use the less reliable methods.

---

_[View the full topic](https://discourse.slicer.org/t/probevolumewithmodel-produces-wrong-output-in-code/22485)._
