Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
ImageWriteAccessor class to get locked write-access for a particular image part. More...
#include <mitkImageWriteAccessor.h>
Public Types | |
typedef Image::Pointer | ImagePointer |
![]() | |
enum | Options { DefaultBehavior, ExceptionIfLocked, ForceCoherentMemory, IgnoreLock } |
defines different flags for the ImageAccessor constructors More... | |
typedef itk::SmartPointer< const mitk::Image > | ImageConstPointer |
Public Member Functions | |
ImageWriteAccessor (ImagePointer image, const ImageDataItem *iDI=nullptr, int OptionFlags=ImageAccessorBase::DefaultBehavior) | |
Orders write access for a slice, volume or 4D-Image. More... | |
void * | GetData () |
Gives full data access. More... | |
~ImageWriteAccessor () override | |
informs Image to unlock the represented image part More... | |
![]() | |
virtual | ~ImageAccessorBase () |
const void * | GetData () const |
Gives const access to the data. More... | |
Protected Member Functions | |
const Image * | GetImage () const override |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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 |
ImageWriteAccessor class to get locked write-access for a particular image part.
Definition at line 25 of file mitkImageWriteAccessor.h.
Definition at line 31 of file mitkImageWriteAccessor.h.
mitk::ImageWriteAccessor::ImageWriteAccessor | ( | ImagePointer | image, |
const ImageDataItem * | iDI = nullptr , |
||
int | OptionFlags = ImageAccessorBase::DefaultBehavior |
||
) |
Orders write access for a slice, volume or 4D-Image.
Image::Pointer | specifies the associated Image |
ImageDataItem* | specifies the allocated image part |
OptionFlags | properties from mitk::ImageAccessorBase::Options can be chosen and assembled with bitwise unification. |
mitk::Exception | if the Constructor was created inappropriately |
mitk::MemoryIsLockedException | if requested image area is exclusively locked and mitk::ImageAccessorBase::ExceptionIfLocked is set in OptionFlags |
Definition at line 15 of file mitkImageWriteAccessor.cpp.
|
override |
informs Image to unlock the represented image part
Definition at line 22 of file mitkImageWriteAccessor.cpp.
References mitk::ImageAccessorWaitLock::m_Mutex, mitk::ImageAccessorWaitLock::m_WaiterCount, and mitk::ImageAccessorBase::m_WaitLock.
|
inline |
Gives full data access.
Definition at line 47 of file mitkImageWriteAccessor.h.
Referenced by QmitkSlicesInterpolator::AcceptAllInterpolations(), mitk::pa::SpectralUnmixingFilterBase::AddRelativeErrorSettings(), mitk::PythonService::CopyCvImageFromPython(), mitk::LabelSetImage::CreateLabelMask(), mitk::CropImageFilter::GenerateData(), mitk::ImageGenerator::GenerateImageFromReference(), mitk::ImageGenerator::GenerateRandomImage(), mitk::pa::Volume::GetData(), mitk::LabelSetImage::InitializeByLabeledImage(), mitkLevelWindowTest(), mitk::SurfaceToImageFilter::Stencil3DImage(), ThreadMethod(), and mitk::pa::SpectralUnmixingSO2::Verbose().
|
overrideprotectedvirtual |
Implements mitk::ImageAccessorBase.
Definition at line 47 of file mitkImageWriteAccessor.cpp.
References mitk::ImageAccessorBase::ExceptionIfLocked, mitk::ImageAccessorBase::IgnoreLock, mitk::ImageAccessorWaitLock::m_Mutex, mitk::ImageAccessorBase::m_Options, mitk::ImageAccessorWaitLock::m_WaiterCount, mitk::ImageAccessorBase::m_WaitLock, mitkThrowException, mitk::ImageAccessorBase::Overlap(), mitk::ImageAccessorBase::PreventRecursiveMutexLock(), and mitk::ImageAccessorBase::WaitForReleaseOf().
Referenced by mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates().