Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImageVtkReadAccessor.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 mitkImageVtkReadAccessor_h
14 #define mitkImageVtkReadAccessor_h
15 
16 #include <mitkImageAccessorBase.h>
17 
18 class vtkImageData;
19 
20 namespace mitk
21 {
22  class Image;
23  class ImageDataItem;
24 
34  {
35  public:
41  ImageVtkReadAccessor(ImageConstPointer iP, const ImageDataItem *iDI, const vtkImageData *imageDataVtk);
42 
45 
47  const vtkImageData *GetVtkImageData() const;
48 
49  protected:
51  const Image *GetImage() const override;
52 
53  private:
54  // due to smart pointer issues, the image is only kept as a weak pointer.
55  const Image *m_Image;
56  const vtkImageData *m_ImageDataVtk;
57  };
58 }
59 
60 #endif
#define MITKCORE_EXPORT
Internal container for image data used by mitk::Image.
Provides read access to image data in the form required by VTK methods.
const Image * GetImage() const override
Returns a const pointer to the associated Image.
~ImageVtkReadAccessor() override
Destructor unregisters this accessor from the image.
const vtkImageData * GetVtkImageData() const
Returns the VTK image data for read access.
ImageVtkReadAccessor(ImageConstPointer iP, const ImageDataItem *iDI, const vtkImageData *imageDataVtk)
Creates an ImageVtkReadAccessor for a whole Image.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
class ITK_EXPORT Image
Find image slices visible on a given plane.