Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImageVtkWriteAccessor.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 mitkImageVtkWriteAccessor_h
14 #define mitkImageVtkWriteAccessor_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:
37 
43  ImageVtkWriteAccessor(ImagePointer iP, const ImageDataItem *iDI, vtkImageData *imageDataVtk);
44 
47 
49  vtkImageData *GetVtkImageData() const;
50 
51  protected:
53  const Image *GetImage() const override;
54 
55  private:
56  // due to smart pointer issues, the image is only kept as a weak pointer.
57  Image *m_Image;
58  vtkImageData *m_ImageDataVtk;
59  };
60 }
61 
62 #endif
#define MITKCORE_EXPORT
Internal container for image data used by mitk::Image.
Provides write access to image data in the form required by VTK methods.
vtkImageData * GetVtkImageData() const
Returns the VTK image data for write access.
~ImageVtkWriteAccessor() override
Destructor unregisters this accessor from the image.
const Image * GetImage() const override
Returns a const pointer to the associated Image.
ImageVtkWriteAccessor(ImagePointer iP, const ImageDataItem *iDI, vtkImageData *imageDataVtk)
Creates an ImageVtkWriteAccessor for a whole Image.
itk::SmartPointer< Image > ImagePointer
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.