diff --git a/src/src/Rendering/Measure/RulerAnnotationActor.cpp b/src/src/Rendering/Measure/RulerAnnotationActor.cpp index 71e284d..6b11c4e 100644 --- a/src/src/Rendering/Measure/RulerAnnotationActor.cpp +++ b/src/src/Rendering/Measure/RulerAnnotationActor.cpp @@ -75,4 +75,8 @@ void RulerAnnotationActor::selfCalibCb(vtkObject *, unsigned long, void *data) { calibrationWidget *w = new calibrationWidget(this, interactor); w->exec(); delete w; -} \ No newline at end of file +} + +vtkProp *RulerAnnotationActor::GetProp() { + return this; +} diff --git a/src/src/Rendering/Measure/RulerAnnotationActor.h b/src/src/Rendering/Measure/RulerAnnotationActor.h index 9da6268..faf1753 100644 --- a/src/src/Rendering/Measure/RulerAnnotationActor.h +++ b/src/src/Rendering/Measure/RulerAnnotationActor.h @@ -14,12 +14,14 @@ class RulerAnnotationActor : public LineAnnotationActor { public: static RulerAnnotationActor *New(); -vtkTypeMacro(RulerAnnotationActor, LineAnnotationActor); + vtkTypeMacro(RulerAnnotationActor, LineAnnotationActor); void BuildShape() override; NextMeasureMacro(RulerAnnotationActor); + vtkProp* GetProp() ; + void setCalibration(double s) { isCalibration = true; calibDistance = s; diff --git a/src/src/Rendering/Measure/VolRulerAnnotationActor.cpp b/src/src/Rendering/Measure/VolRulerAnnotationActor.cpp new file mode 100644 index 0000000..992805f --- /dev/null +++ b/src/src/Rendering/Measure/VolRulerAnnotationActor.cpp @@ -0,0 +1,23 @@ +// +// Created by Krad on 2022/11/23. +// + +#include "VolRulerAnnotationActor.h" + +#include +#include + +#include "Rendering/Core/ControlPointActor.h" + +vtkStandardNewMacro(VolRulerAnnotationActor) + +VolRulerAnnotationActor::VolRulerAnnotationActor() { + MapMode = MapToWorld; + controlP1->SetMapMode(MapToWorld); + controlP2->SetMapMode(MapToWorld); +} + +VolRulerAnnotationActor::~VolRulerAnnotationActor() { + +} + diff --git a/src/src/Rendering/Measure/VolRulerAnnotationActor.h b/src/src/Rendering/Measure/VolRulerAnnotationActor.h new file mode 100644 index 0000000..ee12a17 --- /dev/null +++ b/src/src/Rendering/Measure/VolRulerAnnotationActor.h @@ -0,0 +1,34 @@ +// +// Created by Krad on 2022/11/23. +// + +#ifndef OMEGAV_VOLRULERANNOTATIONACTOR_H +#define OMEGAV_VOLRULERANNOTATIONACTOR_H + +#include "RulerAnnotationActor.h" + +class VolRulerAnnotationActor:public RulerAnnotationActor { +public: + //@{ + /** + * Standard methods for instances of this class. + */ + static VolRulerAnnotationActor *New(); + + vtkTypeMacro(VolRulerAnnotationActor, RulerAnnotationActor); + + +protected: + VolRulerAnnotationActor(); + + ~VolRulerAnnotationActor() override; + +public: + +private: + VolRulerAnnotationActor(const VolRulerAnnotationActor&) = delete; + void operator=(const VolRulerAnnotationActor&) = delete; +}; + + +#endif //OMEGAV_VOLRULERANNOTATIONACTOR_H