Load data, header modified by pynrrd without writing

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 !

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:

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 !