I would like to achieve the fiducial feature “Click to Jump Slices” programmatically. I know how to achieve this for the Red/Green/Yellow offsets, but I would like the slice views to get centered on the fiducial location as well. Here’s how I set the offset:
lm = slicer.app.layoutManager() # for a point with coordinates x/y/z (floats in mm) for slice, loc in zip(['Yellow','Green','Red'], [x,y,z]): sliceNode = lm.sliceWidget(slice) # can be Red/Yellow sliceLogic = sliceNode.sliceLogic() sliceLogic.SetSliceOffset(loc)
Unfortunately, I cannot see sth like “SetSliceCenter” in sliceLogic.
Thx for your help in advance!