Public Types | Public Member Functions | Protected Member Functions | List of all members
ialgo::TGeneralHoughSpace< Dimensions, Element > Class Template Reference

General Hough space. More...

#include <TGeneralHoughSpace.h>

Inheritance diagram for ialgo::TGeneralHoughSpace< Dimensions, Element >:
istd::TArray< Element, Dimensions > ialgo::TIHoughSpace< Dimensions, Element > iser::ISerializable istd::IChangeable istd::IPolymorphic

Public Types

typedef istd::TArray< Element,
Dimensions > 
BaseClass
 
typedef TIHoughSpace
< Dimensions, Element > 
BaseClass2
 
- Public Types inherited from istd::TArray< Element, Dimensions >
typedef TIndex< Dimensions > IndexType
 
typedef TIndex< Dimensions > SizesType
 
typedef Element ElementType
 
- Public Types inherited from ialgo::TIHoughSpace< Dimensions, Element >
enum  ExtensionMode { EM_UNKNOWN, EM_ZERO, EM_BORDER }
 Describe how the space is extended, it means how the area outside of space should be interpreted. More...
 

Public Member Functions

 TGeneralHoughSpace ()
 
 TGeneralHoughSpace (const istd::TIndex< Dimensions > &size)
 
template<typename Operation >
void ApplyOperation (Operation operation)
 Apply some operation to each element. More...
 
template<typename Operation >
void CombineWithSpace (const TGeneralHoughSpace &space, Operation operation)
 Combine this space with some other space. More...
 
void SetDimensionWrapped (int dimensionIndex, bool state)
 Set if this space to be wrapped horizontaly or not. More...
 
void SetExtensionBorder (int dimensionIndex, bool state)
 Set mode of extension mode to border or not. More...
 
double GetDistScalingFactor (int dimensionIndex) const
 Get the distance scaling factors used to calculate how far are elements in this space. More...
 
void SetDistScalingFactor (int dimensionIndex, double factor)
 Set the distance scaling factors used to calculate how far are elements in this space. More...
 
virtual istd::TIndex< Dimensions > GetSpaceSize () const
 Get size of this Hough space. More...
 
virtual bool CreateHoughSpace (const istd::TIndex< Dimensions > &size, const Element &initValue=0)
 Create Hough space with specified size. More...
 
virtual bool IsDimensionWrapped (int dimensionIndex) const
 Check if this space is wrapped horizontaly, it means the the left pixel is neighbour of the right one. More...
 
virtual BaseClass2::ExtensionMode GetExtensionMode (int dimensionIndex) const
 Get extension mode for single dimension. More...
 
virtual void IncreaseValueAt (const imath::TVector< Dimensions > &position, Element value)
 Increase the value at specified position. More...
 
virtual void SmoothHoughSpace (const istd::TIndex< Dimensions > &iterations)
 Smooth this space with specified stronness. More...
 
virtual bool AnalyseHoughSpace (const Element &minValue, typename BaseClass2::ResultsConsumer &resultProcessor) const
 Analyse this Hough space to find set of local maximums. More...
 
virtual bool ExtractToBitmap (iimg::IBitmap &bitmap) const
 Extract this Hough space to some gray scale bitmap. More...
 
virtual bool GetSpacePosition (const imath::TVector< Dimensions > &position, imath::TVector< Dimensions > &result) const
 Get position in space for some input. More...
 
virtual double GetSpaceDistance (const imath::TVector< Dimensions > &position1, const imath::TVector< Dimensions > &position2) const
 Get distance between two hough space positions considering the space wrapping. More...
 
virtual double GetSpaceDistance2 (const imath::TVector< Dimensions > &position1, const imath::TVector< Dimensions > &position2) const
 Get square of distance between two hough space positions considering the space wrapping. More...
 
virtual bool Serialize (iser::IArchive &archive)
 
- Public Member Functions inherited from istd::TArray< Element, Dimensions >
 TArray ()
 
 TArray (const TArray &array)
 
 TArray (const SizesType &sizes, const ElementType &value=ElementType())
 
void Reset ()
 
bool IsEmpty () const
 
bool IsDimensionsCountFixed () const
 
int GetDimensionsCount () const
 
bool SetDimensionsCount (int count)
 
const SizesTypeGetSizes () const
 
bool SetSizes (const SizesType &sizes)
 
int GetSize (int dimension) const
 
bool SetSize (int dimension, int size)
 
const Element & GetAt (const IndexType &index) const
 
Element & GetAtRef (const IndexType &index)
 
void SetAt (const IndexType &index, const Element &value)
 
void SetAllElements (const Element &value)
 
Iterator Begin () const
 
const IteratorEnd () const
 
bool operator== (const TArray< Element, Dimensions > &value) const
 
bool operator!= (const TArray< Element, Dimensions > &value) const
 
const Element & operator[] (const IndexType &index) const
 
Element & operator[] (const IndexType &index)
 

Protected Member Functions

void SmoothSingleDimension (int dimensionIndex, int iterations)
 
- Protected Member Functions inherited from istd::TArray< Element, Dimensions >
int GetElementIndex (const IndexType &index) const
 
void UpdateElementsSize (const ElementType &value=ElementType())
 
void DeepCopy (const Elements &elements, const SizesType &sizes)
 

Additional Inherited Members

- Protected Types inherited from istd::TArray< Element, Dimensions >
typedef std::vector< Element > Elements
 
- Protected Attributes inherited from istd::TArray< Element, Dimensions >
SizesType m_sizes
 
Elements m_elements
 

Detailed Description

template<int Dimensions, class Element = double>
class ialgo::TGeneralHoughSpace< Dimensions, Element >

General Hough space.

Definition at line 24 of file TGeneralHoughSpace.h.

Member Typedef Documentation

template<int Dimensions, class Element = double>
typedef istd::TArray<Element, Dimensions> ialgo::TGeneralHoughSpace< Dimensions, Element >::BaseClass

Definition at line 29 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element = double>
typedef TIHoughSpace<Dimensions, Element> ialgo::TGeneralHoughSpace< Dimensions, Element >::BaseClass2

Definition at line 30 of file TGeneralHoughSpace.h.

Constructor & Destructor Documentation

template<int Dimensions, class Element >
ialgo::TGeneralHoughSpace< Dimensions, Element >::TGeneralHoughSpace ( )

Definition at line 130 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
ialgo::TGeneralHoughSpace< Dimensions, Element >::TGeneralHoughSpace ( const istd::TIndex< Dimensions > &  size)

Member Function Documentation

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::AnalyseHoughSpace ( const Element &  minValue,
typename BaseClass2::ResultsConsumer resultProcessor 
) const
virtual
template<int Dimensions, class Element >
template<typename Operation >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::ApplyOperation ( Operation  operation)

Apply some operation to each element.

Definition at line 457 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
template<typename Operation >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::CombineWithSpace ( const TGeneralHoughSpace< Dimensions, Element > &  space,
Operation  operation 
)

Combine this space with some other space.

Definition at line 471 of file TGeneralHoughSpace.h.

References istd::TArray< Element, Dimensions >::m_sizes.

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::CreateHoughSpace ( const istd::TIndex< Dimensions > &  size,
const Element &  initValue = 0 
)
virtual

Create Hough space with specified size.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 192 of file TGeneralHoughSpace.h.

Referenced by ialgo::TGeneralHoughSpace< Dimensions, Element >::TGeneralHoughSpace().

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::ExtractToBitmap ( iimg::IBitmap bitmap) const
virtual

Extract this Hough space to some gray scale bitmap.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 383 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
double ialgo::TGeneralHoughSpace< Dimensions, Element >::GetDistScalingFactor ( int  dimensionIndex) const

Get the distance scaling factors used to calculate how far are elements in this space.

Definition at line 163 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
TIHoughSpace< Dimensions, Element >::ExtensionMode ialgo::TGeneralHoughSpace< Dimensions, Element >::GetExtensionMode ( int  dimensionIndex) const
virtual

Get extension mode for single dimension.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 221 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
double ialgo::TGeneralHoughSpace< Dimensions, Element >::GetSpaceDistance ( const imath::TVector< Dimensions > &  position1,
const imath::TVector< Dimensions > &  position2 
) const
inlinevirtual

Get distance between two hough space positions considering the space wrapping.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 98 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
double ialgo::TGeneralHoughSpace< Dimensions, Element >::GetSpaceDistance2 ( const imath::TVector< Dimensions > &  position1,
const imath::TVector< Dimensions > &  position2 
) const
inlinevirtual

Get square of distance between two hough space positions considering the space wrapping.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 105 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::GetSpacePosition ( const imath::TVector< Dimensions > &  position,
imath::TVector< Dimensions > &  result 
) const
virtual

Get position in space for some input.

It consides the wrapping of space.

Returns
true, if this position is representable in the space.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 433 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
istd::TIndex< Dimensions > ialgo::TGeneralHoughSpace< Dimensions, Element >::GetSpaceSize ( ) const
virtual

Get size of this Hough space.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 185 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::IncreaseValueAt ( const imath::TVector< Dimensions > &  position,
Element  value 
)
virtual

Increase the value at specified position.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 231 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::IsDimensionWrapped ( int  dimensionIndex) const
virtual

Check if this space is wrapped horizontaly, it means the the left pixel is neighbour of the right one.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 211 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::Serialize ( iser::IArchive archive)
virtual
template<int Dimensions, class Element >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::SetDimensionWrapped ( int  dimensionIndex,
bool  state 
)

Set if this space to be wrapped horizontaly or not.

Space is horizonally wrapped if the left pixel is neighbour of the right one.

Definition at line 143 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::SetDistScalingFactor ( int  dimensionIndex,
double  factor 
)

Set the distance scaling factors used to calculate how far are elements in this space.

Definition at line 173 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::SetExtensionBorder ( int  dimensionIndex,
bool  state 
)

Set mode of extension mode to border or not.

Definition at line 153 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::SmoothHoughSpace ( const istd::TIndex< Dimensions > &  iterations)
virtual

Smooth this space with specified stronness.

Implements ialgo::TIHoughSpace< Dimensions, Element >.

Definition at line 262 of file TGeneralHoughSpace.h.

template<int Dimensions, class Element >
void ialgo::TGeneralHoughSpace< Dimensions, Element >::SmoothSingleDimension ( int  dimensionIndex,
int  iterations 
)
protected

Definition at line 538 of file TGeneralHoughSpace.h.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy