ALBA
albaSceneGraph.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaSceneGraph
5 Authors: Silvano Imboden
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#ifndef __albaSceneGraph_H__
17#define __albaSceneGraph_H__
18//----------------------------------------------------------------------------
19// includes :
20//----------------------------------------------------------------------------
21#include "albaDecl.h"
22#include "albaEvent.h"
23#include "albaObserver.h"
24#include "albaServiceClient.h"
25#include "albaAbsLogicManager.h"
26
27//----------------------------------------------------------------------------
28// forward references :
29//----------------------------------------------------------------------------
30class albaVME;
31class albaGUI;
32class albaView;
33class albaSceneNode;
34class vtkRenderer;
35
36//----------------------------------------------------------------------------
37// albaSceneGraph :
38//----------------------------------------------------------------------------
39class ALBA_EXPORT albaSceneGraph : public albaServiceClient /*, public albaObserver*/
40{
41public:
42 albaSceneGraph(albaView *view, vtkRenderer *ren1, vtkRenderer *ren2=NULL, vtkRenderer *ren3 = NULL);
43 virtual ~albaSceneGraph();
44 virtual void SetListener(albaObserver *Listener) {m_Listener = Listener;};
45 //virtual void OnEvent(albaEvent& e);
46
48 virtual void VmeAdd(albaVME *vme);
49
51 virtual void VmeRemove(albaVME *vme);
52
54 virtual void VmeSelect(albaVME *vme, bool select);
55
57 virtual void VmeShow(albaVME *vme, bool show);
58
60 virtual void VmeShowByType(albaVME *vme, bool show);
61
63 virtual void VmeShowSubTree(albaVME *vme, bool show);
64
66 virtual void VmeUpdateProperty(albaVME *vme, bool fromTag = false);
67
70
72 albaSceneNode *GetNodeList() {return m_List;};
73
74 vtkRenderer *m_RenFront;
75 vtkRenderer *m_RenBack;
77
79
82 virtual albaVME *GetSelectedVme() {return m_SelectedVme;};
83
86 virtual int GetNodeStatus (albaVME *node);
87
89 virtual void Print(std::ostream& os, const int tabs=0);// const;
90
91protected:
94 virtual void DeleteNodeList(albaSceneNode *n);
95
97
102
103};
104#endif
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
albaSceneNode * GetNodeList()
Return the list of node that are added to the view.
virtual void Print(std::ostream &os, const int tabs=0)
print a dump of this object
vtkRenderer * m_AlwaysVisibleRenderer
virtual int GetNodeStatus(albaVME *node)
Used by the albaGUICheckTree - return the status of a SceneNode.
virtual albaVME * GetSelectedVme()
Return the selected vme.
albaView * m_View
< Renderer used to superimpose utility stuff to main render window
virtual void VmeShow(albaVME *vme, bool show)
Change the visibility of the vme and if necessary create the vme related pipe.
virtual void DeleteNodeList(albaSceneNode *n)
recursively kill all node - starting from the tail of the list.
virtual void VmeSelect(albaVME *vme, bool select)
Select a vme and store a reference to it into m_SelectedVme variable.
virtual void VmeShowSubTree(albaVME *vme, bool show)
Show all the vme subtree.
vtkRenderer * m_RenBack
pointer to the back renderer
vtkRenderer * m_RenFront
pointer to the front renderer
virtual albaSceneNode * Vme2Node(albaVME *vme)
Find the corresponding vme's node.
albaSceneNode * NodeAdd(albaVME *vme)
albaSceneNode * m_List
list of visualized node
albaVME * m_SelectedVme
virtual void VmeShowByType(albaVME *vme, bool show)
Show/Hide the Vme with the same type of the passed vme.
albaObserver * m_Listener
virtual void VmeRemove(albaVME *vme)
Remove a vme from the scene graph.
albaSceneGraph(albaView *view, vtkRenderer *ren1, vtkRenderer *ren2=NULL, vtkRenderer *ren3=NULL)
virtual void VmeUpdateProperty(albaVME *vme, bool fromTag=false)
Update the vme's properties.
virtual void SetListener(albaObserver *Listener)
virtual ~albaSceneGraph()
virtual void VmeAdd(albaVME *vme)
Add a vme to the scene graph.
albaSceneNode is a node of albaScenegraph.
Definition: albaSceneNode.h:32
albaVME -
Definition: albaVME.h:150
albaView is the base class for Views in alba.
Definition: albaView.h:79