18 #ifndef __vtkCurveMeasurementsCalculator_h 19 #define __vtkCurveMeasurementsCalculator_h 22 #include <vtkCollection.h> 23 #include <vtkPolyData.h> 24 #include <vtkPolyDataAlgorithm.h> 25 #include <vtkSetGet.h> 26 #include <vtkWeakPointer.h> 29 #include "vtkSlicerMarkupsModuleMRMLExport.h" 31 class vtkCallbackCommand;
40 void PrintSelf(ostream& os, vtkIndent indent)
override;
43 void SetMeasurements(vtkCollection* measurements);
46 vtkCollection* GetMeasurements();
50 vtkSetMacro(CurveIsClosed,
bool);
53 vtkGetMacro(CurveIsClosed,
bool);
54 vtkBooleanMacro(CurveIsClosed,
bool);
58 vtkSetMacro(CalculateCurvature,
bool);
60 vtkGetMacro(CalculateCurvature,
bool);
61 vtkBooleanMacro(CalculateCurvature,
bool);
69 vtkMTimeType GetMTime()
override;
71 vtkGetMacro(CurvatureUnits, std::string);
72 vtkSetMacro(CurvatureUnits, std::string);
78 static bool InterpolateArray(vtkDoubleArray* inputValues, vtkDoubleArray* interpolatedValues,
79 vtkDoubleArray* pedigreeIdsArray,
double pedigreeIdsValueScale=1.0);
82 bool CalculatePolyDataCurvature(vtkPolyData* polyData);
83 bool InterpolateControlPointMeasurementToPolyData(vtkPolyData* outputPolyData);
87 static void OnControlPointArrayModified(vtkObject* caller,
unsigned long eid,
void* clientData,
void* callData);
94 bool CurveIsClosed{
false};
97 bool CalculateCurvature{
false};
107 int FillInputPortInformation(
int port, vtkInformation* info)
override;
108 int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
override;
std::string CurvatureUnits
static const char * GetMaxCurvatureName()
Get name of max curvature measurement.
Filter that generates curves between points of an input polydata.
static const char * GetMeanCurvatureName()
Get name of mean curvature measurement.
vtkCallbackCommand * ControlPointArrayModifiedCallbackCommand
Command handling data array modified events.
vtkWeakPointer< vtkCollection > Measurements
Measurement list from the markups node for derived measurements (such as interpolation) ...
vtkCollection * ObservedControlPointArrays
List of observed control point arrays (for removal of observations)