Add VolRulerAnnotationActor.
This commit is contained in:
@@ -75,4 +75,8 @@ void RulerAnnotationActor::selfCalibCb(vtkObject *, unsigned long, void *data) {
|
|||||||
calibrationWidget *w = new calibrationWidget(this, interactor);
|
calibrationWidget *w = new calibrationWidget(this, interactor);
|
||||||
w->exec();
|
w->exec();
|
||||||
delete w;
|
delete w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vtkProp *RulerAnnotationActor::GetProp() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,12 +14,14 @@ class RulerAnnotationActor : public LineAnnotationActor {
|
|||||||
public:
|
public:
|
||||||
static RulerAnnotationActor *New();
|
static RulerAnnotationActor *New();
|
||||||
|
|
||||||
vtkTypeMacro(RulerAnnotationActor, LineAnnotationActor);
|
vtkTypeMacro(RulerAnnotationActor, LineAnnotationActor);
|
||||||
|
|
||||||
void BuildShape() override;
|
void BuildShape() override;
|
||||||
|
|
||||||
NextMeasureMacro(RulerAnnotationActor);
|
NextMeasureMacro(RulerAnnotationActor);
|
||||||
|
|
||||||
|
vtkProp* GetProp() ;
|
||||||
|
|
||||||
void setCalibration(double s) {
|
void setCalibration(double s) {
|
||||||
isCalibration = true;
|
isCalibration = true;
|
||||||
calibDistance = s;
|
calibDistance = s;
|
||||||
|
|||||||
23
src/src/Rendering/Measure/VolRulerAnnotationActor.cpp
Normal file
23
src/src/Rendering/Measure/VolRulerAnnotationActor.cpp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// Created by Krad on 2022/11/23.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "VolRulerAnnotationActor.h"
|
||||||
|
|
||||||
|
#include <vtkObjectFactory.h>
|
||||||
|
#include <vtkPoints.h>
|
||||||
|
|
||||||
|
#include "Rendering/Core/ControlPointActor.h"
|
||||||
|
|
||||||
|
vtkStandardNewMacro(VolRulerAnnotationActor)
|
||||||
|
|
||||||
|
VolRulerAnnotationActor::VolRulerAnnotationActor() {
|
||||||
|
MapMode = MapToWorld;
|
||||||
|
controlP1->SetMapMode(MapToWorld);
|
||||||
|
controlP2->SetMapMode(MapToWorld);
|
||||||
|
}
|
||||||
|
|
||||||
|
VolRulerAnnotationActor::~VolRulerAnnotationActor() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
34
src/src/Rendering/Measure/VolRulerAnnotationActor.h
Normal file
34
src/src/Rendering/Measure/VolRulerAnnotationActor.h
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user