DGtal 1.4.0
|
#include <DGtal/images/ImageContainerBySTLVector.h>
Data Structures | |
class | SpanIterator |
Public Types | |
typedef ImageContainerBySTLVector< TDomain, TValue > | Self |
typedef std::vector< TValue > | Parent |
typedef Parent | Container |
typedef TDomain | Domain |
typedef Domain::Point | Point |
typedef Domain::Vector | Vector |
typedef Domain::Integer | Integer |
typedef Domain::Size | Size |
typedef Domain::Dimension | Dimension |
typedef Point | Vertex |
typedef TValue | Value |
typedef std::vector< Value >::iterator | Iterator |
typedef std::vector< Value >::const_iterator | ConstIterator |
typedef std::vector< Value >::reverse_iterator | ReverseIterator |
typedef std::vector< Value >::const_reverse_iterator | ConstReverseIterator |
typedef std::vector< Value >::difference_type | Difference |
typedef std::vector< Value >::iterator | OutputIterator |
typedef std::vector< Value >::reverse_iterator | ReverseOutputIterator |
typedef SimpleRandomAccessConstRangeFromPoint< ConstIterator, DistanceFunctorFromPoint< Self > > | ConstRange |
typedef SimpleRandomAccessRangeFromPoint< ConstIterator, Iterator, DistanceFunctorFromPoint< Self > > | Range |
Private Attributes | |
Domain | myDomain |
Image domain. | |
Vector | myExtent |
Domain extent (stored for linearization efficiency) | |
Description of class 'ImageContainerBySTLVector'
Aim: Model of CImage implementing the association Point<->Value using a STL vector as container. A linearization of domain points is used to build the STL vector index.
As a model of CImage, this class provides two ways of accessing values:
This class also provides a setValue() method and an output iterator, which is returned by the outputIterator() method for writing purposes.
Lastly, built-in iterators and a fast span iterator to perform 1D scans are also provided.
TDomain | a HyperRectDomain. |
TValue | at least a model of CLabel. |
Definition at line 126 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::const_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstIterator |
Definition at line 265 of file ImageContainerBySTLVector.h.
typedef SimpleRandomAccessConstRangeFromPoint<ConstIterator,DistanceFunctorFromPoint<Self> > DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstRange |
Definition at line 274 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::const_reverse_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ConstReverseIterator |
Definition at line 267 of file ImageContainerBySTLVector.h.
typedef Parent DGtal::ImageContainerBySTLVector< TDomain, TValue >::Container |
Definition at line 133 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::difference_type DGtal::ImageContainerBySTLVector< TDomain, TValue >::Difference |
Definition at line 268 of file ImageContainerBySTLVector.h.
typedef Domain::Dimension DGtal::ImageContainerBySTLVector< TDomain, TValue >::Dimension |
Definition at line 142 of file ImageContainerBySTLVector.h.
typedef TDomain DGtal::ImageContainerBySTLVector< TDomain, TValue >::Domain |
Definition at line 137 of file ImageContainerBySTLVector.h.
typedef Domain::Integer DGtal::ImageContainerBySTLVector< TDomain, TValue >::Integer |
Definition at line 140 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::Iterator |
Definition at line 264 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::OutputIterator |
Definition at line 270 of file ImageContainerBySTLVector.h.
typedef std::vector<TValue> DGtal::ImageContainerBySTLVector< TDomain, TValue >::Parent |
Definition at line 132 of file ImageContainerBySTLVector.h.
typedef Domain::Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::Point |
Definition at line 138 of file ImageContainerBySTLVector.h.
typedef SimpleRandomAccessRangeFromPoint<ConstIterator,Iterator,DistanceFunctorFromPoint<Self> > DGtal::ImageContainerBySTLVector< TDomain, TValue >::Range |
Definition at line 275 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::reverse_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ReverseIterator |
Definition at line 266 of file ImageContainerBySTLVector.h.
typedef std::vector<Value>::reverse_iterator DGtal::ImageContainerBySTLVector< TDomain, TValue >::ReverseOutputIterator |
Definition at line 271 of file ImageContainerBySTLVector.h.
typedef ImageContainerBySTLVector<TDomain, TValue> DGtal::ImageContainerBySTLVector< TDomain, TValue >::Self |
Definition at line 131 of file ImageContainerBySTLVector.h.
typedef Domain::Size DGtal::ImageContainerBySTLVector< TDomain, TValue >::Size |
Definition at line 141 of file ImageContainerBySTLVector.h.
typedef TValue DGtal::ImageContainerBySTLVector< TDomain, TValue >::Value |
Definition at line 153 of file ImageContainerBySTLVector.h.
typedef Domain::Vector DGtal::ImageContainerBySTLVector< TDomain, TValue >::Vector |
Definition at line 139 of file ImageContainerBySTLVector.h.
typedef Point DGtal::ImageContainerBySTLVector< TDomain, TValue >::Vertex |
Definition at line 143 of file ImageContainerBySTLVector.h.
DGtal::ImageContainerBySTLVector< TDomain, TValue >::ImageContainerBySTLVector | ( | const Domain & | aDomain | ) |
Constructor from a Domain
aDomain | the image domain. |
DGtal::ImageContainerBySTLVector< TDomain, TValue >::ImageContainerBySTLVector | ( | const ImageContainerBySTLVector< TDomain, TValue > & | other | ) |
Copy constructor
other | the object to copy. |
DGtal::ImageContainerBySTLVector< TDomain, TValue >::~ImageContainerBySTLVector | ( | ) |
Destructor.
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDomain< TDomain >) | ) |
domain
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_CONCEPT_ASSERT | ( | (concepts::CLabel< TValue >) | ) |
range of values
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_STATIC_ASSERT | ( | (boost::is_same< Domain, HyperRectDomain< typename Domain::Space > >::value) | ) |
domain should be rectangular
DGtal::ImageContainerBySTLVector< TDomain, TValue >::BOOST_STATIC_CONSTANT | ( | Dimension | , |
dimension | = Domain::Space::dimension ) |
std::string DGtal::ImageContainerBySTLVector< TDomain, TValue >::className | ( | ) | const |
ConstRange DGtal::ImageContainerBySTLVector< TDomain, TValue >::constRange | ( | ) | const |
Referenced by DGtal::Image< TImageContainer >::constRange(), DGtal::PowerMap< TWeightImage, TPowerSeparableMetric, TImageContainer >::constRange(), DGtal::VoronoiMap< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::constRange(), and DGtal::VoronoiMapComplete< TSpace, TPointPredicate, TSeparableMetric, TImageContainer >::constRange().
|
inline |
Give access to the underlying container.
Definition at line 298 of file ImageContainerBySTLVector.h.
|
inline |
Give access to the underlying container.
Definition at line 293 of file ImageContainerBySTLVector.h.
const Domain & DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain | ( | ) | const |
Referenced by cmpTranslatedFFT(), DGtal::Image< TImageContainer >::domain(), DGtal::ImageFactoryFromImage< TImageContainer >::domain(), DGtal::ImageFactoryFromHDF5< TImageContainer >::flushImage(), DGtal::ImageFactoryFromImage< TImageContainer >::flushImage(), DGtal::ConstImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV >::operator()(), DGtal::ImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV, TFunctorVm1 >::operator()(), DGtal::ImageFactoryFromImage< TImageContainer >::requestImage(), testFFTScaling(), and testForwardBackwardFFT().
const Vector & DGtal::ImageContainerBySTLVector< TDomain, TValue >::extent | ( | ) | const |
Referenced by cmpTranslatedFFT(), and testFFTScaling().
|
inline |
Returns the value of the image at a given SpanIterator position.
it | position given by a SpanIterator. |
Definition at line 517 of file ImageContainerBySTLVector.h.
bool DGtal::ImageContainerBySTLVector< TDomain, TValue >::isValid | ( | ) | const |
Referenced by DGtal::ConstImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV >::isValid(), DGtal::Image< TImageContainer >::isValid(), DGtal::ImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV, TFunctorVm1 >::isValid(), and DGtal::ImageFactoryFromImage< TImageContainer >::isValid().
Size DGtal::ImageContainerBySTLVector< TDomain, TValue >::linearized | ( | const Point & | aPoint | ) | const |
Linearized a point and return the vector position.
aPoint | the point to convert to an index |
Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValue >::SpanIterator::SpanIterator().
Value DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator() | ( | const Point & | aPoint | ) | const |
Get the value of an image at a given position given by a Point.
aPoint | the point. |
ImageContainerBySTLVector & DGtal::ImageContainerBySTLVector< TDomain, TValue >::operator= | ( | const ImageContainerBySTLVector< TDomain, TValue > & | other | ) |
Assignment operator
other | the object to copy. |
Range DGtal::ImageContainerBySTLVector< TDomain, TValue >::range | ( | ) |
Referenced by DGtal::Image< TImageContainer >::range().
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::setValue | ( | const Point & | aPoint, |
const Value & | aValue ) |
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. |
Referenced by brut_force_voronoi_map_complete(), DGtal::ImageFactoryFromImage< TImageContainer >::flushImage(), DGtal::ReducedMedialAxis< TPowerMap, TImageContainer >::getReducedMedialAxisFromPowerMap(), DGtal::ImageFactoryFromHDF5< TImageContainer >::requestImage(), DGtal::ImageFactoryFromImage< TImageContainer >::requestImage(), DGtal::Image< TImageContainer >::setValue(), and DGtal::ImageAdapter< TImageContainer, TNewDomain, TFunctorD, TNewValue, TFunctorV, TFunctorVm1 >::setValue().
|
inline |
Set a value on an Image at a position specified by an SpanIterator.
it | iterator on the location. |
aValue | the value. |
Definition at line 474 of file ImageContainerBySTLVector.h.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::SpanIterator::setValue().
|
inline |
Create a begin() SpanIterator at a given position in a given direction.
aPoint | the starting point of the SpanIterator. |
aDimension | the dimension on which the iterator iterates. |
Definition at line 489 of file ImageContainerBySTLVector.h.
References aPoint().
|
inline |
Create an end() SpanIterator at a given position in a given direction.
aPoint | a point belonging to the current image dimension (not necessarily the point used in the span_begin() method. |
aDimension | the dimension on which the iterator iterates. |
Definition at line 504 of file ImageContainerBySTLVector.h.
References aPoint(), and DGtal::ImageContainerBySTLVector< TDomain, TValue >::myDomain.
void DGtal::ImageContainerBySTLVector< TDomain, TValue >::translateDomain | ( | const Vector & | aShift | ) |
Translate the underlying domain by aShift
aShift | any vector |
|
private |
Image domain.
Definition at line 160 of file ImageContainerBySTLVector.h.
Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValue >::spanEnd().
|
private |
Domain extent (stored for linearization efficiency)
Definition at line 163 of file ImageContainerBySTLVector.h.
Referenced by DGtal::ImageContainerBySTLVector< TDomain, TValue >::SpanIterator::SpanIterator().