# save and reload custom parameterNodeWrapper 

**URL:** <https://discourse.slicer.org/t/save-and-reload-custom-parameternodewrapper/42691>\
**Category:** Development\
**Tags:** python\
**Created:** [April 25, 2025, 4:19pm UTC](https://discourse.slicer.org/t/save-and-reload-custom-parameternodewrapper/42691 "2025-04-25T16:19:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ipostuma](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ipostuma/32/80072_2.png) [@ipostuma](https://discourse.slicer.org/u/ipostuma)\
**Post date:** [April 25, 2025, 4:19pm UTC](https://discourse.slicer.org/t/save-and-reload-custom-parameternodewrapper/42691/1 "2025-04-25T16:19:23Z")

</div>

Hi,

I probably have a silly question, but I didn’t manage to find an answer in the forum. I am trying to write a custom module to manage a treatment planning simulation. Part of this module consist in associating segmented volumes to a material. I have now a working QT widget where the user can add this information and the data is managed within the python script with:

```auto
@parameterPack
class MaskParameters:
    node: vtkMRMLScalarVolumeNode
    material: str

@parameterNodeWrapper
class GenerateInputParameterNode:

    CT: MaskParameters
    GTV: MaskParameters
    OAR: list[MaskParameters]
    Other: list[MaskParameters]
    AddVolume: vtkMRMLScalarVolumeNode

```

I would like to save the user generated data with the scene or medical record bundle. Is this possible ? Is there an example I could use as a guideline ?

thanks in advance !

---

<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:** [April 25, 2025, 4:19pm UTC](https://discourse.slicer.org/t/save-and-reload-custom-parameternodewrapper/42691/2 "2025-04-25T16:19:51Z")

</div>

Parameter nodes are saved into the scene (in the .mrml file).

---

<div class="post-metadata">

**Author:** ![ipostuma](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ipostuma/32/80072_2.png) [@ipostuma](https://discourse.slicer.org/u/ipostuma)\
**Post date:** [April 28, 2025, 4:54pm UTC](https://discourse.slicer.org/t/save-and-reload-custom-parameternodewrapper/42691/3 "2025-04-28T16:54:02Z")

</div>

Hi, yes it was indeed a silly question.

My problem was that I didn’t update the GUI after the user loaded the saved scene. That said, things are now working as planned.

For future reference, I managed to understand my problem by printing the content of the \_parameterNode once the scene is uploaded:

```auto
for attr, value in vars(self._parameterNode).items(): # or obj. __dict__.items()
            print(f"{attr} = {value}")

```
