Medical Imaging Interaction Toolkit  2021.02.99-4e0dbe47
Medical Imaging Interaction Toolkit
mitkImageWriteAccessor.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 MITKIMAGEWRITEACCESSOR_H
14 #define MITKIMAGEWRITEACCESSOR_H
15 
16 #include "mitkImage.h"
17 #include "mitkImageAccessorBase.h"
18 
19 namespace mitk
20 {
26  {
27  template <class TPixel, unsigned int VDimension>
28  friend class ImagePixelReadAccessor;
29 
30  public:
32 
42  ImageWriteAccessor(ImagePointer image,
43  const ImageDataItem *iDI = nullptr,
44  int OptionFlags = ImageAccessorBase::DefaultBehavior);
45 
47  inline void *GetData() { return m_AddressBegin; }
49  ~ImageWriteAccessor() override;
50 
51  protected:
52  const Image *GetImage() const override;
53 
54  private:
56  void OrganizeWriteAccess();
57 
58  ImageWriteAccessor &operator=(const ImageWriteAccessor &); // Not implemented on purpose.
60 
61  ImagePointer m_Image;
62  };
63 }
64 #endif // MITKIMAGEWRITEACCESSOR_H
Gives locked and index-based read access for a particular image part. The class provides several set-...
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
void * GetData()
Gives full data access.
Image class for storing images.
Definition: mitkImage.h:73
ImageWriteAccessor class to get locked write-access for a particular image part.
Internal class for managing references on sub-images.