18 #ifndef __vtkProjectMarkupsCurvePointsFilter_h 19 #define __vtkProjectMarkupsCurvePointsFilter_h 21 #include "vtkSlicerMarkupsModuleMRMLExport.h" 23 #include <vtkInformation.h> 24 #include <vtkPolyDataAlgorithm.h> 25 #include <vtkWeakPointer.h> 29 class vtkPointLocator;
74 using vtkPolyDataAlgorithm::SetInputData;
75 using vtkPolyDataAlgorithm::SetInputConnection;
89 static bool ConstrainPointsToSurface(vtkPoints* originalPoints, vtkDoubleArray* normalVectors, vtkPolyData* surfacePolydata,
90 vtkPoints* surfacePoints,
double maximumSearchRadiusTolerance);
99 void SetMaximumSearchRadiusTolerance(
double maximumSearchRadiusTolerance);
100 double GetMaximumSearchRadiusTolerance()
const;
104 int FillInputPortInformation(
int port, vtkInformation* info)
override;
105 int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
override;
109 vtkWeakPointer<vtkMRMLMarkupsCurveNode> InputCurveNode;
110 double MaximumSearchRadiusTolerance;
112 bool ProjectPointsToSurface(
vtkMRMLModelNode* modelNode,
double maximumSearchRadiusTolerance, vtkPoints* interpolatedPoints, vtkPoints* outputPoints);
113 static bool ConstrainPointsToSurfaceImpl(vtkOBBTree* surfaceObbTree, vtkPointLocator* pointLocator,
114 vtkPoints* originalPoints, vtkDoubleArray* normalVectors, vtkPolyData* surfacePolydata,
115 vtkPoints* surfacePoints,
double maximumSearchRadius=.25);
117 class PointProjectionHelper
120 PointProjectionHelper();
124 vtkSmartPointer<vtkDoubleArray> GetPointNormals(vtkPoints* points, vtkPoints* controlPoints);
125 vtkPointLocator* GetPointLocator();
126 vtkOBBTree* GetObbTree();
127 vtkPolyData* GetSurfacePolyData();
131 vtkMTimeType LastModelModifiedTime;
132 vtkMTimeType LastTransformModifiedTime;
133 vtkSmartPointer<vtkDataArray> ModelNormalVectorArray;
134 vtkSmartPointer<vtkPointLocator> ModelPointLocator;
135 vtkSmartPointer<vtkOBBTree> ModelObbTree;
136 vtkSmartPointer<vtkPolyData> SurfacePolyData;
139 static vtkIdType GetClosestControlPointIndex(
const double point[3], vtkPoints* controlPoints);
142 PointProjectionHelper PointProjection;
MRML node to represent a curve markup Curve Markups nodes contain N control points. Visualization parameters are set in the vtkMRMLMarkupsDisplayNode class.
Projects curve points from a vtkMRMLMarkupsCurveNode to the surface of a model.
MRML node to represent a 3D surface model.