Operating system: WIndows
Slicer version: 4.10.0
Expected behavior:
Actual behavior:
Yes, you can do it by a few lines of Python code (that you can either copy-paste to the Python console, in a Jupyter notebook, or in a scripted module). For example, export markup fiducials into a json file:
markupNode = getNode('F')
outputFileName = 'c:/tmp/test.json'
data = []
for fidIndex in range(markupNode.GetNumberOfFiducials()):
coords=[0,0,0]
markupNode.GetNthFiducialPosition(fidIndex,coords)
data.append({'label': markupNode.GetNthFiducialLabel(), 'position': coords})
import json
with open(outputFileName, 'w') as outfile:
json.dump(data, outfile)
Hi, Can I export segmentation results into json file?
Do you mean writing the 3D voxel array? Of course, it is easily doable, but it would be terribly inefficient.