ALive-research / Slicer-Liver

3D Slicer extension for liver analysis and therapy planning
Other
17 stars 9 forks source link

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

Closed dalbenzioG closed 1 year ago

dalbenzioG commented 1 year ago

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

image

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

RafaelPalomar commented 1 year ago

The rendering preview resection is based on the use of the volume-to-parenchyma distance map (this is how we know the parts of the resectiont that are outside the parenchyma).

As I see the problem, we either have the generation of a distance map as a requirement or allow the generation of the complete resection (not clipped) and let the task to the preview checkbox.

On 23/01/21 06:41AM, dalbenzioG wrote:

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 SetClipOut is True and it does not produce any error, the resection is not visually clipped out.

image

-- Reply to this email directly or view it on GitHub: https://github.com/ALive-research/Slicer-Liver/issues/195 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

RafaelPalomar commented 1 year ago

This is not an issue