Dear developers,
I want to load the output vtp files generated back to slicer, the code I write is as following:
#Load the generated anatomical tracts back into Slicer
for file_name in os.listdir(AnatomicalTractsFolder):
# Check whether the file extension is VTP
if file_name.endswith(“.vtp”):
# Build the full path of the file
file_path = os.path.join(AnatomicalTractsFolder, file_name)
# load vtp in slicer
loaded_model_node = slicer.util.loadModel(file_path)
However, it failed:
Best wishes,
Joshua