|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Provides templated image access for all inheriting classes. More...
#include <mitkImagePixelAccessor.h>
Public Types | |
| typedef itk::Index< VDimension > | IndexType |
| typedef ImagePixelAccessor< TPixel, VDimension > | ImagePixelAccessorType |
| typedef Image::ConstPointer | ImageConstPointer |
Public Member Functions | |
| int | GetDimension (int i) const |
| Get the size of the specified dimension from the underlying ImageDataItem. More... | |
Protected Member Functions | |
| ImagePixelAccessor (ImageConstPointer iP, const mitk::ImageDataItem *iDI) | |
| Construct the accessor from an image and an optional ImageDataItem. More... | |
| virtual | ~ImagePixelAccessor () |
| Destructor. More... | |
| void | CheckData (const Image *image) |
| Validate that the accessor dimensions and pixel type match the image. More... | |
| unsigned int | GetOffset (const IndexType &idx) const |
| Compute the linear memory offset for a given multi-dimensional image index. More... | |
Protected Attributes | |
| const ImageDataItem * | m_ImageDataItem |
| Holds the specified ImageDataItem for pixel data access. More... | |
| BaseGeometry::Pointer | m_Geometry |
| Pointer to the used Geometry. Since Geometry can be different to the Image (if memory was forced to be coherent) it is necessary to store Geometry separately. More... | |
| itk::ImageRegion< VDimension > * | m_SubRegion |
| A Subregion defines an arbitrary area within the image. If no SubRegion is defined, the whole ImageDataItem or Image is regarded. A subregion (e.g. subvolume) can lead to non-coherent memory access where every dimension has a start- and end-offset. More... | |
| int | m_Options |
| Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::Options can be unified by bitwise operations. More... | |
Provides templated image access for all inheriting classes.
| TPixel | Defines the pixel type used for accessing image data. |
| VDimension | Defines the dimension for accessing data. Defaults to 3. |
Definition at line 34 of file mitkImagePixelAccessor.h.
| typedef Image::ConstPointer mitk::ImagePixelAccessor< TPixel, VDimension >::ImageConstPointer |
Definition at line 39 of file mitkImagePixelAccessor.h.
| typedef ImagePixelAccessor<TPixel, VDimension> mitk::ImagePixelAccessor< TPixel, VDimension >::ImagePixelAccessorType |
Definition at line 38 of file mitkImagePixelAccessor.h.
| typedef itk::Index<VDimension> mitk::ImagePixelAccessor< TPixel, VDimension >::IndexType |
Definition at line 37 of file mitkImagePixelAccessor.h.
|
inlineprotected |
Construct the accessor from an image and an optional ImageDataItem.
If iDI is nullptr, the full channel data of the image is used instead.
| iP | Pointer to the image to access. |
| iDI | The allocated image data item (e.g. a slice, volume, or channel). If nullptr, the full channel data is retrieved from the image. |
Definition at line 62 of file mitkImagePixelAccessor.h.
References mitk::ImagePixelAccessor< TPixel, VDimension >::CheckData(), and mitk::ImagePixelAccessor< TPixel, VDimension >::m_ImageDataItem.
|
inlineprotectedvirtual |
Destructor.
Definition at line 72 of file mitkImagePixelAccessor.h.
|
inlineprotected |
Validate that the accessor dimensions and pixel type match the image.
| image | The image to validate against. |
| mitk::Exception | if dimensions or pixel types do not match. |
Definition at line 80 of file mitkImagePixelAccessor.h.
References mitk::Image::GetDimension(), mitk::ImageDataItem::GetDimension(), mitk::PixelType::GetNumberOfComponents(), mitk::Image::GetPixelType(), mitk::ImagePixelAccessor< TPixel, VDimension >::m_ImageDataItem, mitk::MakePixelType(), and mitkThrow.
Referenced by mitk::ImagePixelAccessor< TPixel, VDimension >::ImagePixelAccessor().
|
inline |
Get the size of the specified dimension from the underlying ImageDataItem.
| i | The dimension index to query. |
Definition at line 47 of file mitkImagePixelAccessor.h.
References mitk::ImageDataItem::GetDimension(), and mitk::ImagePixelAccessor< TPixel, VDimension >::m_ImageDataItem.
|
inlineprotected |
Compute the linear memory offset for a given multi-dimensional image index.
| idx | The multi-dimensional index into the image. |
Definition at line 142 of file mitkImagePixelAccessor.h.
References mitk::ImagePixelAccessor< TPixel, VDimension >::m_ImageDataItem.
Referenced by mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetConsecutivePixelsAsVector(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndex(), and mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndexSafe().
|
protected |
Pointer to the used Geometry. Since Geometry can be different to the Image (if memory was forced to be coherent) it is necessary to store Geometry separately.
Definition at line 122 of file mitkImagePixelAccessor.h.
|
protected |
Holds the specified ImageDataItem for pixel data access.
Definition at line 116 of file mitkImagePixelAccessor.h.
Referenced by mitk::ImagePixelAccessor< TPixel, VDimension >::CheckData(), mitk::ImagePixelAccessor< TPixel, VDimension >::GetDimension(), mitk::ImagePixelAccessor< TPixel, VDimension >::GetOffset(), and mitk::ImagePixelAccessor< TPixel, VDimension >::ImagePixelAccessor().
|
protected |
Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::Options can be unified by bitwise operations.
Definition at line 134 of file mitkImagePixelAccessor.h.
|
protected |
A Subregion defines an arbitrary area within the image. If no SubRegion is defined, the whole ImageDataItem or Image is regarded. A subregion (e.g. subvolume) can lead to non-coherent memory access where every dimension has a start- and end-offset.
Definition at line 129 of file mitkImagePixelAccessor.h.