You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On 23/01/20 10:02AM, dalbenzioG wrote:
Slicer exits abnormally when SetBezierSurfaceControlPoints is called here:
```
ResectionNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLLiverResectionNode")
ResectionNode.SetBezierSurfaceControlPoints(points) # points are 16 control points (vtkPoints)
```
After debugging, the unexpected behavior is caused [here](https://github.com/ALive-research/Slicer-Liver/blob/819813a0feff371987aa75feacd0815e30fdded5/LiverResections/MRML/vtkMRMLLiverResectionNode.cxx#L104.
As stated [here](https://github.com/ALive-research/Slicer-Liver/blob/819813a0feff371987aa75feacd0815e30fdded5/LiverResections/MRML/vtkMRMLLiverResectionNode.h#L277), "Review the need for this. We already have a pointer to the surface node".
** Using the following lines of code for setting my ResectionNode **does not** cause any crash**
```
# points are the control points represented as vtkPoints
pointPlaceMode = slicer.vtkMRMLMarkupsDisplayNode.SnapModeUnconstrained
BezierNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLMarkupsBezierSurfaceNode")
BezierNode.SetControlPointPositionsWorld(points)
BezierNode.GetDisplayNode().SetSnapMode(pointPlaceMode)
ResectionNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLLiverResectionNode")
ResectionNode.SetTargetOrganModelNode(liverNode)
b = ResectionNode.GetBezierSurfaceNode()
b.RemoveAllControlPoints()
b.SetControlPointPositionsWorld(points)
```
--
Reply to this email directly or view it on GitHub:
#193
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
Slicer exits abnormally when SetBezierSurfaceControlPoints is called here:
After debugging, the unexpected behavior is caused here:
Slicer-Liver/LiverResections/MRML/vtkMRMLLiverResectionNode.cxx
Line 104 in 819813a
As stated here, "Review the need for this. We already have a pointer to the surface node".
Using the following lines of code for setting my ResectionNode does not cause any crash
The text was updated successfully, but these errors were encountered: