@staticmethod
    def saveNewNode(vtkMRMLScalarVolumeNode, fileName):
        storageNode = vtkMRMLScalarVolumeNode.CreateDefaultStorageNode()
        storageNode.SetScene(slicer.mrmlScene)
        slicer.mrmlScene.AddNode(storageNode)
        vtkMRMLScalarVolumeNode.SetAndObserveStorageNodeID(storageNode.GetID())
        storageNode.SetFileName(fileName)
        # Save the file
        storageNode.WriteData(vtkMRMLScalarVolumeNode)
Save a new scalar node in a file and add it to the scene
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/CIP_Common/CIP/logic/SlicerUtil.py/SlicerUtil.saveNewNode