ALBA
albaGizmoCrossRotateFan.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGizmoCrossRotateFan
5 Authors: Stefano Perticoni
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17
18//======================== WORK IN PROGRESS !!!!! ========================
19//======================== WORK IN PROGRESS !!!!! ========================
20//======================== WORK IN PROGRESS !!!!! ========================
21//======================== WORK IN PROGRESS !!!!! ========================
22//======================== WORK IN PROGRESS !!!!! ========================
23//======================== WORK IN PROGRESS !!!!! ========================
24//======================== WORK IN PROGRESS !!!!! ========================
25//======================== WORK IN PROGRESS !!!!! ========================
26//======================== WORK IN PROGRESS !!!!! ========================
27
28#ifndef __albaGizmoCrossRotateFan_H__
29#define __albaGizmoCrossRotateFan_H__
30
31//----------------------------------------------------------------------------
32// Include:
33//----------------------------------------------------------------------------
34#include "albaEvent.h"
35#include "albaGizmoInterface.h"
36
37//----------------------------------------------------------------------------
38// forward references :
39//----------------------------------------------------------------------------
40class vtkSphereSource;
41class vtkTransformPolyDataFilter;
42class vtkTransform;
43class albaVME;
44class albaVMEGizmo;
45class albaMatrix;
46class albaRefSys;
47
71{
72public:
73 albaGizmoCrossRotateFan(albaVME *input, albaObserver *listener = NULL);
75
78 void SetInput(albaVME *vme);
79 albaVME *GetInput() {return this->m_InputVme;};
80
81 //----------------------------------------------------------------------------
82 // events handling
83 //----------------------------------------------------------------------------
84
86 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
87
89 virtual void OnEvent(albaEventBase *alba_event);
90
91 //----------------------------------------------------------------------------
92 // axis setting
93 //----------------------------------------------------------------------------
94
96 enum AXIS {X = 0, Y, Z};
97
99 void SetAxis(int axis);
100
102 int GetAxis();
103
104 //----------------------------------------------------------------------------
105 // show/ hide the gizmo
106 //----------------------------------------------------------------------------
107
109 void Show(bool show);
110
111 //----------------------------------------------------------------------------
112 // radius setting
113 //----------------------------------------------------------------------------
114
116 void SetRadius(double radius);
117 double GetRadius();
118
121 void SetAbsPose(albaMatrix *absPose);
122
123protected:
124
125
128
132
135
137 vtkSphereSource *m_Sphere;
138
141 vtkTransform *m_RotateFanTransform;
142
143 vtkTransformPolyDataFilter *m_RotateFanTPDF;
144
147
149 vtkTransformPolyDataFilter *m_ChangeFanAxisTPDF;
150
152 albaVMEGizmo *m_Gizmo;
153
155 //albaVmeData *GizmoData;
156
159
161 void SetColor(double col[3]);
162 void SetColor(double colR, double colG, double colB);
163
167
168 enum MIRROR_STATUS {OFF = 0, ON};
169
172
173 vtkTransform *m_MirrorTr;
174 vtkTransform *m_BufferTr;
175 vtkTransformPolyDataFilter *m_MirrorTPDF;
176
178 double PointPickedToStartTheta(double xp, double yp, double zp);
179
183
185
188};
189#endif
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
Basic gizmo component used to give rotation angle feedback.
albaVME * m_InputVme
Register input vme.
virtual void OnEvent(albaEventBase *alba_event)
Events handling.
double PointPickedToStartTheta(double xp, double yp, double zp)
Get the start theta from abs pick coordinates.
void SetColor(double colR, double colG, double colB)
vtkSphereSource * m_Sphere
Create the sphere.
vtkTransformPolyDataFilter * m_ChangeFanAxisTPDF
rotate PDF for sphere
void SetAbsPose(albaMatrix *absPose)
Set the abs pose.
albaGizmoCrossRotateFan(albaVME *input, albaObserver *listener=NULL)
double m_StartTheta
Start angle and end angle.
void SetInput(albaVME *vme)
Set the gizmo generating vme; the gizmo will be centered on this vme.
void SetRadius(double radius)
Set/Get the radius of the gizmo.
vtkTransformPolyDataFilter * m_MirrorTPDF
void SetRefSysMatrix(albaMatrix *matrix)
Set the reference system matrix.
friend class albaGizmoRotateFanTest
Test Friend.
vtkTransform * m_ChangeFanAxisTransform
sphere transform
vtkTransform * m_RotateFanTransform
Transform to rotate the fan around Z axis after creation to match new m_StartTheta angle.
void SetListener(albaObserver *Listener)
Set the event receiver object.
int m_ActiveAxis
Register the gizmo axis.
virtual ~albaGizmoCrossRotateFan()
void SetAxis(int axis)
Set/Get gizmo axis, default axis is X.
void CreatePipeline()
gizmo data
albaObserver * m_Listener
Register the event receiver object.
void Show(bool show)
Show gizmo.
albaVMEGizmo * m_Gizmo
Fan gizmo.
int GetAxis()
Get gizmo axis.
vtkTransformPolyDataFilter * m_RotateFanTPDF
void SetColor(double col[3])
m_Gizmo color setting facilities for gizmo segments;
int m_MirrorStatus
Register the mirror status of the fan; default status is off.
Base class for operations and views gizmos.
albaMatrix - Time stamped 4x4 Matrix.
Definition: albaMatrix.h:44
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
class representing reference system
Definition: albaRefSys.h:49
albaVME -
Definition: albaVME.h:150