ALive-research/Slicer-Liver

'Preview Resection' is enabled only if a Distance Map is provided

dalbenzioG opened this issue · 2 comments

In Resections section, the check box can be clicked only if a Distance Map is provided. Consequently, the final resection can not be shown if the distance map is not provided.
I am not sure if this is the desired behavior or if there is the need to clip out even without the distance map.
I have raised this question because when computing the Bezier Surface Approximation feature, I have to calculate the distance map for being able to show the final resection (clipped out).
See the pictures below

  • No Distance Map provided:

image

  • For Bezier Surface Approximation feature, I am creating the Liver Resection as follow:
ResectionNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLLiverResectionNode")
ResectionNode.SetTargetOrganModelNode(liverNode)
BezierNode = ResectionNode.GetBezierSurfaceNode()
BezierNode.RemoveAllControlPoints()
BezierNode.SetControlPointPositionsWorld(points) #points are 16 vtkPoints control points
BezierDisplay = BezierNode.GetDisplayNode()
BezierDisplay.VisibilityOn()
BezierDisplay.SetClipOut(True)

Even if GetClipOut is True and it does not produce any error, the resection is not visually clipped out.

image

This is not an issue