Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ImageVtkWriteAccessor Class Reference

Provides write access to image data in the form required by VTK methods. More...

#include <mitkImageVtkWriteAccessor.h>

Inheritance diagram for mitk::ImageVtkWriteAccessor:
Collaboration diagram for mitk::ImageVtkWriteAccessor:

Public Types

typedef itk::SmartPointer< Image > ImagePointer
 
- Public Types inherited from mitk::ImageAccessorBase
enum  Options { DefaultBehavior , ExceptionIfLocked , ForceCoherentMemory , IgnoreLock }
 Option flags that control ImageAccessor behavior. More...
 
typedef itk::SmartPointer< const mitk::Image > ImageConstPointer
 Const smart pointer type for the associated Image. More...
 

Public Member Functions

 ImageVtkWriteAccessor (ImagePointer iP, const ImageDataItem *iDI, vtkImageData *imageDataVtk)
 Creates an ImageVtkWriteAccessor for a whole Image. More...
 
 ~ImageVtkWriteAccessor () override
 Destructor unregisters this accessor from the image. More...
 
vtkImageData * GetVtkImageData () const
 Returns the VTK image data for write access. More...
 
- Public Member Functions inherited from mitk::ImageAccessorBase
virtual ~ImageAccessorBase ()
 Virtual destructor. Releases the wait lock if no other accessors are waiting. More...
 
const void * GetData () const
 Get const access to the raw image data. More...
 

Protected Member Functions

const Image * GetImage () const override
 Returns a const pointer to the associated Image. More...
 
- Protected Member Functions inherited from mitk::ImageAccessorBase
 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

- Protected Attributes inherited from mitk::ImageAccessorBase
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
 

Detailed Description

Provides write access to image data in the form required by VTK methods.

This class locks the image data for writing and provides access to the underlying vtkImageData representation.

Definition at line 33 of file mitkImageVtkWriteAccessor.h.

Member Typedef Documentation

◆ ImagePointer

Constructor & Destructor Documentation

◆ ImageVtkWriteAccessor()

mitk::ImageVtkWriteAccessor::ImageVtkWriteAccessor ( ImagePointer  iP,
const ImageDataItem *  iDI,
vtkImageData *  imageDataVtk 
)

Creates an ImageVtkWriteAccessor for a whole Image.

Parameters
iPThe associated Image (smart pointer).
iDIThe image data item describing the allocated image part.
imageDataVtkThe VTK image data representation to provide access to.

◆ ~ImageVtkWriteAccessor()

mitk::ImageVtkWriteAccessor::~ImageVtkWriteAccessor ( )
override

Destructor unregisters this accessor from the image.

Member Function Documentation

◆ GetImage()

const Image* mitk::ImageVtkWriteAccessor::GetImage ( ) const
overrideprotectedvirtual

Returns a const pointer to the associated Image.

Implements mitk::ImageAccessorBase.

◆ GetVtkImageData()

vtkImageData* mitk::ImageVtkWriteAccessor::GetVtkImageData ( ) const

Returns the VTK image data for write access.


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