Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::EndoDebug Struct Reference

#include <mitkEndoDebug.h>

Public Member Functions

void SetDebugEnabled (bool _DebugEnabled)
 
bool GetDebugEnabled ()
 
void SetShowImagesInDebug (bool _ShowImagesInDebug)
 
bool GetShowImagesInDebug ()
 
void SetShowImagesTimeOut (vcl_size_t _ShowImagesTimeOut)
 
vcl_size_t GetShowImagesTimeOut ()
 
void SetDebugImagesOutputDirectory (const std::string &_DebugImagesOutputDirectory)
 
std::string GetDebugImagesOutputDirectory () const
 
std::string GetFilenameWithoutExtension (const std::string &s)
 
bool AddFileToDebug (const std::string &fileToDebug)
 
void SetFilesToDebug (const std::set< std::string > &filesToDebug)
 
std::set< std::string > GetFilesToDebug ()
 
bool AddSymbolToDebug (const std::string &symbolToDebug)
 
void SetSymbolsToDebug (const std::set< std::string > &symbolsToDebug)
 
std::set< std::string > GetSymbolsToDebug ()
 
bool DebugFile (const std::string &fileToDebug)
 
bool DebugSymbol (const std::string &symbolToDebug)
 
bool Debug (const std::string &fileToDebug, const std::string &symbol="")
 
void SetLogFile (const std::string &file)
 
void ShowMessage (const std::string &message)
 
 EndoDebug ()
 
virtual ~EndoDebug ()
 

Static Public Member Functions

static EndoDebugGetInstance ()
 
static std::string GetUniqueFileName (const std::string &dir, const std::string &ext="jpg", const std::string &prefix="")
 

Detailed Description

class responsible for handling debug matters in endotracking

Definition at line 36 of file mitkEndoDebug.h.

Constructor & Destructor Documentation

mitk::EndoDebug::EndoDebug ( )

init defaults

Definition at line 48 of file mitkEndoDebug.cpp.

mitk::EndoDebug::~EndoDebug ( )
virtual

delete d pointer

Definition at line 54 of file mitkEndoDebug.cpp.

Member Function Documentation

bool mitk::EndoDebug::AddFileToDebug ( const std::string &  fileToDebug)

add a file to debug ( if one or more files are set ) only those files will be debugged when using the macros below. e.g. call AddFileToDebug("MyClass.cpp"), then statements like endodebug(...) will be evaluated in MyClass.cpp and nowhere else

Definition at line 92 of file mitkEndoDebug.cpp.

bool mitk::EndoDebug::AddSymbolToDebug ( const std::string &  symbolToDebug)

same as files to debug, but the user can provide any symbol string. if one or more symbols are set only for these symbols Debug() will return true

Definition at line 117 of file mitkEndoDebug.cpp.

bool mitk::EndoDebug::Debug ( const std::string &  fileToDebug,
const std::string &  symbol = "" 
)
Returns
the all in all status if debug output should be generated

Definition at line 162 of file mitkEndoDebug.cpp.

References DebugFile().

bool mitk::EndoDebug::DebugFile ( const std::string &  fileToDebug)
Returns
true if file should be debugged

Definition at line 151 of file mitkEndoDebug.cpp.

References filename, and GetFilenameWithoutExtension().

Referenced by Debug().

bool mitk::EndoDebug::DebugSymbol ( const std::string &  symbolToDebug)
Returns
true if symbol should be debugged

Definition at line 142 of file mitkEndoDebug.cpp.

bool mitk::EndoDebug::GetDebugEnabled ( )
Returns
true if debug should be enabled

Definition at line 220 of file mitkEndoDebug.cpp.

std::string mitk::EndoDebug::GetDebugImagesOutputDirectory ( ) const
Returns
true if debug should be enabled

Definition at line 252 of file mitkEndoDebug.cpp.

std::string mitk::EndoDebug::GetFilenameWithoutExtension ( const std::string &  s)
Returns
the basename of a file without path

Definition at line 87 of file mitkEndoDebug.cpp.

Referenced by DebugFile().

std::set< std::string > mitk::EndoDebug::GetFilesToDebug ( )
Returns
the files to be debugged

Definition at line 109 of file mitkEndoDebug.cpp.

EndoDebug & mitk::EndoDebug::GetInstance ( )
static

singleton class

Definition at line 61 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

bool mitk::EndoDebug::GetShowImagesInDebug ( )
Returns
true if debug should be enabled

Definition at line 236 of file mitkEndoDebug.cpp.

vcl_size_t mitk::EndoDebug::GetShowImagesTimeOut ( )
Returns
true if debug should be enabled

Definition at line 260 of file mitkEndoDebug.cpp.

std::set< std::string > mitk::EndoDebug::GetSymbolsToDebug ( )
Returns
the symbols to be debugged

Definition at line 134 of file mitkEndoDebug.cpp.

std::string mitk::EndoDebug::GetUniqueFileName ( const std::string &  dir,
const std::string &  ext = "jpg",
const std::string &  prefix = "" 
)
static

helper function getting unique file name

Definition at line 67 of file mitkEndoDebug.cpp.

References filename.

void mitk::EndoDebug::SetDebugEnabled ( bool  _DebugEnabled)

set if debug is enabled at all

Definition at line 203 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

void mitk::EndoDebug::SetDebugImagesOutputDirectory ( const std::string &  _DebugImagesOutputDirectory)

sets an output directory. if set all images that are shown are also written to that output dir

Definition at line 211 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

void mitk::EndoDebug::SetFilesToDebug ( const std::set< std::string > &  filesToDebug)
See also
AddFileToDebug

Definition at line 101 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

void mitk::EndoDebug::SetLogFile ( const std::string &  file)

set a log file. if a log file is set and debug is activated all messages will be appended to that file

Definition at line 268 of file mitkEndoDebug.cpp.

void mitk::EndoDebug::SetShowImagesInDebug ( bool  _ShowImagesInDebug)

set if debug is enabled at all

Definition at line 228 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

void mitk::EndoDebug::SetShowImagesTimeOut ( vcl_size_t  _ShowImagesTimeOut)

set if debug is enabled at all

Definition at line 244 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

void mitk::EndoDebug::SetSymbolsToDebug ( const std::set< std::string > &  symbolsToDebug)
See also
AddSymbolToDebug

Definition at line 126 of file mitkEndoDebug.cpp.

Referenced by mitk::EndoDebugFromXmlFile::Update().

void mitk::EndoDebug::ShowMessage ( const std::string &  message)

shows a message or writes it to a log file if a file is set (and is valid for writing)

Definition at line 276 of file mitkEndoDebug.cpp.


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