17 #ifndef MITKIMAGEPIXELWRITEACCESSOR_H
18 #define MITKIMAGEPIXELWRITEACCESSOR_H
33 template <
class TPixel,
unsigned int VDimension = 3>
61 :
ImagePixelAccessor<TPixel, VDimension>(iP.GetPointer(), iDI), m_WriteAccessor(iP, iDI, OptionFlags)
84 *targetAddress = value;
91 mitkThrow() <<
"ImageAccessor Overflow: image access exceeds the requested image area at " << idx <<
".";
114 mitkThrow() <<
"ImageAccessor Overflow: image access exceeds the requested image area at " << idx <<
".";
117 return *targetAddress;
142 #endif // MITKIMAGEWRITEACCESSOR_H
Gives locked and index-based write access for a particular image part. The class provides several set...
const TPixel & GetPixelByWorldCoordinates(mitk::Point3D position)
const TPixel & GetPixelByIndexSafe(const itk::Index< VDimension > &idx) const
void SetPixelByIndexSafe(const itk::Index< VDimension > &idx, const TPixel &value)
Provides templated image access for all inheriting classes.
DataCollection - Class to facilitate loading/accessing structured data.
ImagePixelWriteAccessor(ImagePointer iP, const ImageDataItem *iDI=nullptr, int OptionFlags=ImageAccessorBase::DefaultBehavior)
Instantiates a mitk::ImageWriteAccessor (see its doxygen page for more details)
itk::SmartPointer< mitk::Image > ImagePointer
ImagePixelAccessor< TPixel, VDimension > ImagePixelAccessorType
virtual TPixel * GetData() const
Gives full data access.
virtual ~ImagePixelWriteAccessor()
Image class for storing images.
void SetPixelByIndex(const itk::Index< VDimension > &idx, const TPixel &value)
Sets a pixel value at given index.
void SetPixelByWorldCoordinates(const mitk::Point3D &, const TPixel &value, unsigned int timestep=0)
unsigned int GetOffset(const IndexType &idx) const
const TPixel & GetPixelByIndex(const itk::Index< VDimension > &idx) const
ImageWriteAccessor class to get locked write-access for a particular image part.
Internal class for managing references on sub-images.
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
virtual const Image * GetImage() const override
void WorldToIndex(const mitk::Point3D &pt_mm, mitk::Point3D &pt_units) const
Convert world coordinates (in mm) of a point to (continuous!) index coordinates.