ALBA
albaGizmoBoundingBox.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGizmoBoundingBox
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#ifndef __albaGizmoBoundingBox_H__
19#define __albaGizmoBoundingBox_H__
20
21//----------------------------------------------------------------------------
22// Include:
23//----------------------------------------------------------------------------
24#include "albaEvent.h"
25#include "albaObserver.h"
26#include "albaServiceClient.h"
27#include "albaAbsLogicManager.h"
28#include "albaVMEGizmo.h"
29
30//----------------------------------------------------------------------------
31// forward references :
32//----------------------------------------------------------------------------
33class albaISAGeneric;
34class albaISACompositor;
35class albaVME;
36class vtkOutlineSource;
37class vtkCylinderSource;
38class vtkTransformPolyDataFilter;
39class vtkTransform;
40class albaMatrix;
41
42//----------------------------------------------------------------------------
43// constants :
44//----------------------------------------------------------------------------
45
46//----------------------------------------------------------------------------
47// albaGizmoBoundingBox :
48//----------------------------------------------------------------------------
53class ALBA_EXPORT albaGizmoBoundingBox: public albaObserver, public albaServiceClient
54{
55public:
56 albaGizmoBoundingBox(albaVME *input, albaObserver *listener = NULL,albaVME* parent=NULL);
58
60 void SetInput(albaVME *vme);
61 albaVME *GetInput() {return this->m_InputVme;};
62
63 //----------------------------------------------------------------------------
64 // events handling
65 //----------------------------------------------------------------------------
66
68 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
69
71 virtual void OnEvent(albaEventBase *alba_event);
72
73 //----------------------------------------------------------------------------
74 // highlight and show
75 //----------------------------------------------------------------------------
76
78 void Highlight(bool highlight);
79
81 void Show(bool show);
82
84 void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
85 void SetBounds(double bounds[6]);
86 double *GetBounds();
87 void GetBounds(double bounds[6]);
88
90 void SetAbsPose(albaMatrix *absPose);
92
94 void SetPose(albaMatrix *pose);
96
97protected:
99 void SetColor(double col[3]);
100
102 void SetColor(double colR, double colG, double colB);
103
105
107
108 vtkOutlineSource *m_BoxOutline;
109
110 albaVMEGizmo *m_BoxGizmo;
111
113 friend class albaGizmoBoundingBoxTest;
114 friend class albaGizmoROITest;
115};
116#endif
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
Bounding box gizmo for highlighting a region of interest.
void SetPose(albaMatrix *pose)
Set the gizmo local pose.
virtual void OnEvent(albaEventBase *alba_event)
Events handling.
void SetAbsPose(albaMatrix *absPose)
Set the gizmo abs pose.
void SetColor(double col[3])
Set gizmo color.
albaGizmoBoundingBox(albaVME *input, albaObserver *listener=NULL, albaVME *parent=NULL)
virtual ~albaGizmoBoundingBox()
vtkOutlineSource * m_BoxOutline
void SetBounds(double bounds[6])
void SetInput(albaVME *vme)
Set the gizmo generating vme; the gizmo will be centered on this vme.
void GetBounds(double bounds[6])
void Show(bool show)
Show the gizmo.
albaMatrix * GetPose()
void SetListener(albaObserver *Listener)
Set the event receiver object.
void Highlight(bool highlight)
Highlight the gizmo.
albaVME * m_InputVme
Register input vme.
albaObserver * m_Listener
Register the event receiver object.
void SetColor(double colR, double colG, double colB)
Set gizmo color.
albaMatrix * GetAbsPose()
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Set/Get the gizmo bounds.
albaMatrix - Time stamped 4x4 Matrix.
Definition: albaMatrix.h:44
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaVME -
Definition: albaVME.h:150