Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKIMAGEWRITEACCESSOR_H
18 #define MITKIMAGEWRITEACCESSOR_H
19 
20 #include "mitkImage.h"
21 #include "mitkImageAccessorBase.h"
22 
23 namespace mitk
24 {
30  {
31  template <class TPixel, unsigned int VDimension>
32  friend class ImagePixelReadAccessor;
33 
34  public:
36 
46  ImageWriteAccessor(ImagePointer image,
47  const ImageDataItem *iDI = nullptr,
48  int OptionFlags = ImageAccessorBase::DefaultBehavior);
49 
51  inline void *GetData() { return m_AddressBegin; }
53  virtual ~ImageWriteAccessor();
54 
55  protected:
56  virtual const Image *GetImage() const override;
57 
58  private:
60  void OrganizeWriteAccess();
61 
62  ImageWriteAccessor &operator=(const ImageWriteAccessor &); // Not implemented on purpose.
64 
65  ImagePointer m_Image;
66  };
67 }
68 #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:76
ImageWriteAccessor class to get locked write-access for a particular image part.
Internal class for managing references on sub-images.