# Load data, header modified by pynrrd without writing

**URL:** <https://discourse.slicer.org/t/load-data-header-modified-by-pynrrd-without-writing/36540>\
**Category:** Support\
**Tags:** python\
**Created:** [June 1, 2024, 6:58pm UTC](https://discourse.slicer.org/t/load-data-header-modified-by-pynrrd-without-writing/36540 "2024-06-01T18:58:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Djanbo](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Djanbo](https://discourse.slicer.org/u/Djanbo)\
**Post date:** [June 1, 2024, 6:58pm UTC](https://discourse.slicer.org/t/load-data-header-modified-by-pynrrd-without-writing/36540/1 "2024-06-01T18:58:17Z")

</div>

Hello,

I updated a labelmap and correpsonding header retrieved from a pynrrd file, how could i load it to 3d slicer without writting it?

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![Djanbo](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Djanbo](https://discourse.slicer.org/u/Djanbo)\
**Post date:** [June 3, 2024, 6:45pm UTC](https://discourse.slicer.org/t/load-data-header-modified-by-pynrrd-without-writing/36540/2 "2024-06-03T18:45:04Z")

</div>

Hello, to give more context, let say i save my array long the header `nrrd.write(nrrd_file, array, header)`

i also want to load the transformed label map but without re-reading it:

```auto
label_map_node = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLLabelMapVolumeNode")
slicer.util.updateVolumeFromArray(label_map_node, array)
image_data = slicer.util.arrayFromVolume(label_map_node)

```

What i need to do after to correct the spacing, origin with the help of the header dict?

Thanks !
