Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef ItkLoggingAdapter_H_HEADER_INCLUDED
14 #define ItkLoggingAdapter_H_HEADER_INCLUDED
15 
16 #include <MitkCoreExports.h>
17 #include <itkObjectFactory.h>
18 #include <itkOutputWindow.h>
19 
20 namespace mitk
21 {
22  //##Documentation
23  //## @brief Adapter that overwrites the standard itk logging output window and sends the logging messages to the MITK
24  // logging instead.
25  //## @ingroup IO
26 
27  // this class is used to send output to stdout and not the itk window
28  class MITKCORE_EXPORT ItkLoggingAdapter : public itk::OutputWindow
29  {
30  public:
34 
36  itkTypeMacro(ItkLoggingAdapter, itk::OutputWindow);
37 
39  itkFactorylessNewMacro(Self);
40  itkCloneMacro(Self);
41 
45  static void Initialize();
46 
47  void DisplayText(const char *s) override;
48 
49  protected:
51  ~ItkLoggingAdapter() override;
52 
53  private:
54  ItkLoggingAdapter(const Self &); // purposely not implemented
55  void operator=(const Self &); // purposely not implemented
56  };
57 }
58 
59 #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 ...