I’m attempting to export multiple vtkMRMLTableNodes from an array to a directory
for preset in self.presets:
if preset and preset.IsA('vtkMRMLStorableNode') and preset.GetStorageNode():
filename = presetsDir + '\\' + preset.GetName()
if '.csv' not in filename:
filename += '.csv'
slicer.util.exportNode(preset, filename)
But preset.GetStorageNode() continually returns None despite preset.IsA(‘vtkMRMLStorableNode’) being True. When I remove preset.GetStorageNode(), this shows up.
[Python] Failed to export node to file: C:\directory\...
[Python] Error: Unable to find a storable node with ID vtkMRMLTableNode1
However, the program successfully exports other table nodes that are in the subject hierarchy. I tried adding the tables I wanted to save to the hierarchy, but the issue persists.