ALBA
albaActor2dStackHelper.h
Go to the documentation of this file.
1/*=========================================================================
2Program: ALBA (Agile Library for Biomedical Applications)
3Module: albaActor2dStackHelper.h
4Language: C++
5Date: $Date: 2021-01-01 12:00:00 $
6Version: $Revision: 1.0.0.0 $
7Authors: Gianluigi Crimi
8==========================================================================
9Copyright (c) BIC-IOR 2021 (https://github.com/IOR-BIC)
10
11This software is distributed WITHOUT ANY WARRANTY; without even
12the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the above copyright notice for more information.
14=========================================================================*/
15
16#ifndef __albaActor2dStackHelper_h
17#define __albaActor2dStackHelper_h
18
19//----------------------------------------------------------------------------
20// Include :
21//----------------------------------------------------------------------------
22#include "albaDefines.h"
23#include "albaObject.h"
24
25//----------------------------------------------------------------------------
26// Forward references :
27//----------------------------------------------------------------------------
28class vtkPolyDataSource;
29class vtkPolyDataMapper2D;
30class vtkActor2D;
31class vtkRenderer;
32class vtkProperty2D;
33
34struct Color
35{
36 double R;
37 double G;
38 double B;
39 double Alpha;
40};
41
42class ALBA_EXPORT albaActor2dStackHelper
43{
44public:
46 albaActor2dStackHelper(vtkPolyDataSource *source, vtkRenderer *renderer);
48
50 vtkPolyDataSource * GetSource() const { return m_Source; }
51
53 vtkPolyDataMapper2D * GetMapper() const { return m_Mapper; }
54
56 vtkActor2D * GetActor() const { return m_Actor; }
57
59 vtkProperty2D* GetProperty();
60
62 void SetColor(Color col);
63
65 void SetVisibility(bool show);
66
67 vtkRenderer * GetRenderer() const { return m_Renderer; }
68 void SetRenderer(vtkRenderer * val) { m_Renderer = val; }
69
70protected:
71 vtkPolyDataSource *m_Source;
72 vtkPolyDataMapper2D *m_Mapper;
73 vtkActor2D *m_Actor;
74 vtkRenderer *m_Renderer;
75};
76
77#endif
vtkPolyDataSource * m_Source
vtkPolyDataMapper2D * m_Mapper
void SetVisibility(bool show)
Sets actor visibility.
vtkPolyDataSource * GetSource() const
Returns the PolyDataSource.
vtkProperty2D * GetProperty()
Returns the Actor property.
virtual ~albaActor2dStackHelper()
vtkRenderer * GetRenderer() const
vtkActor2D * GetActor() const
Returns the Actor 2D.
void SetColor(Color col)
Sets color and opacity to the actor.
vtkPolyDataMapper2D * GetMapper() const
Returns the Mapper 2D.
void SetRenderer(vtkRenderer *val)
albaActor2dStackHelper(vtkPolyDataSource *source, vtkRenderer *renderer)