Hi all,
I have a script for automating scalar volume resampling:
reslicedVolumeNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLScalarVolumeNode", name)
parameters = {
"outputPixelSpacing":"{:},{:},{:}".format(*[resolution]*3),
"InputVolume":volumeNode.GetID(),
"interpolationMode":'bspline',
"referenceVolume": volumeNode.GetID(),
"OutputVolume":reslicedVolumeNode.GetID()}
cliNode = slicer.cli.runSync(slicer.modules.resamplescalarvolume, None, parameters)
After many experiments, I discovered that the parameter interpolationMode
should actually be interpolationType
. However, no error or warning is displayed, so I was unintentionally using the default ‘linear’ interpolation instead of ‘bspline’. Is it possible to implement a warning message to help avoid this kind of mistake? It was quite difficult to debug.
I guess that the same happens with other modules as well.
Many thanks.