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