Medical Imaging Interaction Toolkit  2018.4.99-ae21cdc4
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 (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 MITKIMAGEREADACCESSOR_H
14 #define MITKIMAGEREADACCESSOR_H
15 
16 #include "mitkImageAccessorBase.h"
17 
18 namespace mitk
19 {
20  class Image;
21  class ImageDataItem;
22 
28  {
29  friend class Image;
30 
31  template <class TPixel, unsigned int VDimension>
32  friend class ImagePixelReadAccessor;
33 
34  public:
36 
47  const ImageDataItem *iDI = nullptr,
48  int OptionFlags = ImageAccessorBase::DefaultBehavior);
49 
50  ImageReadAccessor(ImagePointer image,
51  const ImageDataItem *iDI = nullptr,
52  int OptionFlags = ImageAccessorBase::DefaultBehavior);
53 
54  ImageReadAccessor(const Image *image, const ImageDataItem *iDI = nullptr);
55 
57  ~ImageReadAccessor() override;
58 
59  protected:
60  const Image *GetImage() const override;
61 
62  private:
64  void OrganizeReadAccess();
65 
66  ImageReadAccessor &operator=(const ImageReadAccessor &); // Not implemented on purpose.
68 
69  ImageConstPointer m_Image;
70  };
71 }
72 
73 #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:72
itk::SmartPointer< Image > ImagePointer
Internal class for managing references on sub-images.
ImageReadAccessor class to get locked read access for a particular image part.