'Preview Resection' is enabled only if a Distance Map is provided
dalbenzioG opened this issue · 2 comments
dalbenzioG commented
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:
- 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.
RafaelPalomar commented
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](https://user-images.githubusercontent.com/75131750/213870659-31f4b675-36e0-4370-bdf2-c53fa36862e1.png)
- 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](https://user-images.githubusercontent.com/75131750/213871582-8e4771f7-a089-4d2f-8e56-89545194ac57.png)
--
Reply to this email directly or view it on GitHub:
#195
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
RafaelPalomar commented
This is not an issue