ALBA
albaPipeBox.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaPipeBox
5 Authors: Silvano Imboden, 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 __albaPipeBox_H__
18#define __albaPipeBox_H__
19
20#include "albaPipe.h"
21//----------------------------------------------------------------------------
22// forward refs :
23//----------------------------------------------------------------------------
24class vtkOutlineCornerFilter;
25class vtkOutlineSource;
26class vtkPolyDataMapper;
27class albaLODActor;
28class vtkProperty;
29class albaAxes;
30
31//----------------------------------------------------------------------------
32// albaPipeBox :
33//----------------------------------------------------------------------------
34class ALBA_EXPORT albaPipeBox : public albaPipe
35{
36public:
38
40 virtual ~albaPipeBox ();
41
43 virtual void OnEvent(albaEventBase *alba_event);
44
45 virtual void Create(albaSceneNode *n /*,bool use_axes = true*/ ); //Can't add parameters - is Virtual
46 virtual void Select(bool select);
47
48 void SetBoundsMode(int mode){if(mode>=BOUNDS_3D && mode<=BOUNDS_4D_SUBTREE)m_BoundsMode=mode;};
49 int GetBoundsMode(){return m_BoundsMode;};
50
51
54 {
55 ID_BOUNDS_MODE = Superclass::ID_LAST,
56 ID_LAST
57 };
58
60 {
61 BOUNDS_3D = 0,
64 BOUNDS_4D_SUBTREE
65 };
66
67protected:
68
69 vtkOutlineSource *m_Box;
70 vtkPolyDataMapper *m_Mapper;
72 vtkOutlineCornerFilter *m_OutlineBox;
73 vtkPolyDataMapper *m_OutlineMapper;
74 vtkProperty *m_OutlineProperty;
77
79
80 void UpdateProperty(bool fromTag = false);
81 virtual albaGUI *CreateGui();
82};
83#endif // __albaPipeBox_H__
Create 3D axes representation and insert them in the passed renderer: axes can be global (World Coord...
Definition: albaAxes.h:72
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
vtkOutlineSource * m_Box
Definition: albaPipeBox.h:69
@ BOUNDS_3D_SUBTREE
Definition: albaPipeBox.h:63
virtual void OnEvent(albaEventBase *alba_event)
process events coming from gui
virtual void Create(albaSceneNode *n)
The real setup must be performed here - not in the ctor.
virtual albaGUI * CreateGui()
< Renderer used to superimpose utility stuff to main render window
albaTypeMacro(albaPipeBox, albaPipe)
vtkPolyDataMapper * m_Mapper
Definition: albaPipeBox.h:70
albaLODActor * m_Actor
Definition: albaPipeBox.h:71
PIPE_BOX_WIDGET_ID
IDs for the GUI.
Definition: albaPipeBox.h:54
albaAxes * m_Axes
Definition: albaPipeBox.h:76
int GetBoundsMode()
Definition: albaPipeBox.h:49
virtual void Select(bool select)
Change the visibility of the bounding box actor representing the selection for the vme.
int m_BoundsMode
Definition: albaPipeBox.h:78
vtkProperty * m_OutlineProperty
Definition: albaPipeBox.h:74
albaLODActor * m_OutlineActor
Definition: albaPipeBox.h:75
vtkOutlineCornerFilter * m_OutlineBox
Definition: albaPipeBox.h:72
vtkPolyDataMapper * m_OutlineMapper
Definition: albaPipeBox.h:73
void SetBoundsMode(int mode)
Definition: albaPipeBox.h:48
void UpdateProperty(bool fromTag=false)
Update the properties.
virtual ~albaPipeBox()
albaSceneNode is a node of albaScenegraph.
Definition: albaSceneNode.h:32