Hi there. How do you import a .json or .txt file to use as a markup file?
I am quite new to Slicer, so a simple clear answer would be much appreciated.
When I drag and drop the json or txt file into Slicer, or else go through the load data button in Slicer, I get a ‘failed to load’ error message.
This file is a simple .txt file with four columns representing the label and x, y, z coordinates for a range of electrodes to be used with/superimposed on a brain CT scan.
The json file is created simply by changing the file type manually from .txt to .json.
I don’t mind whether I used the .txt or the .json file. My whole aim here is simply to import these x,y,z electrode coordinates rather than create the markup file manually inside 3dSlicer.
Thanks for this. I have re written my electrode position markup file in the format suggested for a .json file. This markup file successfully loads into Slicer on Windows, but not on Slicer on my Mac.
Any suggestions?
The following is an abbreviation of the script used:
Please check the json module python documentation. A json markups file should be valid in any OS. Also you could create some fiducials with Slicer GUI as test data, save it and open the file on a text editor to see where the error is compared with the file you crafted