Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Go to the documentation of this file.
13 #ifndef mitkImagePixelAccessor_h
14 #define mitkImagePixelAccessor_h
29 template <
class TPixel,
unsigned int VDimension = 3>
67 mitkThrow() <<
"Invalid ImageAccessor: The Dimensions of ImageAccessor and Image are not equal."
68 <<
" They have to be equal if an entire image is requested."
69 <<
" image->GetDimension(): " << image->
GetDimension() <<
" , VDimension: " << VDimension;
76 mitkThrow() <<
"Invalid ImageAccessor: The Dimensions of ImageAccessor and ImageDataItem are not equal."
86 mitkThrow() <<
"Invalid ImageAccessor: PixelTypes of Image and ImageAccessor are not equal."
87 <<
" image->GetPixelType(): " <<
typeid(image->
GetPixelType()).name()
89 <<
" , VDimension: " << VDimension
90 <<
" , TPixel: " <<
typeid(TPixel).name()
121 unsigned int offset = 0;
125 offset += idx[3] * imageDims[0] * imageDims[1] * imageDims[2];
128 offset += idx[2] * imageDims[0] * imageDims[1];
131 offset += idx[0] + idx[1] * imageDims[0];
itk::ImageRegion< VDimension > * m_SubRegion
A Subregion defines an arbitrary area within the image. If no SubRegion is defined,...
MITKCORE_EXPORT mitk::PixelType MakePixelType(vtkImageData *vtkimagedata)
deduct the PixelType for a given vtk image
unsigned int GetOffset(const IndexType &idx) const
itk::Index< VDimension > IndexType
Internal class for managing references on sub-images.
void CheckData(const Image *image)
Image class for storing images.
virtual ~ImagePixelAccessor()
size_t GetNumberOfComponents() const
Get the number of components of which each element consists.
ImagePixelAccessor(ImageConstPointer iP, const mitk::ImageDataItem *iDI)
Image::ConstPointer ImageConstPointer
const ImageDataItem * m_ImageDataItem
Find image slices visible on a given plane.
const mitk::PixelType GetPixelType(int n=0) const
Returns the PixelType of channel n.
int GetDimension(int i) const
unsigned int GetDimension() const
Get dimension of the image.
ImagePixelAccessor< TPixel, VDimension > ImagePixelAccessorType
Provides templated image access for all inheriting classes.
int m_Options
Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::O...
BaseGeometry::Pointer m_Geometry
Pointer to the used Geometry. Since Geometry can be different to the Image (if memory was forced to b...