ALBA
albaVMEOutput.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaVMEOutput
5 Authors: Marco Petrone
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 __albaVMEOutput_h
17#define __albaVMEOutput_h
18//----------------------------------------------------------------------------
19// includes :
20//----------------------------------------------------------------------------
21#include "albaObject.h"
22#include "albaSmartPointer.h"
23#include "albaString.h"
24#include "albaOBB.h"
25#include "albaDecl.h" // for MINID
26//----------------------------------------------------------------------------
27// forward declarations :
28//----------------------------------------------------------------------------
29class albaVME;
30class albaMatrix;
31#ifdef ALBA_EXPORTS
32#include "albaTransformBase.h"
33#else
35#endif
36class albaOBB;
37class albaVMEIterator;
38class albaGUI;
39#ifdef ALBA_USE_VTK
40class vtkDataSet;
41#endif //ALBA_USE_VTK
42
43#ifdef ALBA_EXPORTS
44template class ALBA_EXPORT albaAutoPointer<albaTransformBase>;
45#endif
46
55class ALBA_EXPORT albaVMEOutput : public albaObject
56{
57public:
59 virtual ~albaVMEOutput();
60
62
64 albaVME *GetVME() const {return m_VME;}
65
67 void SetVME(albaVME *vme) {m_VME=vme;}
68
70 virtual void Print(std::ostream& os, const int tabs=0);// const;
71
73 void GetPose(double &x,double &y,double &z,double &rx,double &ry,double &rz,albaTimeStamp t=-1) const;
75 void GetPose(double xyz[3],double rxyz[3],albaTimeStamp t=-1) const;
77 virtual void GetMatrix(albaMatrix &matrix,albaTimeStamp t=-1) const;
82
86 virtual void SetTransform(albaTransformBase *trans);
87
89 void GetAbsMatrix(albaMatrix &matrix,albaTimeStamp t=-1) const;
94
96 void GetAbsPose(double &x,double &y,double &z,double &rx,double &ry,double &rz,albaTimeStamp t=-1) const;
98 void GetAbsPose(double xyz[3],double rxyz[3],albaTimeStamp t=-1) const;
99
100#ifdef ALBA_USE_VTK
109 virtual vtkDataSet *GetVTKData();
110#endif
111
116 virtual const char *GetDataType() const {return m_DataType;}
117
120 virtual void Update();
121
125 void GetTimeBounds(albaTimeStamp tbounds[2]) const;
126
132 void GetLocalTimeBounds(albaTimeStamp tbounds[2]) const;
133
137 void GetVME4DBounds(double bounds[6]) const;
138 void GetVME4DBounds(albaOBB &bounds) const;
139
143 void Get4DBounds(double bounds[6]) const;
144 void Get4DBounds(albaOBB &bounds) const;
145
149 void GetBounds(double bounds[6]) const;
150 virtual void GetBounds(albaOBB &bounds,albaTimeStamp t=-1, albaVMEIterator *iter=NULL) const;
151
155 void GetVMEBounds(double bounds[6]) const;
156 virtual void GetVMEBounds(albaOBB &bounds,albaTimeStamp t=-1, albaVMEIterator *iter=NULL) const;
157
161 void GetVMELocalBounds(double bounds[6]) const;
162 virtual void GetVMELocalBounds(albaOBB &bounds,albaTimeStamp t=-1, albaVMEIterator *iter=NULL) const;
163
166
169 void SetBounds(const albaOBB &bounds);
170
173 {
174 ID_FIRST = MINID,
175 ID_LAST
176 };
177
180
182 void DeleteGui();
183
184protected:
192 virtual albaGUI *CreateGui();
193
195 virtual void GetDataBounds(albaOBB &bounds,albaTimeStamp t) const;
196
201
203
204private:
205 albaVMEOutput(const albaVMEOutput&); // Not implemented
206 void operator=(const albaVMEOutput&); // Not implemented
207};
208
209#endif
MINID
Definition: albaDecl.h:420
double albaTimeStamp
type for time varying data timestamps (not for pipelines timestamps!)
Definition: albaDefines.h:57
Hold a reference to a T instance.
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
albaMatrix - Time stamped 4x4 Matrix.
Definition: albaMatrix.h:44
This class simply stores a Box boundary (i.e.
Definition: albaOBB.h:37
Abstract superclass for all ALBA classes implementing RTTI APIs.
Definition: albaObject.h:38
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
Superclass for Homogeneous transformations.
albaVMEIterator - an m-way tree data structure iterator albaVMEIterator is a class to traverse a tree...
albaVMEOutput - the output data structure of a VME node.
Definition: albaVMEOutput.h:56
void GetAbsMatrix(albaMatrix &matrix, albaTimeStamp t=-1) const
Get the global pose matrix of this VME for the given time "t".
virtual void Update()
Update all the output data structures (data, bounds, matrix and abs matrix).
void GetTimeBounds(albaTimeStamp tbounds[2]) const
Return the TimeBounds of the whole subtree, i.e recurse the GetLocalTimeBounds() function over all th...
albaVME * GetVME() const
return the VME connected to this object
Definition: albaVMEOutput.h:64
void Get4DBounds(albaOBB &bounds) const
void GetPose(double &x, double &y, double &z, double &rx, double &ry, double &rz, albaTimeStamp t=-1) const
Return the VME pose, this function queries the MatrixPipe for producing a matrix.
albaTimeStamp GetTimeStamp() const
return the time for which this output was computed
void GetBounds(double bounds[6]) const
Return the space bound of the subtree for the current time, taking in consideration the current data ...
virtual void Print(std::ostream &os, const int tabs=0)
print a dump of this object
virtual albaTransformBase * GetTransform() const
Return the transform generating the pose matrix of the VME.
albaAutoPointer< albaTransformBase > m_Transform
the transform generating the output pose matrix
albaString m_DataType
the type of data stored in object expressed as a string
void GetAbsPose(double xyz[3], double rxyz[3], albaTimeStamp t=-1) const
Get the global pose of this VME for the given time "t".
void GetVMELocalBounds(double bounds[6]) const
Return the local space bound (in local coordinates) of the VME (not the whole subtree) for the curren...
albaAbstractTypeMacro(albaVMEOutput, albaObject)
void GetVME4DBounds(double bounds[6]) const
Extract the 4D bounds for this VME only, i.e.
virtual void GetVMELocalBounds(albaOBB &bounds, albaTimeStamp t=-1, albaVMEIterator *iter=NULL) const
void GetVMEBounds(double bounds[6]) const
Return the space bound of the VME (not the subtree) for the current time, taking in consideration the...
albaMatrix * GetAbsMatrix() const
Get the global pose matrix of this VME for the given time "t".
virtual void SetTransform(albaTransformBase *trans)
Used by source VME to set internal pointer to Transform: do not use this method directly,...
virtual albaGUI * CreateGui()
Internally used to create a new instance of the GUI.
albaOBB m_Bounds
bounds of the output data (i.e. for current time)
virtual const char * GetDataType() const
Return the DataType to be produced as output.
albaGUI * m_Gui
user interface
void DeleteGui()
destroy the Gui
albaGUI * GetGui()
create and return the GUI for changing the node parameters
void SetVME(albaVME *vme)
internally used to set the VME connected to this object
Definition: albaVMEOutput.h:67
virtual void GetDataBounds(albaOBB &bounds, albaTimeStamp t) const
retrieve bounds of the output data not considering the VME pose matrix and the visibility.
albaVME * m_VME
pointer to source VME
void SetBounds(const albaOBB &bounds)
Used by source VME to set internal bounds structure: never use this method directly.
virtual void GetMatrix(albaMatrix &matrix, albaTimeStamp t=-1) const
Return the VME pose.
albaMatrix * GetMatrix() const
Return the VME pose matrix for the current time.
virtual ~albaVMEOutput()
void GetLocalTimeBounds(albaTimeStamp tbounds[2]) const
Get TimeBounds for this VME.
void GetVME4DBounds(albaOBB &bounds) const
virtual albaTransformBase * GetAbsTransform() const
return the transform representing the Abs pose (typically the VME's AbsMatrix pipe)
VMEOUTPUT_WIDGET_ID
IDs for the GUI.
virtual void GetBounds(albaOBB &bounds, albaTimeStamp t=-1, albaVMEIterator *iter=NULL) const
virtual void GetVMEBounds(albaOBB &bounds, albaTimeStamp t=-1, albaVMEIterator *iter=NULL) const
void GetAbsPose(double &x, double &y, double &z, double &rx, double &ry, double &rz, albaTimeStamp t=-1) const
Get the global pose of this VME for the given time "t".
void Get4DBounds(double bounds[6]) const
Extract the 4D bounds for all the subtree starting a this VME, i.e.
void GetPose(double xyz[3], double rxyz[3], albaTimeStamp t=-1) const
Return the VME pose.
albaVME -
Definition: albaVME.h:150