ALBA
albaGUILandmark.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUILandmark
5 Authors: Stefano Perticoni - porting Daniele Giunchi
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 __albaGUILandmark_H__
18#define __albaGUILandmark_H__
19
20//----------------------------------------------------------------------------
21// Include :
22//----------------------------------------------------------------------------
23#include "albaDefines.h"
24#include "albaVME.h"
25#include "albaEvent.h"
26#include "albaServiceClient.h"
27#include "albaAbsLogicManager.h"
28
29//----------------------------------------------------------------------------
30// forward references :
31//----------------------------------------------------------------------------
32class albaGUI;
33class albaGUIButton;
37class albaInteractor;
38class albaVMELandmark;
39class albaVMELandmarkCloud;
40
41//----------------------------------------------------------------------------
51class ALBA_EXPORT albaGUILandmark : public albaObserver, public albaServiceClient
52{
53public:
55 albaGUILandmark(albaVME *InputVME, albaObserver *listener = NULL, bool testMode = false);
58
60 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
61
63 virtual void OnEvent(albaEventBase *alba_event);
64
65 //----------------------------------------------------------------------------
66 //gui constants:
67 //----------------------------------------------------------------------------
68
69 // this constants must be visible from the owner object
70 enum
71 {
72 ID_COLOR = MINID,
77 };
78
80 {
84 };
85
89 int GetGuiStatus() {return m_GUIStatus;};
90
91 albaVMELandmarkCloud *GetLandmarkCLoud() {return m_LMCloud;};
92
93 void SetInputVME(albaVME *vme);
94
95 albaGUI *GetGui() {return m_Gui;};
96
97 void SetLMCloudName(const char *name) {m_LMCloudName = name;};
98 const char *GetLMCloudName() {return m_LMCloudName.GetCStr();};
99
100 void SpawnLMOn() {m_SpawnLM = 1;};
101 void SpawnLMOff() {m_SpawnLM = 0;};
102 int GetSpawnLM() {return m_SpawnLM;};
103
104 static bool VmeAccept(albaVME* node) {return(node != NULL);};
105
106 void SetRadiusFromBoundsFraction(int fraction){m_BoundsFraction = fraction;}
107
108protected:
111
113 void CreateGui();
114
116 int AttachInteractor(albaVME *vme, albaInteractor *newInteractor,
117 albaInteractor *storeOldInteractor);
118
119 int AttachInteractor(albaVME *vme, albaInteractor *newInteractor);
120
122
123 void GetSpawnPointCoordinates(double newPointCoord[3]);
125
127
128 void SetGuiAbsPosition(vtkMatrix4x4* absPose, albaTimeStamp timeStamp = -1);
131
133 void SetRefSysVME(albaVME* refSysVME);
134
138
140 double m_Position[3];
141// double m_LMPosition[3];
142
144
151
154
157
160 albaVMELandmarkCloud *m_LMCloud;
161 albaVMELandmark *m_Landmark;
162
163 const char *m_LandmarkName;
164
168
169};
170#endif
MINID
Definition: albaDecl.h:420
double albaTimeStamp
type for time varying data timestamps (not for pipelines timestamps!)
Definition: albaDefines.h:57
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaEvent - Class implementing ALBA application events.
Definition: albaEvent.h:55
albaGUIButton inherit from wxButton.
Definition: albaGUIButton.h:35
Pluggable component for albaOpIterativeRegistration operation.
int AttachInteractor(albaVME *vme, albaInteractor *newInteractor, albaInteractor *storeOldInteractor)
Attach interactor to vme; return 0 on success, -1 otherwise
void OnRefSysVmeChanged()
void OnVmePicked(albaEvent &e)
~albaGUILandmark()
destructor
albaVMELandmark * m_Landmark
void OnTextEntriesChanged()
albaInteractorCompositorMouse * m_IsaCompositor
void OnTranslate(albaEvent &e)
void CreateTranslateISACompositor()
Create interactors.
albaInteractorPicker * m_PickerInteractor
albaGUILandmark(albaVME *InputVME, albaObserver *listener=NULL, bool testMode=false)
constructor
albaInteractorGenericMouse * m_IsaTranslateSnap
void SpawnLandmark()
void UpdateInteractor()
void TextEntriesChanged()
albaString m_LMCloudName
const char * GetLMCloudName()
void SetLMCloudName(const char *name)
void RefSysVmeChanged()
void SetListener(albaObserver *Listener)
Set the event receiver object.
void SetInputVME(albaVME *vme)
albaString m_RefSysVMEName
albaVME * m_InputVME
void GetSpawnPointCoordinates(double newPointCoord[3])
void CreateGui()
Override superclass.
void UpdateGuiInternal()
albaInteractor * m_OldInteractor
albaGUI * GetGui()
void SetGUIStatusToDisabled()
int AttachInteractor(albaVME *vme, albaInteractor *newInteractor)
static bool VmeAccept(albaVME *node)
void SetRefSysVME(albaVME *refSysVME)
const char * m_LandmarkName
void SetRadiusFromBoundsFraction(int fraction)
virtual void OnEvent(albaEventBase *alba_event)
Events handling.
albaVMELandmarkCloud * GetLandmarkCLoud()
void SetGUIStatusToPick()
albaInteractorGenericMouse * m_IsaTranslate
void SetGUIStatusToEnabled()
albaInteractor * m_OldInputVMEBehavior
albaObserver * m_Listener
void SetGuiAbsPosition(vtkMatrix4x4 *absPose, albaTimeStamp timeStamp=-1)
albaVMELandmarkCloud * m_LMCloud
albaVME * m_RefSysVME
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
Associates instances of albaInteractorGenericMouse to mouse buttons and ctrl/shift keys combinations.
Constrained interaction with mouse device.
interactor implementing a picking operation
Abstract class for ALBA interactors This class provides base interface and features of ALBA continuou...
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
albaVME -
Definition: albaVME.h:150