Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
itkImportMitkImageContainer.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 itkImportMitkImageContainer_h
14 #define itkImportMitkImageContainer_h
15 
16 #include <itkImportImageContainer.h>
17 #include <mitkImageAccessorBase.h>
18 #include <mitkImageDataItem.h>
19 
20 namespace itk
21 {
37  template <typename TElementIdentifier, typename TElement>
38  class ImportMitkImageContainer : public ImportImageContainer<TElementIdentifier, TElement>
39  {
40  public:
43  typedef Object Superclass;
46 
48  typedef TElementIdentifier ElementIdentifier;
49  typedef TElement Element;
50 
52  itkFactorylessNewMacro(Self);
53  itkCloneMacro(Self);
54 
56  itkTypeMacro(ImportMitkImageContainer, ImportImageContainer);
57 
59  // TElement *GetImportPointer() {return m_ImportPointer;};
60 
61  // void SetImageDataItem(mitk::ImageDataItem* imageDataItem);
62 
71  void SetImageAccessor(mitk::ImageAccessorBase *imageAccess, size_t noBytes);
72 
73  protected:
76 
79 
83  void PrintSelf(std::ostream &os, Indent indent) const override;
84 
85  private:
86  ImportMitkImageContainer(const Self &); // purposely not implemented
87  void operator=(const Self &); // purposely not implemented
88 
89  // mitk::ImageDataItem::Pointer m_ImageDataItem;
90  mitk::ImageAccessorBase *m_imageAccess;
91  };
92 
93 } // end namespace itk
94 
95 // Define instantiation macro for this template.
96 #define ITK_TEMPLATE_ImportMitkImageContainer(_, EXPORT, x, y) \
97  namespace itk \
98  { \
99  _(2(class EXPORT ImportMitkImageContainer<ITK_TEMPLATE_2 x>)) \
100  namespace Templates \
101  { \
102  typedef ImportMitkImageContainer<ITK_TEMPLATE_2 x> ImportMitkImageContainer##y; \
103  } \
104  }
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include <itkImportMitkImageContainer.tpp>
108 #endif
109 
110 #endif
Defines an itk::Image front-end to an mitk::Image.
ImportMitkImageContainer()
Default constructor. Initializes the image accessor to nullptr.
SmartPointer< const Self > ConstPointer
~ImportMitkImageContainer() override
Destructor. Deletes the owned image accessor.
void SetImageAccessor(mitk::ImageAccessorBase *imageAccess, size_t noBytes)
‍** Get the pointer from which the image data is imported. *‍/
void PrintSelf(std::ostream &os, Indent indent) const override