Hello. I am doing a volume crop operation in a study I have been working on. And I want to use the “Nearest Neighborn” feature from the interpolator features in the “Volume Crop” module. How can I add the “Nearest Neighborn” attribute to my code?
You can change the interpolation mode programmatically by modifying properties of the crop volume parameter node:
parameterNode = getNode('CropVolumeParameters')
mode = slicer.vtkMRMLCropVolumeParametersNode.InterpolationNearestNeighbor
parameterNode.SetInterpolationMode(mode)
Thank you very much, that’s exactly what I was looking for
1 Like