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];
Internal class for managing references on sub-images.
Provides templated image access for all inheriting classes.
ImagePixelAccessor(ImageConstPointer iP, const mitk::ImageDataItem *iDI)
int GetDimension(int i) const
virtual ~ImagePixelAccessor()
unsigned int GetOffset(const IndexType &idx) const
int m_Options
Stores all extended properties of an ImageAccessor. The different flags in mitk::ImageAccessorBase::O...
itk::Index< VDimension > IndexType
void CheckData(const Image *image)
itk::ImageRegion< VDimension > * m_SubRegion
A Subregion defines an arbitrary area within the image. If no SubRegion is defined,...
BaseGeometry::Pointer m_Geometry
Pointer to the used Geometry. Since Geometry can be different to the Image (if memory was forced to b...
const ImageDataItem * m_ImageDataItem
Image::ConstPointer ImageConstPointer
ImagePixelAccessor< TPixel, VDimension > ImagePixelAccessorType
Image class for storing images.
unsigned int GetDimension() const
Get dimension of the image.
const mitk::PixelType GetPixelType(int n=0) const
Returns the PixelType of channel n.
size_t GetNumberOfComponents() const
Get the number of components of which each element consists.
Find image slices visible on a given plane.
MITKCORE_EXPORT mitk::PixelType MakePixelType(vtkImageData *vtkimagedata)
deduct the PixelType for a given vtk image