ALBA
albaAttachCamera.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaAttachCamera
5 Authors: Paolo Quadrani
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#ifndef __albaAttachCamera_H__
18#define __albaAttachCamera_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaEvent.h"
24#include "albaObserver.h"
25#include <ostream>
26#include "albaServiceClient.h"
27#include "albaAbsLogicManager.h"
28
29using namespace std;
30
31//----------------------------------------------------------------------------
32// forward references :
33//----------------------------------------------------------------------------
34class albaGUI;
35class albaRWI;
36class albaVME;
37class vtkMatrix4x4;
38
39//----------------------------------------------------------------------------
40// albaAttachCamera :
41//----------------------------------------------------------------------------
49class ALBA_EXPORT albaAttachCamera : public albaObserver, public albaServiceClient
50{
51public:
52
54 albaAttachCamera(wxWindow* parent, albaRWI *rwi, albaObserver *Listener = NULL);
56
60 void SetEnableAttachCamera(int enable);
62
67
70 void SetVme(albaVME *node);
72
75 void SetStartingMatrix(vtkMatrix4x4 *matrix);
76
77 void OnEvent(albaEventBase *alba_event);
78
79 void SetListener(albaObserver *Listener);
81
85
87 vtkMatrix4x4 * GetAttachedMatrix() const { return m_AttachedMatrix; }
88
90 void SetAttachedMatrix(vtkMatrix4x4 * attachedMatrix);
91
92protected:
93
96 void CreateGui();
97
100 vtkMatrix4x4 *m_AttachedMatrix;
101 vtkMatrix4x4 *m_CurrentMatrix;
102
103
107 wxWindow *m_ParentPanel;
108};
109#endif
albaAttachCamera is tool to attach the camera present in albaRWI to the selected VME.
albaGUI * GetGui()
Returns the albaAttachCamera's GUI.
void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
vtkMatrix4x4 * m_CurrentMatrix
Matrix given to the Camera to be moved together with m_AttachedVme.
void SetAttachedMatrix(vtkMatrix4x4 *attachedMatrix)
Sets AttachedMatrix.
void SetListener(albaObserver *Listener)
albaVME * m_AttachedVme
VME on which the camera is attached when the attach-camera option is 'On'.
int GetEnableAttachCamera()
wxWindow * m_ParentPanel
void EnableAttachCamera()
Enable/Disable attach camera to vme.
void SetEnableAttachCamera(int enable)
void SetVme(albaVME *node)
Set the vme to follow with camera.
vtkMatrix4x4 * GetAttachedMatrix() const
Returns AttachedMatrix.
albaRWI * m_RenderWindow
int m_EnableAttachCamera
Flag to turn On/Off the camera attaching on a particular VME.
vtkMatrix4x4 * m_AttachedMatrix
Matrix given to the Camera to be moved together with m_AttachedVme.
albaVME * GetVme()
void UpdateCameraMatrix()
Update the camera according to the absolute position of the attached VME.
albaAttachCamera(wxWindow *parent, albaRWI *rwi, albaObserver *Listener=NULL)
Attach camera is disabled by default: use EnableAttachCamera() to enable attaching.
albaObserver * m_Listener
void DisableAttachCamera()
void SetStartingMatrix(vtkMatrix4x4 *matrix)
Set an initial transform matrix before attaching camera.
albaObserver * GetListener()
void CreateGui()
Create GUI for AttachCamera module.
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaVME -
Definition: albaVME.h:150