Hi,
I’m trying to use python-cli to save node and upload to remote server. But I got error when using saveNode. How can I use these functions in python-cli?
Thanks.
Traceback (most recent call last):
File “C:/Users/chen/Desktop/SlicerRadiomicsCLI/SlicerRadiomicsCLI.py”, line 48, in
main()
File “C:/Users/chen/Desktop/SlicerRadiomicsCLI/SlicerRadiomicsCLI.py”, line 42, in main
slicer.util.saveNode(getNode(‘1’), ‘1.nii.gz’)
AttributeError: ‘module’ object has no attribute ‘util’
Generally, CLIs are not intended to have direct access to the Slicer scene / infrastructure. They are meant for non-interactive data processing with non-slicer libraries. If you want to work within the Slicer environment, you should keep the code within a python scripted module.