Show changes in Crop Volume interface

Hi all,

I am writing my own code to crop a volume. What I have is:

#Input volume
cropVolumeNode = slicer.vtkMRMLCropVolumeParametersNode()

# specify desired roi's dimensions in voxels
radiusIJK = [400, 400, 200]

# assign roi node to a variable
roiNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLAnnotationROINode")


# get the size of the volume voxels
spacing = volumeNode.GetSpacing()
# convert the number of pixels to measurements in mm
radiusRAS = [(radiusIJK[0]*spacing[0])/2, (radiusIJK[1]*spacing[1])/2, (radiusIJK[2]*spacing[2])/2]
# change the size of the ROI

#Manually put ROI in the desired place 

I cannot see changes in the interface of Crop Volume module. For example, if I change the input volume, in the interface I always see the same. How can I reflect those changes in the interface?

Thanks :slight_smile:

If you want to see the changes that you make in the new parameter set node that you created then choose that node as “Parameter set” in the Crop Volume module GUI.

This was what I needed.
I write the line of code in case so anyone may find it useful