Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 32 of file mitkEndoDebug.h.

Constructor & Destructor Documentation

◆ EndoDebug()

mitk::EndoDebug::EndoDebug ( )

init defaults

Definition at line 44 of file mitkEndoDebug.cpp.

◆ ~EndoDebug()

mitk::EndoDebug::~EndoDebug ( )
virtual

delete d pointer

Definition at line 50 of file mitkEndoDebug.cpp.

Member Function Documentation

◆ AddFileToDebug()

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 88 of file mitkEndoDebug.cpp.

◆ AddSymbolToDebug()

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 113 of file mitkEndoDebug.cpp.

◆ Debug()

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 158 of file mitkEndoDebug.cpp.

References DebugFile().

◆ DebugFile()

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

Definition at line 147 of file mitkEndoDebug.cpp.

References GetFilenameWithoutExtension().

Referenced by Debug().

◆ DebugSymbol()

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

Definition at line 138 of file mitkEndoDebug.cpp.

◆ GetDebugEnabled()

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

Definition at line 216 of file mitkEndoDebug.cpp.

◆ GetDebugImagesOutputDirectory()

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

Definition at line 248 of file mitkEndoDebug.cpp.

◆ GetFilenameWithoutExtension()

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

Definition at line 83 of file mitkEndoDebug.cpp.

Referenced by DebugFile().

◆ GetFilesToDebug()

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

Definition at line 105 of file mitkEndoDebug.cpp.

◆ GetInstance()

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

singleton class

Definition at line 57 of file mitkEndoDebug.cpp.

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

◆ GetShowImagesInDebug()

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

Definition at line 232 of file mitkEndoDebug.cpp.

◆ GetShowImagesTimeOut()

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

Definition at line 256 of file mitkEndoDebug.cpp.

◆ GetSymbolsToDebug()

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

Definition at line 130 of file mitkEndoDebug.cpp.

◆ GetUniqueFileName()

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 63 of file mitkEndoDebug.cpp.

◆ SetDebugEnabled()

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

set if debug is enabled at all

Definition at line 199 of file mitkEndoDebug.cpp.

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

◆ SetDebugImagesOutputDirectory()

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 207 of file mitkEndoDebug.cpp.

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

◆ SetFilesToDebug()

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

Definition at line 97 of file mitkEndoDebug.cpp.

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

◆ SetLogFile()

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 264 of file mitkEndoDebug.cpp.

◆ SetShowImagesInDebug()

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

set if debug is enabled at all

Definition at line 224 of file mitkEndoDebug.cpp.

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

◆ SetShowImagesTimeOut()

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

set if debug is enabled at all

Definition at line 240 of file mitkEndoDebug.cpp.

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

◆ SetSymbolsToDebug()

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

Definition at line 122 of file mitkEndoDebug.cpp.

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

◆ ShowMessage()

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 272 of file mitkEndoDebug.cpp.


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