Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkImageAccessorBase.h>
Public Types | |
enum | Options { DefaultBehavior, ExceptionIfLocked, ForceCoherentMemory, IgnoreLock } |
defines different flags for the ImageAccessor constructors More... | |
typedef itk::SmartPointer< const mitk::Image > | ImageConstPointer |
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 Image * | GetImage () 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 |
ImageAccessorWaitLock * | m_WaitLock |
Pointer to a WaitLock struct, that allows other ImageAccessors to wait for this ImageAccessor. More... | |
ThreadIDType | m_Thread |
Definition at line 52 of file mitkImageAccessorBase.h.
Definition at line 66 of file mitkImageAccessorBase.h.
defines different flags for the ImageAccessor constructors
Definition at line 70 of file mitkImageAccessorBase.h.
|
virtual |
Definition at line 41 of file mitkImageAccessorBase.cpp.
|
protected |
Checks validity of given parameters from inheriting classes and stores those parameters in member variables.
Definition at line 45 of file mitkImageAccessorBase.cpp.
References m_AddressBegin, m_AddressEnd, m_CoherentMemory, mitk::ImageDataItem::m_Data, mitk::ImageDataItem::m_Size, m_SubRegion, m_Thread, mitk::ImageAccessorWaitLock::m_WaiterCount, m_WaitLock, and mitkThrow.
|
inline |
Gives const access to the data.
Definition at line 89 of file mitkImageAccessorBase.h.
Referenced by mitk::MorphologicalOperations::Closing(), mitk::SimpleImageHistogram::ComputeFromBaseData(), mitk::PythonService::CopyToPythonAsCvImage(), mitk::PythonService::CopyToPythonAsSimpleItkImage(), mitk::MorphologicalOperations::Dilate(), mitk::MorphologicalOperations::Erode(), mitk::MorphologicalOperations::FillHoles(), mitk::ToFImageRecorderFilter::GenerateData(), mitk::ToFCompositeFilter::GenerateData(), mitk::ToFDistanceImageToSurfaceFilter::GenerateData(), mitk::ToFOpenCVImageGrabber::GetImage(), mitk::AutoCropImageFilter::ITKCrop3DImage(), mitk::ToFOpenCVImageGrabber::MapScalars(), mitkImageGeneratorTest(), mitkImageTest(), QmitkSlicesInterpolator::OnAccept3DInterpolationClicked(), mitk::MorphologicalOperations::Opening(), mitk::ToFCompositeFilter::ProcessSegmentation(), mitk::SegmentationInterpolationController::SetChangedSlice(), mitk::ToFCompositeFilter::SetInput(), mitk::OclImage::TransferDataToGPU(), mitk::ItkImageIO::Write(), mitk::LabelSetImageIO::Write(), and mitk::ImageWriter::WriteByITK().
|
protectedpure virtual |
Implemented in mitk::ImageReadAccessor, mitk::ImageWriteAccessor, mitk::ImageVtkReadAccessor, and mitk::ImageVtkWriteAccessor.
|
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 133 of file mitkImageAccessorBase.h.
References mitk::ImageAccessorWaitLock::m_WaiterCount.
|
protected |
Computes if there is an Overlap of the image part between this instantiation and another ImageAccessor object.
mitk::Exception | if memory area is incoherent (not supported yet) |
Definition at line 131 of file mitkImageAccessorBase.cpp.
References m_AddressBegin, m_AddressEnd, and mitkThrow.
|
protected |
Prevents a recursive mutex lock by comparing thread ids of competing image accessors.
Definition at line 176 of file mitkImageAccessorBase.cpp.
|
protected |
Uses the WaitLock to wait for another ImageAccessor.
Definition at line 156 of file mitkImageAccessorBase.cpp.
References mitk::ImageAccessorWaitLock::m_Mutex, and mitk::ImageAccessorWaitLock::m_WaiterCount.
|
protected |
Points to the beginning of the image part.
Definition at line 115 of file mitkImageAccessorBase.h.
Referenced by mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetConsecutivePixelsAsVector(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetData(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetData(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), ImageAccessorBase(), Overlap(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndex(), and mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndexSafe().
|
protected |
Contains the first address after the image part.
Definition at line 118 of file mitkImageAccessorBase.h.
Referenced by mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), ImageAccessorBase(), Overlap(), and mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndexSafe().
|
protected |
Defines if the accessed image part lies coherently in memory
Definition at line 126 of file mitkImageAccessorBase.h.
Referenced by ImageAccessorBase().
|
protected |
Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::Options can be unified by bitwise operations.
Definition at line 123 of file mitkImageAccessorBase.h.
|
protected |
ImageAccessor has access to the image it belongs to. Contains a SubRegion (always represented in maximal possible dimension)
Definition at line 112 of file mitkImageAccessorBase.h.
Referenced by ImageAccessorBase().
|
protected |
Definition at line 143 of file mitkImageAccessorBase.h.
Referenced by ImageAccessorBase(), and PreventRecursiveMutexLock().
|
protected |
Pointer to a WaitLock struct, that allows other ImageAccessors to wait for this ImageAccessor.
Definition at line 129 of file mitkImageAccessorBase.h.
Referenced by ImageAccessorBase(), and mitk::ImageReadAccessor::ImageReadAccessor().