ALBA
albaInteractor2DMeasure_Point.h
Go to the documentation of this file.
1/*=========================================================================
2Program: ALBA (Agile Library for Biomedical Applications)
3Module: albaInteractor2DMeasure_Point.h
4Language: C++
5Date: $Date: 2019-01-01 12:00:00 $
6Version: $Revision: 1.0.0.0 $
7Authors: Nicola Vanella
8==========================================================================
9Copyright (c) BIC-IOR 2019 (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_Point_h
17#define __albaInteractor2DMeasure_Point_h
18
19//----------------------------------------------------------------------------
20// Include :
21//----------------------------------------------------------------------------
23
24//----------------------------------------------------------------------------
25// Forward references :
26//----------------------------------------------------------------------------
27class vtkPolyDataMapper2D;
28
29// Class Name: albaInteractor2DMeasure_Point
31{
32public:
33
35
36 // MEASURE
38 virtual void AddMeasure(double *point);
40 virtual void EditMeasure(int index, double *point);
42 virtual void RemoveMeasure(int index);
44 virtual void SelectMeasure(int index);
45
46 virtual void SetPointSize(double size);
47
48 virtual void Show(bool show);
49
51 void GetMeasurePoint(int index, double *point);
52
53 bool Load(albaVME *input, wxString tag);
54 bool Save(albaVME *input, wxString tag);
55
56 void FreeEdit() { m_EditConstraint = FREE_EDIT; };
57 void LockPointOnLine(double *lineP1, double *lineP2);
58
59 virtual void ReDrawAll();
60
61protected:
62
64 {
67// LOCK_IN_RECT,
68// LOCK_IN_CIRCLE,
69 };
70
73
74 // Draw Measure
75 void MoveMeasure(int index, double * point);
76 void DrawNewMeasure(double * wp);
77
78 // RENDERING
79 virtual void UpdatePointsActor(double * point1, double * point2 = NULL);
80 void UpdateTextActor(int index, double *point);
81
82 // UTILS
83 virtual void FindAndHighlight(double * point);
84
85 void GetPointOnLine(double *point);
86
87 // Persistent Points
88 std::vector<albaActor2dStackHelper *> m_PointsStackVector;
89
90 // Constraints
92 double m_ConstrLineP1[3];
93 double m_ConstrLineP2[3];
94
95private:
97 void operator=(const albaInteractor2DMeasure_Point&); // Not implemented.
98 friend class albaInteractor2DMeasure_PointTest;
99};
100#endif
virtual void RemoveMeasure(int index)
Delete the Measure.
virtual void Show(bool show)
bool Load(albaVME *input, wxString tag)
LOAD/SAVE.
void MoveMeasure(int index, double *point)
Move Measure.
virtual void EditMeasure(int index, double *point)
Edit Measure.
std::vector< albaActor2dStackHelper * > m_PointsStackVector
void UpdateTextActor(int index, double *point)
bool Save(albaVME *input, wxString tag)
void GetMeasurePoint(int index, double *point)
Get point coordinate.
virtual void UpdatePointsActor(double *point1, double *point2=NULL)
void LockPointOnLine(double *lineP1, double *lineP2)
virtual void SelectMeasure(int index)
Select a Measure.
virtual void FindAndHighlight(double *point)
Find Measure Point and Set Action.
void DrawNewMeasure(double *wp)
Draw New Measure.
virtual void SetPointSize(double size)
void GetPointOnLine(double *point)
albaTypeMacro(albaInteractor2DMeasure_Point, albaInteractor2DMeasure)
virtual void AddMeasure(double *point)
Add Measure.
albaVME -
Definition: albaVME.h:150