ALBA
albaInteractor2DMeasure_Distance.h
Go to the documentation of this file.
1/*=========================================================================
2Program: ALBA (Agile Library for Biomedical Applications)
3Module: albaInteractor2DMeasure_Distance.h
4Language: C++
5Date: $Date: 2021-01-01 12:00:00 $
6Version: $Revision: 1.0.0.0 $
7Authors: Nicola Vanella
8==========================================================================
9Copyright (c) BIC-IOR 2021 (https://github.com/IOR-BIC)
10
11This software is distributed WITHOUT ANY WARRANTY; without even
12the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the above copyright notice for more information.
14=========================================================================*/
15
16#ifndef __albaInteractor2DMeasure_Distance_h
17#define __albaInteractor2DMeasure_Distance_h
18
19//----------------------------------------------------------------------------
20// Include :
21//----------------------------------------------------------------------------
23
24//----------------------------------------------------------------------------
25// Forward references :
26//----------------------------------------------------------------------------
27class vtkLineSource;
28class vtkPolyDataMapper2D;
29class vtkActor2D;
30
31// Class Name: albaInteractor2DMeasure_Distance
33{
34public:
35
37
38 // MEASURE
40 virtual void AddMeasure(double *point1, double *point2);
42 virtual void EditMeasure(int index, double *point);
44 virtual void RemoveMeasure(int index);
46 virtual void SelectMeasure(int index);
47
48 virtual void SetMinDistance(double minDistance);
49
50 virtual void SetLineWidth(double width);
51 virtual void SetLineTickWidth(double width);
52 virtual void SetLineTickLenght(double lenght);
53
54 virtual void Show(bool show);
55
57 void GetMeasureLinePoints(int index, double *point1, double *point2);
58
59 bool Load(albaVME *input, wxString tag);
60 bool Save(albaVME *input, wxString tag);
61
62protected:
63
66
67 // Draw Measure
68 void MoveMeasure(int index, double * point);
69 void DrawNewMeasure(double * wp);
70
71 // RENDERING
72 virtual void UpdateLineActors(double * point1, double * point2);
73 virtual void UpdateLineTickActor(double * point1, double * point2);
74 void UpdateTextActor(double * point1, double * point2);
75
76 //UTILS
77 virtual void FindAndHighlight(double * point);
78
79 // Persistent line
80 std::vector<albaActor2dStackHelper *> m_LineStackVector;
81 std::vector<albaActor2dStackHelper *> m_TickStackVectorL;
82 std::vector<albaActor2dStackHelper *> m_TickStackVectorR;
83
87
88private:
90 void operator=(const albaInteractor2DMeasure_Distance&); // Not implemented.
91 friend class albaInteractor2DMeasure_DistanceTest;
92};
93#endif
virtual void Show(bool show)
bool Load(albaVME *input, wxString tag)
LOAD/SAVE.
virtual void UpdateLineActors(double *point1, double *point2)
void MoveMeasure(int index, double *point)
Move Measure.
std::vector< albaActor2dStackHelper * > m_TickStackVectorR
virtual void SetLineWidth(double width)
std::vector< albaActor2dStackHelper * > m_TickStackVectorL
std::vector< albaActor2dStackHelper * > m_LineStackVector
virtual void UpdateLineTickActor(double *point1, double *point2)
virtual void FindAndHighlight(double *point)
Find Measure Point and Set Action.
void GetMeasureLinePoints(int index, double *point1, double *point2)
Get measure line extremity points.
bool Save(albaVME *input, wxString tag)
virtual void AddMeasure(double *point1, double *point2)
Add Measure.
void UpdateTextActor(double *point1, double *point2)
virtual void EditMeasure(int index, double *point)
Edit Measure.
virtual void SetMinDistance(double minDistance)
virtual void SetLineTickWidth(double width)
virtual void SelectMeasure(int index)
Select a Measure.
albaTypeMacro(albaInteractor2DMeasure_Distance, albaInteractor2DMeasure)
virtual void SetLineTickLenght(double lenght)
void DrawNewMeasure(double *wp)
Draw New Measure.
virtual void RemoveMeasure(int index)
Delete the Measure.
albaVME -
Definition: albaVME.h:150