Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkItkLoggingAdapter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef ItkLoggingAdapter_H_HEADER_INCLUDED
18 #define ItkLoggingAdapter_H_HEADER_INCLUDED
19 
20 #include <MitkCoreExports.h>
21 #include <itkObjectFactory.h>
22 #include <itkOutputWindow.h>
23 
24 namespace mitk
25 {
26  //##Documentation
27  //## @brief Adapter that overwrites the standard itk logging output window and sends the logging messages to the MITK
28  // logging instead.
29  //## @ingroup IO
30 
31  // this class is used to send output to stdout and not the itk window
32  class MITKCORE_EXPORT ItkLoggingAdapter : public itk::OutputWindow
33  {
34  public:
38 
40  itkTypeMacro(ItkLoggingAdapter, itk::OutputWindow);
41 
43  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
44 
48  static void Initialize();
49 
50  virtual void DisplayText(const char *s) override;
51 
52  protected:
54  virtual ~ItkLoggingAdapter();
55 
56  private:
57  ItkLoggingAdapter(const Self &); // purposely not implemented
58  void operator=(const Self &); // purposely not implemented
59  };
60 }
61 
62 #endif /* mitkItkLoggingAdapter_H_HEADER_INCLUDED */
itk::SmartPointer< const Self > ConstPointer
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
Adapter that overwrites the standard itk logging output window and sends the logging messages to the ...