Hi everybody,
Im using the module for obtain the centerline from a segmentation. I created a module wich call the centerline module and it works fine. When I run the same code but using slicer --no-main–window, the program crash always in the same line of code.
Its strange, its the same code and the same inputs. When I run it as a module I get the centerline but when I run it like a py code using slicer --no-main-window, it doesnt.
Aways crash in this line, and I put also the lines that I use for work with ExtractCenterLine.
In another case, there is other way to work with ExtractCenterLine different?
Thanks, Lucas.
# The line of problems.
preprocessedPolyData = extractLogic.preprocess(inputSurfacePolyData, targetNumberOfPoints, decimationAggressiveness, subdivideInputSurface)
# Preprocess the surface
inputSurfacePolyData = extractLogic.polyDataFromNode(segmentationNode, segmentID)
targetNumberOfPoints = 5000.0
decimationAggressiveness = 4
subdivideInputSurface = False
preprocessedPolyData = extractLogic.preprocess(inputSurfacePolyData, targetNumberOfPoints, decimationAggressiveness, subdivideInputSurface)
# Extract the centerline
centerlineCurveNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLMarkupsCurveNode", "Centerline curve")
centerlinePolyData, voronoiDiagramPolyData = extractLogic.extractCenterline(preprocessedPolyData, pointListNode)
centerlinePropertiesTableNode = None
extractLogic.createCurveTreeFromCenterline(centerlinePolyData, centerlineCurveNode, centerlinePropertiesTableNode)