Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitk::ImageAccessorBase Class Referenceabstract

#include <mitkImageAccessorBase.h>

Inheritance diagram for mitk::ImageAccessorBase:
Collaboration diagram for mitk::ImageAccessorBase:

Public Types

enum  Options { DefaultBehavior, ExceptionIfLocked, ForceCoherentMemory, IgnoreLock }
 defines different flags for the ImageAccessor constructors More...
 
typedef itk::SmartPointer< const mitk::ImageImageConstPointer
 

Public Member Functions

virtual ~ImageAccessorBase ()
 
const void * GetData () const
 Gives const access to the data. More...
 

Protected Member Functions

 ImageAccessorBase (ImageConstPointer iP, const ImageDataItem *iDI=nullptr, int OptionFlags=DefaultBehavior)
 Checks validity of given parameters from inheriting classes and stores those parameters in member variables. More...
 
void Increment ()
 Increments m_WaiterCount. A call of this method is prohibited unless the Mutex m_ReadWriteLock in the mitk::Image class is Locked. More...
 
bool Overlap (const ImageAccessorBase *iAB)
 Computes if there is an Overlap of the image part between this instantiation and another ImageAccessor object. More...
 
void WaitForReleaseOf (ImageAccessorWaitLock *wL)
 Uses the WaitLock to wait for another ImageAccessor. More...
 
void PreventRecursiveMutexLock (ImageAccessorBase *iAB)
 Prevents a recursive mutex lock by comparing thread ids of competing image accessors. More...
 
virtual const ImageGetImage () const =0
 

Protected Attributes

itk::ImageRegion< 4 > * m_SubRegion
 
void * m_AddressBegin
 
void * m_AddressEnd
 
int m_Options
 Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::Options can be unified by bitwise operations. More...
 
bool m_CoherentMemory
 
ImageAccessorWaitLockm_WaitLock
 Pointer to a WaitLock struct, that allows other ImageAccessors to wait for this ImageAccessor. More...
 
ThreadIDType m_Thread
 

Detailed Description

Definition at line 48 of file mitkImageAccessorBase.h.

Member Typedef Documentation

◆ ImageConstPointer

Member Enumeration Documentation

◆ Options

defines different flags for the ImageAccessor constructors

Enumerator
DefaultBehavior 

No specific Options ==> Default

ExceptionIfLocked 

Defines if the Constructor waits for locked memory until it is released or not. If not, an exception is thrown.

ForceCoherentMemory 

Defines if requested Memory has to be coherent. If the parameter is true, it is possible that new Memory has to be allocated to arrange this desired condition. Consequently, this parameter can heavily affect computation time.

IgnoreLock 

Ignores the lock mechanism for immediate access. Only possible with read accessors.

Definition at line 66 of file mitkImageAccessorBase.h.

Constructor & Destructor Documentation

◆ ~ImageAccessorBase()

virtual mitk::ImageAccessorBase::~ImageAccessorBase ( )
virtual

◆ ImageAccessorBase()

mitk::ImageAccessorBase::ImageAccessorBase ( ImageConstPointer  iP,
const ImageDataItem iDI = nullptr,
int  OptionFlags = DefaultBehavior 
)
protected

Checks validity of given parameters from inheriting classes and stores those parameters in member variables.

Member Function Documentation

◆ GetData()

const void* mitk::ImageAccessorBase::GetData ( ) const
inline

Gives const access to the data.

Definition at line 85 of file mitkImageAccessorBase.h.

◆ GetImage()

virtual const Image* mitk::ImageAccessorBase::GetImage ( ) const
protectedpure virtual

◆ Increment()

void mitk::ImageAccessorBase::Increment ( )
inlineprotected

Increments m_WaiterCount. A call of this method is prohibited unless the Mutex m_ReadWriteLock in the mitk::Image class is Locked.

Definition at line 129 of file mitkImageAccessorBase.h.

References mitk::ImageAccessorWaitLock::m_WaiterCount.

◆ Overlap()

bool mitk::ImageAccessorBase::Overlap ( const ImageAccessorBase iAB)
protected

Computes if there is an Overlap of the image part between this instantiation and another ImageAccessor object.

Exceptions
mitk::Exceptionif memory area is incoherent (not supported yet)

◆ PreventRecursiveMutexLock()

void mitk::ImageAccessorBase::PreventRecursiveMutexLock ( ImageAccessorBase iAB)
protected

Prevents a recursive mutex lock by comparing thread ids of competing image accessors.

◆ WaitForReleaseOf()

void mitk::ImageAccessorBase::WaitForReleaseOf ( ImageAccessorWaitLock wL)
protected

Uses the WaitLock to wait for another ImageAccessor.

Member Data Documentation

◆ m_AddressBegin

◆ m_AddressEnd

◆ m_CoherentMemory

bool mitk::ImageAccessorBase::m_CoherentMemory
protected

Defines if the accessed image part lies coherently in memory

Definition at line 122 of file mitkImageAccessorBase.h.

◆ m_Options

int mitk::ImageAccessorBase::m_Options
protected

Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::Options can be unified by bitwise operations.

Definition at line 119 of file mitkImageAccessorBase.h.

◆ m_SubRegion

itk::ImageRegion<4>* mitk::ImageAccessorBase::m_SubRegion
protected

ImageAccessor has access to the image it belongs to. Contains a SubRegion (always represented in maximal possible dimension)

Definition at line 108 of file mitkImageAccessorBase.h.

◆ m_Thread

ThreadIDType mitk::ImageAccessorBase::m_Thread
protected

Definition at line 139 of file mitkImageAccessorBase.h.

◆ m_WaitLock

ImageAccessorWaitLock* mitk::ImageAccessorBase::m_WaitLock
protected

Pointer to a WaitLock struct, that allows other ImageAccessors to wait for this ImageAccessor.

Definition at line 125 of file mitkImageAccessorBase.h.


The documentation for this class was generated from the following file: