17 #ifndef MITKIMAGEACCESSORBASE_H
18 #define MITKIMAGEACCESSORBASE_H
20 #include <itkImageRegion.h>
22 #include <itkMultiThreader.h>
23 #include <itkSimpleFastMutexLock.h>
24 #include <itkSmartPointer.h>
48 #if defined(ITK_USE_SPROC) || defined(ITK_USE_PTHREADS) || defined(ITK_USE_WIN32_THREADS)
49 #define MITK_USE_RECURSIVE_MUTEX_PREVENTION
59 template <
class TPixel,
unsigned int VDimension>
62 template <
class TPixel,
unsigned int VDimension>
76 ExceptionIfLocked = 1,
81 ForceCoherentMemory = 2,
89 inline const void *
GetData()
const {
return m_AddressBegin; }
93 typedef int ThreadIDType;
96 #ifdef ITK_USE_WIN32_THREADS
97 typedef DWORD ThreadIDType;
100 #ifdef ITK_USE_PTHREADS
101 typedef pthread_t ThreadIDType;
148 virtual const Image *GetImage()
const = 0;
152 ThreadIDType CurrentThreadHandle();
154 inline bool CompareThreadHandles(ThreadIDType, ThreadIDType);
Gives locked and index-based write access for a particular image part. The class provides several set...
Gives locked and index-based read access for a particular image part. The class provides several set-...
Options
defines different flags for the ImageAccessor constructors
itk::ImageRegion< 4 > * m_SubRegion
unsigned int m_WaiterCount
Holds the number of ImageAccessors, which are waiting until the represented ImageAccessor is released...
const void * GetData() const
Gives const access to the data.
DataCollection - Class to facilitate loading/accessing structured data.
ImageAccessorWaitLock * m_WaitLock
Pointer to a WaitLock struct, that allows other ImageAccessors to wait for this ImageAccessor.
itk::SmartPointer< const mitk::Image > ImageConstPointer
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
Image class for storing images.
#define mitkExceptionClassMacro(ClassName, SuperClassName)
void Increment()
Increments m_WaiterCount. A call of this method is prohibited unless the Mutex m_ReadWriteLock in the...
int m_Options
Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::O...
itk::SimpleFastMutexLock m_Mutex
A mutex that allows other ImageAccessors to wait for the represented ImageAccessor.
This struct allows to make ImageAccessors wait for this particular ImageAccessor object.
ImageWriteAccessor class to get locked write-access for a particular image part.
Internal class for managing references on sub-images.
ImageReadAccessor class to get locked read access for a particular image part.