ALBA
albaInteractor2DMeasure_MidPoint.h
Go to the documentation of this file.
1/*=========================================================================
2Program: ALBA (Agile Library for Biomedical Applications)
3Module: albaInteractor2DMeasure_MidPoint.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_MidPoint_h
17#define __albaInteractor2DMeasure_MidPoint_h
18
19//----------------------------------------------------------------------------
20// Include :
21//----------------------------------------------------------------------------
23
24//----------------------------------------------------------------------------
25// Forward references :
26//----------------------------------------------------------------------------
27class vtkLineSource;
28class vtkPolyDataMapper2D;
29class vtkActor2D;
30
31// Class Name: albaInteractor2DMeasure_MidPoint
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 Show(bool show);
49
50 virtual void SetPointSize(double size);
51 void SetMidPointSize(double size);
52 virtual void SetLineWidth(double width);
53
55 void GetMeasureLinePoints(int index, double *point1, double *point2);
56
58 void GetMeasureMidPoint(int index, double *point);
59
60 bool Load(albaVME *input, wxString tag);
61 bool Save(albaVME *input, wxString tag);
62
63protected:
64
67
68 // Draw Measure
69 void MoveMeasure(int index, double * point);
70 void DrawNewMeasure(double * wp);
71
72 // RENDERING
73 virtual void UpdateLineActors(double * point1, double * point2);
74 virtual void UpdatePointsActor(double * point1, double * point2);
75 void UpdateMidPointActor(double * point1, double * point2);
76 void UpdateTextActor(double * point1, double * point2);
77
78 //UTILS
79 virtual void FindAndHighlight(double * point);
80
81 // Persistent line
82 std::vector<albaActor2dStackHelper *> m_LineStackVector;
83
84 // Persistent Points
85 std::vector<albaActor2dStackHelper *> m_PointsStackVectorL;
86 std::vector<albaActor2dStackHelper *> m_PointsStackVectorR;
87 std::vector<albaActor2dStackHelper *> m_MidPointsStackVector;
88
90
91private:
93 void operator=(const albaInteractor2DMeasure_MidPoint&); // Not implemented.
94 friend class albaInteractor2DMeasure_MidPointTest;
95};
96#endif
virtual void FindAndHighlight(double *point)
Find Measure Point and Set Action.
void UpdateTextActor(double *point1, double *point2)
albaTypeMacro(albaInteractor2DMeasure_MidPoint, albaInteractor2DMeasure)
virtual void SetPointSize(double size)
std::vector< albaActor2dStackHelper * > m_MidPointsStackVector
void GetMeasureLinePoints(int index, double *point1, double *point2)
Get measure line extremity points.
virtual void Show(bool show)
virtual void AddMeasure(double *point1, double *point2)
Add Measure.
void UpdateMidPointActor(double *point1, double *point2)
virtual void UpdatePointsActor(double *point1, double *point2)
virtual void EditMeasure(int index, double *point)
Edit Measure.
std::vector< albaActor2dStackHelper * > m_PointsStackVectorL
bool Save(albaVME *input, wxString tag)
void GetMeasureMidPoint(int index, double *point)
Get measure line extremity points.
void MoveMeasure(int index, double *point)
Move Measure.
virtual void UpdateLineActors(double *point1, double *point2)
void DrawNewMeasure(double *wp)
Draw New Measure.
bool Load(albaVME *input, wxString tag)
LOAD/SAVE.
void SetMidPointSize(double size)
virtual void RemoveMeasure(int index)
Delete the Measure.
std::vector< albaActor2dStackHelper * > m_LineStackVector
virtual void SelectMeasure(int index)
Select a Measure.
std::vector< albaActor2dStackHelper * > m_PointsStackVectorR
virtual void SetLineWidth(double width)
albaVME -
Definition: albaVME.h:150