Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkImageReadAccessor.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 MITKIMAGEREADACCESSOR_H
18 #define MITKIMAGEREADACCESSOR_H
19 
20 #include "mitkImageAccessorBase.h"
21 
22 namespace mitk
23 {
24  class Image;
25  class ImageDataItem;
26 
32  {
33  friend class Image;
34 
35  template <class TPixel, unsigned int VDimension>
36  friend class ImagePixelReadAccessor;
37 
38  public:
40 
51  const ImageDataItem *iDI = nullptr,
52  int OptionFlags = ImageAccessorBase::DefaultBehavior);
53 
54  ImageReadAccessor(ImagePointer image,
55  const ImageDataItem *iDI = nullptr,
56  int OptionFlags = ImageAccessorBase::DefaultBehavior);
57 
58  ImageReadAccessor(const Image *image, const ImageDataItem *iDI = nullptr);
59 
61  virtual ~ImageReadAccessor();
62 
63  protected:
64  virtual const Image *GetImage() const override;
65 
66  private:
68  void OrganizeReadAccess();
69 
70  ImageReadAccessor &operator=(const ImageReadAccessor &); // Not implemented on purpose.
72 
73  ImageConstPointer m_Image;
74  };
75 }
76 
77 #endif // MITKIMAGEACCESSOR_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.
class ITK_EXPORT Image
Image class for storing images.
Definition: mitkImage.h:76
itk::SmartPointer< Image > ImagePointer
Internal class for managing references on sub-images.
ImageReadAccessor class to get locked read access for a particular image part.