# Is it better to integrate settings from Module B into Module A for improved user workflow (or user convenience)?

**URL:** <https://discourse.slicer.org/t/is-it-better-to-integrate-settings-from-module-b-into-module-a-for-improved-user-workflow-or-user-convenience/41189>\
**Category:** Development\
**Created:** [January 21, 2025, 11:34am UTC](https://discourse.slicer.org/t/is-it-better-to-integrate-settings-from-module-b-into-module-a-for-improved-user-workflow-or-user-convenience/41189 "2025-01-21T11:34:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [January 22, 2025, 12:31pm UTC](https://discourse.slicer.org/t/is-it-better-to-integrate-settings-from-module-b-into-module-a-for-improved-user-workflow-or-user-convenience/41189/2 "2025-01-22T12:31:53Z")

</div>

Regarding this issue, I came across a question titled [Call SlicerRT Isodose (or create isodoses) from python](https://discourse.slicer.org/t/call-slicerrt-isodose-or-create-isodoses-from-python/4506) which was asked in the 3DSlicer Community.

I realized that in the Python Interactor, in addition to the `slicer.util.getModule` method which I mentioned in my previous message, there is another method called `slicer.util.getModuleLogic` that seems to provide access to the settings (logic) of modules, including **Isodose** module. In other words, it seems that the `getModuleLogic` method in `slicer.util` is used for setting the settings of modules.

According to the help provided for the `SetNumberOfIsodoseLevels` method, it seems that this method takes two input arguments: a `vtkMRMLIsodoseNode` type and an `integer`.

 ![Screenshot from 2025-01-22 15-45-45](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/3/23aa647d0bda0ffa37784c7e0c8f851a7aebc1a7.png)

The following commands were executed.

```auto
>>> object_vtkMRMLIsodoseNode = slicer.vtkMRMLIsodoseNode().CreateNodeInstance()
>>> type(object_vtkMRMLIsodoseNode)
<class 'vtkSlicerIsodoseModuleLogic.vtkMRMLIsodoseNode'>
>>> numberOfColors = 1
>>> myIsodose = slicer.util.getModuleLogic('Isodose').SetNumberOfIsodoseLevels(object_vtkMRMLIsodoseNode, numberOfColors)
>>> type(myIsodose)
<class 'NoneType'>
>>> myIsodose. __dir__ ()
[' __repr__', ' __bool__', ' __new__', ' __doc__', ' __hash__', ' __str__', ' __getattribute__', ' __setattr__', ' __delattr__', ' __lt__', ' __le__', ' __eq__', ' __ne__', ' __gt__', ' __ge__', ' __init__', ' __reduce_ex__', ' __reduce__', ' __subclasshook__', ' __init_subclass__', ' __format__', ' __sizeof__', ' __dir__', ' __class__']
>>> 

```

It seems that there was no syntax error when executing the above commands, but since the output type is` NoneType`, it seems that a logical error must have occurred.

Please guide me on how to implement the settings of the **Isodose** module in Python so that I can generate the output of this module by taking the RTDose input.

Best regards.  
Shahrokh.

---

_[View the full topic](https://discourse.slicer.org/t/is-it-better-to-integrate-settings-from-module-b-into-module-a-for-improved-user-workflow-or-user-convenience/41189)._
