ALBA
albaInteractor2DMeasure_CenterPoint.h
Go to the documentation of this file.
1/*=========================================================================
2Program: ALBA (Agile Library for Biomedical Applications)
3Module: albaInteractor2DMeasure_CenterPoint.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_CenterPoint_h
17#define __albaInteractor2DMeasure_CenterPoint_h
18
19//----------------------------------------------------------------------------
20// Include :
21//----------------------------------------------------------------------------
23
24//----------------------------------------------------------------------------
25// Forward references :
26//----------------------------------------------------------------------------
27class vtkActor;
28class vtkActor2D;
29class vtkDataSetMapper;
30class vtkDiskSource;
31class vtkLineSource;
32class vtkPolyDataMapper2D;
33class vtkTransform;
34class vtkTransformPolyDataFilter;
35
36// Class Name: albaInteractor2DMeasure_CenterPoint
38{
39public:
40
42
43 // MEASURE
45 virtual void AddMeasure(double *point1, double *point2);
47 virtual void EditMeasure(int index, double *point);
49 virtual void RemoveMeasure(int index);
51 virtual void SelectMeasure(int index);
52
53 virtual void Show(bool show);
54
55 virtual void SetPointSize(double size);
56 void SetCenterPointSize(double size);
57 virtual void SetLineWidth(double width);
58
60 void GetMeasureLinePoints(int index, double *point1, double *point2);
61
62 void GetCenter(int index, double *center);
63
64 bool Load(albaVME *input, wxString tag);
65 bool Save(albaVME *input, wxString tag);
66
67protected:
68
71
72 // Draw Measure
73 void MoveMeasure(int index, double * point);
74 void DrawNewMeasure(double * wp);
75
76 // RENDERING
77 virtual void UpdatePointsActor(double * point1, double * point2);
78 virtual void UpdateLineActors(double * point1, double * point2);
79 void UpdateCircleActor(double * point1, double * point2);
80 void UpdateTextActor(double * point1, double * point2);
81
82 //UTILS
83 virtual void FindAndHighlight(double * point);
84
85 // Persistent line
86 std::vector<albaActor2dStackHelper *> m_LineStackVector;
87
88 // Persistent Points
89 std::vector<albaActor2dStackHelper *> m_PointsStackVectorL;
90 std::vector<albaActor2dStackHelper *> m_PointsStackVectorR;
91 std::vector<albaActor2dStackHelper *> m_PointsStackVectorC;
92
93 // Persistent Circle
94 std::vector<albaActor2dStackHelper *> m_CircleStackVector;
95
97
98private:
100 void operator=(const albaInteractor2DMeasure_CenterPoint&); // Not implemented.
101 friend class albaInteractor2DMeasure_CenterPointTest;
102};
103#endif
albaTypeMacro(albaInteractor2DMeasure_CenterPoint, albaInteractor2DMeasure)
virtual void UpdatePointsActor(double *point1, double *point2)
virtual void SetPointSize(double size)
std::vector< albaActor2dStackHelper * > m_CircleStackVector
virtual void EditMeasure(int index, double *point)
Edit Measure.
bool Save(albaVME *input, wxString tag)
std::vector< albaActor2dStackHelper * > m_PointsStackVectorR
virtual void AddMeasure(double *point1, double *point2)
Add Measure.
void DrawNewMeasure(double *wp)
Draw New Measure.
void MoveMeasure(int index, double *point)
Move Measure.
void GetCenter(int index, double *center)
bool Load(albaVME *input, wxString tag)
LOAD/SAVE.
virtual void RemoveMeasure(int index)
Delete the Measure.
void UpdateTextActor(double *point1, double *point2)
virtual void UpdateLineActors(double *point1, double *point2)
virtual void SelectMeasure(int index)
Select a Measure.
virtual void FindAndHighlight(double *point)
Find Measure Point and Set Action.
std::vector< albaActor2dStackHelper * > m_PointsStackVectorL
virtual void SetLineWidth(double width)
virtual void Show(bool show)
void GetMeasureLinePoints(int index, double *point1, double *point2)
Get measure line extremity points.
void UpdateCircleActor(double *point1, double *point2)
std::vector< albaActor2dStackHelper * > m_LineStackVector
std::vector< albaActor2dStackHelper * > m_PointsStackVectorC
albaVME -
Definition: albaVME.h:150