Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::ScreenShotListener Class Reference

If KEY_F5 is activated screenshot is stored to given basename + screenshot count. More...

#include <GLviewer/Controller/ScreenShotListener.hh>

+ Inheritance diagram for BIAS::ScreenShotListener:
+ Collaboration diagram for BIAS::ScreenShotListener:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
void AllowGreyImages (bool storeGrey=true)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
virtual bool FinishedDraw ()
 this function is called by RenderContextBase when drawing is done. More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
virtual
BIAS::GLProjectionParametersInterface
GetGLProjectionParametersInterface ()
 Get the camera projection parameters. More...
 
virtual std::string GetName ()
 Get the name of the controller. More...
 
void Init (RenderContextBase *context, const std::string &baseName, const std::string &extension, const std::string &descriptor="", bool storeDepthMap=false, bool storeZBuffer=false, bool storeMetricZMap=false)
 
virtual bool LeftAndRightMouseMoved (int, int, int, int)
 react to mouse movement while right and middle button held down overwrite in derived class of desired More...
 
virtual bool LeftMouseDoubleClicked (int, int, int m)
 react to left mouse double click overwrite in derived class of desired More...
 
virtual bool LeftMouseDown (int, int)
 react to left mouse button down event overwrite in derived class of desired More...
 
virtual bool LeftMouseMoved (int, int, int, int)
 react to mouse movement while left button held down overwrite in derived class of desired More...
 
virtual bool LeftMouseSingleClicked (int, int)
 react to left mouse single click overwrite in derived class of desired More...
 
virtual bool LeftMouseUp (int, int)
 react to left mouse button up event overwrite in derived class of desired More...
 
virtual bool MiddleMouseDown (int, int)
 react to middle mouse button down event overwrite in derived class of desired More...
 
virtual bool MiddleMouseMoved (int, int, int, int)
 react to mouse movement while middle button held down overwrite in derived class of desired More...
 
virtual bool MiddleMouseUp (int, int)
 react to middle mouse button up event overwrite in derived class of desired More...
 
virtual bool MouseLeftWindow ()
 react to mouse leaving the window overwrite in derived class of desired More...
 
virtual bool MouseMoved (int, int)
 react to mouse movement overwrite in derived class of desired More...
 
virtual bool MouseWheelUsed (double stepsize)
 react to mouse wheel usage overwrite in derived class of desired More...
 
virtual std::string Name ()
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void ResetCounter ()
 
virtual bool RightMouseDoubleClicked (int, int)
 react to right mouse double click overwrite in derived class of desired More...
 
virtual bool RightMouseDown (int, int)
 react to right mouse button down event overwrite in derived class of desired More...
 
virtual bool RightMouseMoved (int, int, int, int)
 react to mouse movement while right button held down overwrite in derived class of desired More...
 
virtual bool RightMouseSingleClicked (int, int)
 react to right mouse single click event overwrite in derived class of desired More...
 
virtual bool RightMouseUp (int, int)
 react to right mouse button up event overwrite in derived class of desired More...
 
 ScreenShotListener ()
 
 ScreenShotListener (RenderContextBase *context, const std::string &baseName, const std::string &extension, const std::string &descriptor="", bool storeDepthMap=false, bool storeZBuffer=false, bool storeMetricZMap=false)
 
void ScreenShotOnTimer (bool active=true)
 
void SetCounter (int counter)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetDescriptor (const std::string &descriptor)
 
virtual void SetGLProjectionParametersInterface (BIAS::GLProjectionParametersInterface *interface_)
 Set the camera projection parameters. More...
 
virtual void SetName (std::string name)
 Set the name of the controller. More...
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
virtual bool SpecialKeyPressed (int key)
 react to press of special keys such as F1-F12, ... More...
 
virtual bool SpecialKeyUp (int)
 react to press of special keys such as F1-F12, ... More...
 
virtual bool StandardKeyPressed (unsigned char, int, int)
 react to press of ascii-coded charakter plus pointer position More...
 
virtual bool StandardKeyUp (unsigned char, int, int)
 react to press of ascii-coded charakter plus pointer position More...
 
void StoreCameraParams (bool on=false)
 
void StoreDepthMap (bool on=true)
 
void StoreProjectionParams (bool on=false)
 
bool StoreScreenShot ()
 
bool TimerExpired ()
 this function is called by RenderContextBase when timer is expired Overwrite and implement to do some timer dependend processing More...
 
void UseSlotParameters (int slot)
 the parameters written into the metadata of screenshot are either taken from the slot specified. More...
 
virtual bool WindowReshape (int, int)
 this function is called by RenderContextBase if the window is reshaped. More...
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
bool StoreNextScreenShot_ ()
 
bool StoreNextScreenShotCameraParams_ ()
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
int activeSlotParameter_
 
RenderContextBasecontext_
 
BIAS::GLProjectionParametersInterfacecontrolledObject_
 the camera which is controlled by this controller More...
 
std::string descriptor_
 
std::string listenerName_
 name of listener/controller More...
 
std::string screenShotBaseName_
 
int screenshotCounter_
 
std::string screenShotExtension_
 
bool screenShotOnTimer_
 
bool storeDepthMap_
 
bool storeGrey_
 
bool storeMetricZMap_
 
bool storeParams_
 
bool storeProjectionParams_
 
bool storeZBuffer_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

If KEY_F5 is activated screenshot is stored to given basename + screenshot count.

Author
bartczak

Definition at line 14 of file ScreenShotListener.hh.

Constructor & Destructor Documentation

BIAS::ScreenShotListener::ScreenShotListener ( )

Definition at line 10 of file ScreenShotListener.cpp.

BIAS::ScreenShotListener::ScreenShotListener ( RenderContextBase context,
const std::string &  baseName,
const std::string &  extension,
const std::string &  descriptor = "",
bool  storeDepthMap = false,
bool  storeZBuffer = false,
bool  storeMetricZMap = false 
)

Definition at line 15 of file ScreenShotListener.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

void BIAS::ScreenShotListener::AllowGreyImages ( bool  storeGrey = true)
inline

Definition at line 40 of file ScreenShotListener.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

virtual bool BIAS::ControlInterface::FinishedDraw ( )
inlinevirtualinherited

this function is called by RenderContextBase when drawing is done.

Overwrite and implement to do some processing after drawing

Definition at line 193 of file ControlInterface.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

virtual BIAS::GLProjectionParametersInterface* BIAS::ControlInterface::GetGLProjectionParametersInterface ( )
inlinevirtualinherited

Get the camera projection parameters.

Can be of type GLProjection or any from GLProjectionParametersBase derived class

Returns
Pointer to GLProjectionParametersInterface

Definition at line 207 of file ControlInterface.hh.

virtual std::string BIAS::ControlInterface::GetName ( )
inlinevirtualinherited

Get the name of the controller.

Definition at line 70 of file ControlInterface.hh.

void BIAS::ScreenShotListener::Init ( RenderContextBase context,
const std::string &  baseName,
const std::string &  extension,
const std::string &  descriptor = "",
bool  storeDepthMap = false,
bool  storeZBuffer = false,
bool  storeMetricZMap = false 
)

Definition at line 29 of file ScreenShotListener.cpp.

virtual bool BIAS::ControlInterface::LeftAndRightMouseMoved ( int  ,
int  ,
int  ,
int   
)
inlinevirtualinherited

react to mouse movement while right and middle button held down overwrite in derived class of desired

Reimplemented in BIAS::OnlyRotationControl, BIAS::TrackballControl, BIAS::TrackballTransControl, and BIAS::FlyControl.

Definition at line 140 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::LeftAndRightMouseMoved().

virtual bool BIAS::ControlInterface::LeftMouseDoubleClicked ( int  ,
int  ,
int  m 
)
inlinevirtualinherited

react to left mouse double click overwrite in derived class of desired

Reimplemented in BIAS::TrackballControl, and BIAS::DistanceMeasureControl.

Definition at line 84 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::LeftMouseDoubleClicked().

virtual bool BIAS::ControlInterface::LeftMouseDown ( int  ,
int   
)
inlinevirtualinherited

react to left mouse button down event overwrite in derived class of desired

Definition at line 99 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::LeftMouseDown().

virtual bool BIAS::ControlInterface::LeftMouseMoved ( int  ,
int  ,
int  ,
int   
)
inlinevirtualinherited

react to mouse movement while left button held down overwrite in derived class of desired

Reimplemented in BIAS::TrackballControl, BIAS::TrackballTransControl, BIAS::FlyControl, and BIAS::OnlyRotationControl.

Definition at line 94 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::LeftMouseMoved().

virtual bool BIAS::ControlInterface::LeftMouseSingleClicked ( int  ,
int   
)
inlinevirtualinherited

react to left mouse single click overwrite in derived class of desired

Definition at line 89 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::LeftMouseSingleClicked().

virtual bool BIAS::ControlInterface::LeftMouseUp ( int  ,
int   
)
inlinevirtualinherited

react to left mouse button up event overwrite in derived class of desired

Definition at line 104 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::LeftMouseUp().

virtual bool BIAS::ControlInterface::MiddleMouseDown ( int  ,
int   
)
inlinevirtualinherited

react to middle mouse button down event overwrite in derived class of desired

Definition at line 145 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::MiddleMouseDown().

virtual bool BIAS::ControlInterface::MiddleMouseMoved ( int  ,
int  ,
int  ,
int   
)
inlinevirtualinherited

react to mouse movement while middle button held down overwrite in derived class of desired

Reimplemented in BIAS::TrackballControl, BIAS::TrackballTransControl, BIAS::OnlyRotationControl, and BIAS::FlyControl.

Definition at line 135 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::MiddleMouseMoved().

virtual bool BIAS::ControlInterface::MiddleMouseUp ( int  ,
int   
)
inlinevirtualinherited

react to middle mouse button up event overwrite in derived class of desired

Definition at line 150 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::MiddleMouseUp().

virtual bool BIAS::ControlInterface::MouseLeftWindow ( )
inlinevirtualinherited

react to mouse leaving the window overwrite in derived class of desired

Definition at line 160 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::MouseLeftWindow().

virtual bool BIAS::ControlInterface::MouseMoved ( int  ,
int   
)
inlinevirtualinherited

react to mouse movement overwrite in derived class of desired

Reimplemented in BIAS::DistanceMeasureControl.

Definition at line 155 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::MouseMoved().

virtual bool BIAS::ControlInterface::MouseWheelUsed ( double  stepsize)
inlinevirtualinherited

react to mouse wheel usage overwrite in derived class of desired

Reimplemented in BIAS::TrackballControl, and BIAS::TrackballTransControl.

Definition at line 79 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::MouseWheelUsed().

virtual std::string BIAS::ScreenShotListener::Name ( )
inlinevirtual

Definition at line 38 of file ScreenShotListener.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::ScreenShotListener::ResetCounter ( )
inline

Definition at line 56 of file ScreenShotListener.hh.

virtual bool BIAS::ControlInterface::RightMouseDoubleClicked ( int  ,
int   
)
inlinevirtualinherited

react to right mouse double click overwrite in derived class of desired

Reimplemented in BIAS::OnlyRotationControl.

Definition at line 115 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::RightMouseDoubleClicked().

virtual bool BIAS::ControlInterface::RightMouseDown ( int  ,
int   
)
inlinevirtualinherited

react to right mouse button down event overwrite in derived class of desired

Definition at line 125 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::RightMouseDown().

virtual bool BIAS::ControlInterface::RightMouseMoved ( int  ,
int  ,
int  ,
int   
)
inlinevirtualinherited

react to mouse movement while right button held down overwrite in derived class of desired

Reimplemented in BIAS::FlyControl, BIAS::TrackballTransControl, BIAS::TrackballControl, and BIAS::OnlyRotationControl.

Definition at line 120 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::RightMouseMoved().

virtual bool BIAS::ControlInterface::RightMouseSingleClicked ( int  ,
int   
)
inlinevirtualinherited

react to right mouse single click event overwrite in derived class of desired

Definition at line 110 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::RightMouseSingleClicked().

virtual bool BIAS::ControlInterface::RightMouseUp ( int  ,
int   
)
inlinevirtualinherited

react to right mouse button up event overwrite in derived class of desired

Definition at line 130 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::RightMouseUp().

void BIAS::ScreenShotListener::ScreenShotOnTimer ( bool  active = true)
inline

Definition at line 35 of file ScreenShotListener.hh.

void BIAS::ScreenShotListener::SetCounter ( int  counter)
inline

Definition at line 60 of file ScreenShotListener.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

void BIAS::ScreenShotListener::SetDescriptor ( const std::string &  descriptor)
inline

Definition at line 44 of file ScreenShotListener.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

virtual void BIAS::ControlInterface::SetGLProjectionParametersInterface ( BIAS::GLProjectionParametersInterface interface_)
inlinevirtualinherited

Set the camera projection parameters.

Can be of type GLProjection or any from GLProjectionParametersBase derived class

Reimplemented in BIAS::TrackballControl.

Definition at line 198 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::SetControl(), BIAS::TrackballControl::SetGLProjectionParametersInterface(), and BIAS::RenderContextBase::SetGLProjectionParametersInterface().

virtual void BIAS::ControlInterface::SetName ( std::string  name)
inlinevirtualinherited

Set the name of the controller.

Definition at line 74 of file ControlInterface.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

bool BIAS::ScreenShotListener::SpecialKeyPressed ( int  )
virtual

react to press of special keys such as F1-F12, ...

overwrite in derived class of desired

Reimplemented from BIAS::ControlInterface.

Definition at line 52 of file ScreenShotListener.cpp.

virtual bool BIAS::ControlInterface::SpecialKeyUp ( int  )
inlinevirtualinherited

react to press of special keys such as F1-F12, ...

overwrite in derived class of desired

Definition at line 170 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::SpecialKeyUp().

virtual bool BIAS::ControlInterface::StandardKeyPressed ( unsigned char  ,
int  ,
int   
)
inlinevirtualinherited

react to press of ascii-coded charakter plus pointer position

Reimplemented in BIAS::biasGLviewerGLUT.

Definition at line 174 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::StandardKeyPressed().

virtual bool BIAS::ControlInterface::StandardKeyUp ( unsigned  char,
int  ,
int   
)
inlinevirtualinherited

react to press of ascii-coded charakter plus pointer position

Definition at line 178 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::StandardKeyUp().

void BIAS::ScreenShotListener::StoreCameraParams ( bool  on = false)
inline

Definition at line 33 of file ScreenShotListener.hh.

void BIAS::ScreenShotListener::StoreDepthMap ( bool  on = true)
inline

Definition at line 32 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::StoreNextScreenShot_ ( )
protected
bool BIAS::ScreenShotListener::StoreNextScreenShotCameraParams_ ( )
protected

Definition at line 79 of file ScreenShotListener.cpp.

void BIAS::ScreenShotListener::StoreProjectionParams ( bool  on = false)
inline

Definition at line 34 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::StoreScreenShot ( )
inline

Definition at line 42 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::TimerExpired ( )
virtual

this function is called by RenderContextBase when timer is expired Overwrite and implement to do some timer dependend processing

Reimplemented from BIAS::ControlInterface.

Definition at line 68 of file ScreenShotListener.cpp.

void BIAS::ScreenShotListener::UseSlotParameters ( int  slot)
inline

the parameters written into the metadata of screenshot are either taken from the slot specified.

Which will then be the parameters with an absolute pose (relative to rig on the contrary). If slot is invalid (e.g negative) the whole projection is written into image metadata.

Definition at line 54 of file ScreenShotListener.hh.

virtual bool BIAS::ControlInterface::WindowReshape ( int  ,
int   
)
inlinevirtualinherited

this function is called by RenderContextBase if the window is reshaped.

Overwrite and implement to do some processing upon reshape

Definition at line 188 of file ControlInterface.hh.

Referenced by BIAS::RenderContextBase::WindowReshape().

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

int BIAS::ScreenShotListener::activeSlotParameter_
protected

Definition at line 65 of file ScreenShotListener.hh.

RenderContextBase* BIAS::ScreenShotListener::context_
protected

Definition at line 68 of file ScreenShotListener.hh.

BIAS::GLProjectionParametersInterface* BIAS::ControlInterface::controlledObject_
protectedinherited

the camera which is controlled by this controller

Definition at line 214 of file ControlInterface.hh.

std::string BIAS::ScreenShotListener::descriptor_
protected

Definition at line 71 of file ScreenShotListener.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

std::string BIAS::ControlInterface::listenerName_
protectedinherited

name of listener/controller

Definition at line 208 of file ControlInterface.hh.

std::string BIAS::ScreenShotListener::screenShotBaseName_
protected

Definition at line 70 of file ScreenShotListener.hh.

int BIAS::ScreenShotListener::screenshotCounter_
protected

Definition at line 69 of file ScreenShotListener.hh.

std::string BIAS::ScreenShotListener::screenShotExtension_
protected

Definition at line 72 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::screenShotOnTimer_
protected

Definition at line 76 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::storeDepthMap_
protected

Definition at line 73 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::storeGrey_
protected

Definition at line 77 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::storeMetricZMap_
protected

Definition at line 74 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::storeParams_
protected

Definition at line 78 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::storeProjectionParams_
protected

Definition at line 79 of file ScreenShotListener.hh.

bool BIAS::ScreenShotListener::storeZBuffer_
protected

Definition at line 75 of file ScreenShotListener.hh.


The documentation for this class was generated from the following files: