Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Gives locked and index-based read access for a particular image part. The class provides several set- and get-methods, which allow an easy pixel access. It needs to know about pixel type and dimension of its image at compile time. More...
#include <mitkImagePixelReadAccessor.h>
Public Types | |
typedef ImagePixelAccessor< TPixel, VDimension > | ImagePixelAccessorType |
typedef itk::SmartPointer< mitk::Image > | ImagePointer |
typedef itk::SmartPointer< const mitk::Image > | ImageConstPointer |
Public Types inherited from mitk::ImagePixelAccessor< TPixel, VDimension > | |
typedef itk::Index< VDimension > | IndexType |
typedef ImagePixelAccessor< TPixel, VDimension > | ImagePixelAccessorType |
typedef Image::ConstPointer | ImageConstPointer |
Public Member Functions | |
ImagePixelReadAccessor (ImageConstPointer iP, const ImageDataItem *iDI=nullptr, int OptionFlags=ImageAccessorBase::DefaultBehavior) | |
Instantiates a mitk::ImageReadAccessor (see its doxygen page for more details) More... | |
ImagePixelReadAccessor (ImagePointer iP, const ImageDataItem *iDI=nullptr, int OptionFlags=ImageAccessorBase::DefaultBehavior) | |
ImagePixelReadAccessor (Image *iP, const ImageDataItem *iDI=nullptr, int OptionFlags=ImageAccessorBase::DefaultBehavior) | |
ImagePixelReadAccessor (const Image *iP, const ImageDataItem *iDI=nullptr, int OptionFlags=ImageAccessorBase::DefaultBehavior) | |
virtual | ~ImagePixelReadAccessor () |
const TPixel & | GetPixelByIndex (const itk::Index< VDimension > &idx) const |
itk::VariableLengthVector< TPixel > | GetConsecutivePixelsAsVector (const itk::Index< VDimension > &idx, int nrComponents) const |
const TPixel & | GetPixelByIndexSafe (const itk::Index< VDimension > &idx) const |
const TPixel & | GetPixelByWorldCoordinates (mitk::Point3D position) |
const TPixel & | GetPixelByWorldCoordinates (mitk::Point3D position, unsigned int timestep) |
const TPixel * | GetData () const |
Gives const access to the data. More... | |
Public Member Functions inherited from mitk::ImagePixelAccessor< TPixel, VDimension > | |
int | GetDimension (int i) const |
Additional Inherited Members | |
Protected Member Functions inherited from mitk::ImagePixelAccessor< TPixel, VDimension > | |
ImagePixelAccessor (ImageConstPointer iP, const mitk::ImageDataItem *iDI) | |
virtual | ~ImagePixelAccessor () |
void | CheckData (const Image *image) |
unsigned int | GetOffset (const IndexType &idx) const |
Protected Attributes inherited from mitk::ImagePixelAccessor< TPixel, VDimension > | |
const ImageDataItem * | m_ImageDataItem |
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... | |
Gives locked and index-based read access for a particular image part. The class provides several set- and get-methods, which allow an easy pixel access. It needs to know about pixel type and dimension of its image at compile time.
TPixel | defines the PixelType |
VDimension | defines the dimension for accessing data |
Definition at line 36 of file mitkImagePixelReadAccessor.h.
typedef itk::SmartPointer<const mitk::Image> mitk::ImagePixelReadAccessor< TPixel, VDimension >::ImageConstPointer |
Definition at line 43 of file mitkImagePixelReadAccessor.h.
typedef ImagePixelAccessor<TPixel, VDimension> mitk::ImagePixelReadAccessor< TPixel, VDimension >::ImagePixelAccessorType |
Definition at line 41 of file mitkImagePixelReadAccessor.h.
typedef itk::SmartPointer<mitk::Image> mitk::ImagePixelReadAccessor< TPixel, VDimension >::ImagePointer |
Definition at line 42 of file mitkImagePixelReadAccessor.h.
|
inline |
Instantiates a mitk::ImageReadAccessor (see its doxygen page for more details)
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 |
Includes a check if typeid of PixelType coincides with templated TPixel and a check if VDimension equals to the Dimension of the Image.
Definition at line 57 of file mitkImagePixelReadAccessor.h.
|
inline |
Definition at line 64 of file mitkImagePixelReadAccessor.h.
|
inline |
Definition at line 71 of file mitkImagePixelReadAccessor.h.
|
inline |
Definition at line 78 of file mitkImagePixelReadAccessor.h.
|
inlinevirtual |
Destructor informs Image to unlock memory.
Definition at line 86 of file mitkImagePixelReadAccessor.h.
|
inline |
Definition at line 95 of file mitkImagePixelReadAccessor.h.
References mitk::ImageReadAccessor::GetImage(), mitk::PixelType::GetNumberOfComponents(), mitk::ImagePixelAccessor< TPixel, VDimension >::GetOffset(), mitk::Image::GetPixelType(), and mitk::ImageAccessorBase::m_AddressBegin.
Referenced by mitk::FastSinglePixelAccess().
|
inline |
Gives const access to the data.
Definition at line 152 of file mitkImagePixelReadAccessor.h.
References mitk::ImageAccessorBase::m_AddressBegin.
Referenced by Assert_ItkImportWithinAccessByItkSucceded_ReturnsTrue(), and main().
|
inline |
Returns a const reference to the pixel at given index.
Definition at line 88 of file mitkImagePixelReadAccessor.h.
References mitk::ImagePixelAccessor< TPixel, VDimension >::GetOffset(), mitk::ImageAccessorBase::m_AddressBegin, and offset.
Referenced by Assert_ItkImageImportRandomValuesSucceded_ReturnsTrue(), Assert_ItkImageImportSucceded_ReturnsTrue(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates(), mitk::TbssImporter::Import(), and ReadPixel().
|
inline |
Extends GetPixel by integrating index validation to prevent overflow.
mitk::Exception | in case of overflow |
Definition at line 107 of file mitkImagePixelReadAccessor.h.
References mitk::ImagePixelAccessor< TPixel, VDimension >::GetOffset(), mitk::ImageAccessorBase::m_AddressBegin, mitk::ImageAccessorBase::m_AddressEnd, mitkThrow, and offset.
Referenced by mitk::ComputeContourSetNormalsFilter::GenerateData(), and ThreadMethod().
|
inline |
Returns a const reference to the pixel at given world coordinate - works only with three-dimensional ImageAccessor
Definition at line 124 of file mitkImagePixelReadAccessor.h.
References mitk::BaseData::GetGeometry(), mitk::ImageReadAccessor::GetImage(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), and mitk::BaseGeometry::WorldToIndex().
Referenced by AccessPixel(), and QmitkFreeSurferParcellationHandler::Notify().
|
inline |
Returns a const reference to the pixel at given world coordinate - works only with four-dimensional ImageAccessor
Definition at line 135 of file mitkImagePixelReadAccessor.h.
References mitk::BaseData::GetGeometry(), mitk::ImageReadAccessor::GetImage(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::BaseData::GetTimeSteps(), and mitk::BaseGeometry::WorldToIndex().