74 using vtkPolyDataAlgorithm::SetInputConnection;
75 using vtkPolyDataAlgorithm::SetInputData;
90 vtkDoubleArray* normalVectors,
91 vtkPolyData* surfacePolydata,
92 vtkPoints* surfacePoints,
93 double maximumSearchRadiusTolerance);
108 int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
override;
113 vtkWeakPointer<vtkMRMLMarkupsCurveNode> InputCurveNode;
114 double MaximumSearchRadiusTolerance;
116 bool ProjectPointsToSurface(
vtkMRMLModelNode* modelNode,
double maximumSearchRadiusTolerance, vtkPoints* interpolatedPoints, vtkPoints* outputPoints);
117 static bool ConstrainPointsToSurfaceImpl(vtkOBBTree* surfaceObbTree,
118 vtkPointLocator* pointLocator,
119 vtkPoints* originalPoints,
120 vtkDoubleArray* normalVectors,
121 vtkPolyData* surfacePolydata,
122 vtkPoints* surfacePoints,
123 double maximumSearchRadius = .25);
125 class PointProjectionHelper
128 PointProjectionHelper();
132 vtkSmartPointer<vtkDoubleArray> GetPointNormals(vtkPoints* points, vtkPoints* controlPoints);
133 vtkPointLocator* GetPointLocator();
134 vtkOBBTree* GetObbTree();
135 vtkPolyData* GetSurfacePolyData();
139 vtkMTimeType LastModelModifiedTime;
140 vtkMTimeType LastTransformModifiedTime;
141 vtkSmartPointer<vtkDataArray> ModelNormalVectorArray;
142 vtkSmartPointer<vtkPointLocator> ModelPointLocator;
143 vtkSmartPointer<vtkOBBTree> ModelObbTree;
144 vtkSmartPointer<vtkPolyData> SurfacePolyData;
147 static vtkIdType GetClosestControlPointIndex(
const double point[3], vtkPoints* controlPoints);
150 PointProjectionHelper PointProjection;