DGtal 1.3.0
|
Aim: implements association bewteen points lying in a digital domain and values. More...
#include <DGtal/images/Image.h>
Public Types | |
typedef TImageContainer | ImageContainer |
Types copied from the container. More... | |
typedef TImageContainer::Domain | Domain |
typedef TImageContainer::Point | Point |
typedef TImageContainer::Value | Value |
typedef TImageContainer::ConstRange | ConstRange |
typedef TImageContainer::Range | Range |
typedef TImageContainer::OutputIterator | OutputIterator |
typedef CowPtr< TImageContainer > | ImagePointer |
Pointer to the image container data. More... | |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CImage< TImageContainer >)) | |
Checking concepts. More... | |
BOOST_CONCEPT_ASSERT ((concepts::CVertexMap< TImageContainer >)) | |
Image () | |
Image (ImageContainer *anImageContainer) | |
Image (const CowPtr< ImageContainer > &anImageContainerCowPointer) | |
Image (const ImageContainer &other) | |
Image (const Image &other) | |
Image & | operator= (const Image &other) |
~Image () | |
const Domain & | domain () const |
ConstRange | constRange () const |
Range | range () |
Value | operator() (const Point &aPoint) const |
void | setValue (const Point &aPoint, const Value &aValue) |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
const ImagePointer | getPointer () const |
Protected Attributes | |
ImagePointer | myImagePointer |
Owning smart pointer on the image container. More... | |
Aim: implements association bewteen points lying in a digital domain and values.
Description of template class 'Image'
This class is a lightweight proxy on ImageContainers (models of CImage). Image class is also a model of CImage.
TImageContainer | an image container type (model of CImage). |
typedef TImageContainer::ConstRange DGtal::Image< TImageContainer >::ConstRange |
typedef TImageContainer::Domain DGtal::Image< TImageContainer >::Domain |
typedef TImageContainer DGtal::Image< TImageContainer >::ImageContainer |
typedef CowPtr<TImageContainer> DGtal::Image< TImageContainer >::ImagePointer |
typedef TImageContainer::OutputIterator DGtal::Image< TImageContainer >::OutputIterator |
typedef TImageContainer::Point DGtal::Image< TImageContainer >::Point |
typedef TImageContainer::Range DGtal::Image< TImageContainer >::Range |
typedef TImageContainer::Value DGtal::Image< TImageContainer >::Value |
|
inline |
Default constructor.
Definition at line 99 of file Image.h.
References DGtal::trace, and DGtal::Trace::warning().
|
inline |
Constructor from a pointer on the underlying image container. (data pointer is acquired, ownership transfer)
Definition at line 110 of file Image.h.
References DGtal::trace, and DGtal::Trace::warning().
|
inline |
Constructor from Copy on write pointer. (data is not copied if read-only)
anImageContainerCowPointer | a COW-pointer on the underlying container. |
Definition at line 123 of file Image.h.
References DGtal::trace, and DGtal::Trace::warning().
|
inline |
Constructor from ImageContainer const reference (data is duplicated).
other | an object of same type to copy. |
Definition at line 136 of file Image.h.
References DGtal::trace, and DGtal::Trace::warning().
|
inline |
Copy Constructor (data is not copied here).
other | an object of same type to copy. |
Definition at line 150 of file Image.h.
References DGtal::trace, and DGtal::Trace::warning().
|
inline |
DGtal::Image< TImageContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CImage< TImageContainer >) | ) |
Checking concepts.
DGtal::Image< TImageContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CVertexMap< TImageContainer >) | ) |
|
inline |
Returns the range of the underlying image to iterate over its values
Definition at line 203 of file Image.h.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::constRange(), and DGtal::Image< TImageContainer >::myImagePointer.
Referenced by test_image(), testImage(), and testImageFromSet().
|
inline |
Returns a reference to the underlying image domain.
Definition at line 192 of file Image.h.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain(), and DGtal::Image< TImageContainer >::myImagePointer.
Referenced by DGtal::SetFromImage< TSet >::append(), generateRefImage(), DGtal::ImageToConstantFunctor< Image, PointPredicate, TValue >::operator()(), test_image(), testConsistence(), testImage(), testImageOnRef(), testITKImageWithShiftDomain(), and testPNMReader().
|
inline |
Returns the smart pointer on the Image container data.
Definition at line 276 of file Image.h.
References DGtal::Image< TImageContainer >::myImagePointer.
|
inline |
Checks the validity/consistency of the object.
Definition at line 266 of file Image.h.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::isValid(), and DGtal::Image< TImageContainer >::myImagePointer.
Referenced by TEST_CASE(), and testImage().
|
inline |
Get the value of an image at a given position given by a Point.
aPoint | the point. |
Definition at line 231 of file Image.h.
References aPoint(), and DGtal::Image< TImageContainer >::myImagePointer.
|
inline |
Assignment.
other | the object to copy. |
Definition at line 163 of file Image.h.
References DGtal::Image< TImageContainer >::myImagePointer, DGtal::trace, and DGtal::Trace::warning().
|
inline |
Returns the range of the underlying image to iterate over its values
Definition at line 214 of file Image.h.
References DGtal::Image< TImageContainer >::myImagePointer, and DGtal::ImageContainerBySTLVector< TDomain, TValue >::range().
Referenced by testImage().
void DGtal::Image< TImageContainer >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
inline |
Set a value on an Image at a position specified by a Point.
it
must be a point in the image domain.aPoint | the point. |
aValue | the value. |
Definition at line 247 of file Image.h.
References aPoint(), DGtal::Image< TImageContainer >::myImagePointer, and DGtal::ImageContainerBySTLVector< TDomain, TValue >::setValue().
Referenced by generateRefImage(), main(), testComparison(), testDisplayDT2d(), testDisplayDT3d(), testGetSetVal(), testITKImage(), testITKImageWithMetadata(), testITKImageWithShiftDomain(), and testITKMethod().
|
protected |
Owning smart pointer on the image container.
Definition at line 287 of file Image.h.
Referenced by DGtal::Image< TImageContainer >::constRange(), DGtal::Image< TImageContainer >::domain(), DGtal::Image< TImageContainer >::getPointer(), DGtal::Image< TImageContainer >::isValid(), DGtal::Image< TImageContainer >::operator()(), DGtal::Image< TImageContainer >::operator=(), DGtal::Image< TImageContainer >::range(), and DGtal::Image< TImageContainer >::setValue().