Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkImageCaster.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 mitkImageCaster_h
14 #define mitkImageCaster_h
15 
16 #include <itkCastImageFilter.h>
17 #include <itkImage.h>
18 #include <mitkImageCast.h>
19 #include <mitkSurface.h>
20 #include <vtkRenderWindow.h>
21 
22 #include <boost/preprocessor/seq/for_each.hpp>
23 #include <boost/preprocessor/tuple/rem.hpp>
24 
25 #define DeclareMitkImageCasterMethods(r, data, type) \
26  static void CastToItkImage(const mitk::Image *, itk::SmartPointer<itk::Image<BOOST_PP_TUPLE_REM(2) type>> &); \
27  static void CastToMitkImage(const itk::Image<BOOST_PP_TUPLE_REM(2) type> *, itk::SmartPointer<mitk::Image> &);
28 
29 namespace mitk
30 {
37  {
38  public:
41 
42  static void CastBaseData(mitk::BaseData *const, itk::SmartPointer<mitk::Image> &);
43  };
44 
46  {
47  public:
48  static void Cast(BaseData *dat, Surface *surface);
49  };
50 
52  {
53  public:
54  static void Set3DRenderer(vtkRenderer *renderer);
55  static vtkRenderer *Get3DRenderer();
56 
57  protected:
58  static vtkRenderer *m_3DRenderer;
59  };
60 } // namespace mitk
61 
62 #endif
MITK_ACCESSBYITK_TYPES_DIMN_SEQ
#define MITK_ACCESSBYITK_TYPES_DIMN_SEQ(dim)
Definition: mitkConfig.h:35
mitk::ImageCaster
This class is just a proxy for global functions which are needed by the python wrapping process since...
Definition: mitkImageCaster.h:36
mitkImageCast.h
itk::SmartPointer
Definition: mitkIFileReader.h:30
mitk::Surface
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
mitk::RendererAccess::m_3DRenderer
static vtkRenderer * m_3DRenderer
Definition: mitkImageCaster.h:58
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkSurface.h
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
DeclareMitkImageCasterMethods
#define DeclareMitkImageCasterMethods(r, data, type)
Definition: mitkImageCaster.h:25
mitk::RendererAccess
Definition: mitkImageCaster.h:51
mitk::Caster
Definition: mitkImageCaster.h:45
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15