Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkVtkLoggingAdapter.cpp
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 #include "mitkVtkLoggingAdapter.h"
14 #include "mitkLogMacros.h"
15 #include <vtkObjectFactory.h>
16 
17 namespace mitk
18 {
19  vtkStandardNewMacro(VtkLoggingAdapter);
20 }
21 
23 {
25  vtkOutputWindow::SetInstance(vtklog);
26  vtklog->Delete();
27 }
28 
30 {
31  MITK_INFO("VtkText") << t;
32 }
33 
35 {
36  MITK_ERROR("VtkError") << t;
37 }
38 
40 {
41  MITK_WARN("VtkWarning") << t;
42 }
43 
45 {
46  MITK_WARN("VtkGenericWarning") << t;
47 }
48 
50 {
51  MITK_DEBUG("VtkDebug") << t;
52 }
static void Initialize()
Initializes the logging adapter. Vtk logging messages are redirected to MITK logging afterwards...
#define MITK_INFO
Definition: mitkLogMacros.h:18
void DisplayText(const char *t) override
#define MITK_ERROR
Definition: mitkLogMacros.h:20
#define MITK_DEBUG
Definition: mitkLogMacros.h:22
DataCollection - Class to facilitate loading/accessing structured data.
static VtkLoggingAdapter * New()
#define MITK_WARN
Definition: mitkLogMacros.h:19
void DisplayDebugText(const char *t) override
vtkStandardNewMacro(AnatomicalStructureColorPresets)
void DisplayGenericWarningText(const char *t) override
void DisplayWarningText(const char *t) override
void DisplayErrorText(const char *t) override
Adapter that overwrites the standard vtk logging output window and sends the logging messages to the ...