i’m trying to load volume in python scriptable module script
code :[success, loadedVolumeNode] = slicer.util.loadVolume(path, returnNode=True)
error :
Traceback (most recent call last):
File “”, line 1, in
File “C:/Anand Work/PythonInterfacer.py”, line 9, in
[success, loadedVolumeNode] = slicer.util.loadVolume(path, returnNode=True)
File “C:\Program Files\Slicer 4.8.1\bin\Python\slicer\util.py”, line 377, in loadVolume
return loadNodeFromFile(filename, filetype, properties, returnNode)
File “C:\Program Files\Slicer 4.8.1\bin\Python\slicer\util.py”, line 306, in loadNodeFromFile
success = app.coreIOManager().loadNodes(filetype, properties)
ValueError: Could not find matching overload for given arguments:
(‘VolumeFile’, {‘fileName’: ‘C:\Anand Work\Sft.nrrd’})
The following slots are available:
loadNodes(qSlicerIO::IOFileType fileType, qSlicerIO::IOProperties parameters, vtkCollection loadedNodes) -> bool
loadNodes(qSlicerIO::IOFileType fileType, qSlicerIO::IOProperties parameters) -> bool
loadNodes(qSlicerIO::IOFileType fileType, qSlicerIO::IOProperties parameters, vtkCollection loadedNodes) -> bool
loadNodes(qSlicerIO::IOFileType fileType, qSlicerIO::IOProperties parameters) -> bool