Add VolRulerAnnotationActor.

This commit is contained in:
Krad
2022-11-25 10:46:30 +08:00
parent 7065c76bc5
commit 18d54e39c7
4 changed files with 65 additions and 2 deletions

View File

@@ -76,3 +76,7 @@ void RulerAnnotationActor::selfCalibCb(vtkObject *, unsigned long, void *data) {
w->exec();
delete w;
}
vtkProp *RulerAnnotationActor::GetProp() {
return this;
}

View File

@@ -20,6 +20,8 @@ vtkTypeMacro(RulerAnnotationActor, LineAnnotationActor);
NextMeasureMacro(RulerAnnotationActor);
vtkProp* GetProp() ;
void setCalibration(double s) {
isCalibration = true;
calibDistance = s;

View 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() {
}

View 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