ICF 3.0.5.47
Technical documentation of ICF Libraries
ialgo::TGeneralHoughSpace< Dimensions, Element > Class Template Reference

General Hough space. More...

#include <TGeneralHoughSpace.h>

Inheritance diagram for ialgo::TGeneralHoughSpace< Dimensions, Element >:
Collaboration diagram for ialgo::TGeneralHoughSpace< Dimensions, Element >:

Public Types

typedef istd::TArray< Element, Dimensions > BaseClass
 
typedef TIHoughSpace< Dimensions, Element > BaseClass2
 
- Public Types inherited from istd::TArray< double, Dimensions >
typedef TIndex< Dimensions > IndexType
 
typedef TIndex< Dimensions > SizesType
 
typedef double ElementType
 
- Public Types inherited from ialgo::TIHoughSpace< Dimensions, double >
enum  ExtensionMode
 Describe how the space is extended, it means how the area outside of space should be interpreted. More...
 
- Public Types inherited from istd::IChangeable
enum  ChangeFlags {
  CF_ICF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING ,
  CF_DELEGATED , CF_NO_UNDO
}
 Data model change notification flags. More...
 
enum  SupportedOperations {
  SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 ,
  SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 , SO_CHANGE_LOCK = 1 << 5
}
 Flags for supported operations. More...
 
enum  CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT }
 Control how relationship betweeen objects are 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.
 
template<typename Operation >
void CombineWithSpace (const TGeneralHoughSpace &space, Operation operation)
 Combine this space with some other space.
 
void SetDimensionWrapped (int dimensionIndex, bool state)
 Set if this space to be wrapped horizontaly or not.
 
void SetExtensionBorder (int dimensionIndex, bool state)
 Set mode of extension mode to border or not.
 
double GetDistScalingFactor (int dimensionIndex) const
 Get the distance scaling factors used to calculate how far are elements in this space.
 
void SetDistScalingFactor (int dimensionIndex, double factor)
 Set the distance scaling factors used to calculate how far are elements in this space.
 
virtual istd::TIndex< Dimensions > GetSpaceSize () const
 Get size of this Hough space.
 
virtual bool CreateHoughSpace (const istd::TIndex< Dimensions > &size, const Element &initValue=0)
 
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.
 
virtual BaseClass2::ExtensionMode GetExtensionMode (int dimensionIndex) const
 Get extension mode for single dimension.
 
virtual void IncreaseValueAt (const imath::TVector< Dimensions > &position, Element value)
 
virtual void SmoothHoughSpace (const istd::TIndex< Dimensions > &iterations)
 Smooth this space with specified stronness.
 
virtual bool AnalyseHoughSpace (const Element &minValue, typename BaseClass2::ResultsConsumer &resultProcessor) const
 
virtual bool ExtractToBitmap (iimg::IBitmap &bitmap) const
 Extract this Hough space to some gray scale bitmap.
 
virtual bool GetSpacePosition (const imath::TVector< Dimensions > &position, imath::TVector< Dimensions > &result) const
 Get position in space for some input.
 
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.
 
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.
 
virtual bool Serialize (iser::IArchive &archive)
 Load or store state of this object as a archive stream.
 
- Public Member Functions inherited from istd::TArray< double, Dimensions >
 TArray ()
 
 TArray (TArray &&array)=default
 
 TArray (const TArray &array)=default
 
 TArray (const SizesType &sizes)
 
void Reset ()
 Removes all elements and set all sizes to 0.
 
bool IsEmpty () const
 Check if this array has no elements.
 
bool IsDimensionsCountFixed () const
 Check, if number dimensions is fixed.
 
int GetDimensionsCount () const
 Get number of dimensions of this array.
 
bool SetDimensionsCount (int count)
 Set number of dimensions of this array.
 
const SizesTypeGetSizes () const
 Get list of all sizes.
 
bool SetSizes (const SizesType &sizes)
 Set list of all sizes.
 
int GetSize (int dimension) const
 Get size of array for specified dimension.
 
bool SetSize (int dimension, int size)
 Set size of array for specified dimension.
 
const double & GetAt (const IndexType &index) const
 Get element stored at specified index.
 
double & GetAtRef (const IndexType &index)
 Get reference to element stored at specified index.
 
void SetAt (const IndexType &index, const double &value)
 Set element at specified index.
 
void SetAllElements (const double &value)
 Set some value to all elements.
 
iterator begin () const
 Get begin value of element access iterator.
 
const iterator & end () const
 Get end value of element access iterator.
 
TArrayoperator= (TArray &&array)=default
 
TArrayoperator= (const TArray &array)=default
 
bool operator== (const TArray< double, Dimensions > &value) const
 
bool operator!= (const TArray< double, Dimensions > &value) const
 
const double & operator[] (const IndexType &index) const
 
double & operator[] (const IndexType &index)
 
- Public Member Functions inherited from ialgo::TIHoughSpace< Dimensions, double >
virtual bool CreateHoughSpace (const istd::TIndex< Dimensions > &size, const double &initValue=0)=0
 Create Hough space with specified size.
 
virtual void IncreaseValueAt (const imath::TVector< Dimensions > &position, double value)=0
 Increase the value at specified position.
 
virtual bool AnalyseHoughSpace (const double &minValue, ResultsConsumer &resultProcessor) const=0
 Analyse this Hough space to find set of local maximums.
 
- Public Member Functions inherited from iser::ISerializable
virtual quint32 GetMinimalVersion (int versionId) const
 Get minimal needed version to correct storing of this data.
 
- Public Member Functions inherited from istd::IChangeable
virtual int GetSupportedOperations () const
 Get set of flags for supported operations.
 
virtual bool CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
 Copy this object from another one.
 
virtual bool IsEqual (const IChangeable &object) const
 Compare this object with another object.
 
virtual std::unique_ptr< IChangeableCloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const
 Make a copy of this object.
 
virtual bool ResetData (CompatibilityMode mode=CM_WITHOUT_REFS)
 Reset data to its default state.
 
virtual QMutex * GetChangesLock () const
 Get mutex beeing locked during changes, if available.
 
virtual void BeginChanges (const ChangeSet &changeSet)
 Starts the change transaction.
 
virtual void EndChanges (const ChangeSet &changeSet)
 Ends the change transaction.
 
virtual void BeginChangeGroup (const ChangeSet &changeSet)
 Starts group of changes.
 
virtual void EndChangeGroup (const ChangeSet &changeSet)
 Ends group of changes.
 

Protected Member Functions

void SmoothSingleDimension (int dimensionIndex, int iterations)
 
- Protected Member Functions inherited from istd::TArray< double, Dimensions >
int GetElementIndex (const IndexType &index) const
 Get index of element in one dimensional array.
 
void UpdateElementsSize ()
 Update size of elements to size changes.
 
void DeepCopy (const Elements &elements, const SizesType &sizes)
 
- Protected Member Functions inherited from istd::IChangeable
virtual void OnBeginChanges ()
 Callback function for begin change event.
 
virtual void OnEndChanges (const ChangeSet &changeSet)
 Callback function for end change event.
 

Additional Inherited Members

- Static Public Member Functions inherited from istd::IChangeable
static const ChangeSetGetNoChanges ()
 Get empty set of changes.
 
static const ChangeSetGetAnyChange ()
 Get anonymous change set.
 
static const ChangeSetGetAllChanges ()
 Get anonymous change set.
 
static const ChangeSetGetDelegatedChanges ()
 Get delegated change set.
 
- Protected Types inherited from istd::TArray< double, Dimensions >
typedef std::vector< double > Elements
 
- Protected Attributes inherited from istd::TArray< double, 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 26 of file TGeneralHoughSpace.h.

Member Typedef Documentation

◆ BaseClass

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

Definition at line 31 of file TGeneralHoughSpace.h.

◆ BaseClass2

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

Definition at line 32 of file TGeneralHoughSpace.h.

Constructor & Destructor Documentation

◆ TGeneralHoughSpace() [1/2]

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

Definition at line 132 of file TGeneralHoughSpace.h.

◆ TGeneralHoughSpace() [2/2]

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

Member Function Documentation

◆ AnalyseHoughSpace()

◆ ApplyOperation()

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 459 of file TGeneralHoughSpace.h.

◆ CombineWithSpace()

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

◆ CreateHoughSpace()

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

◆ ExtractToBitmap()

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

◆ GetDistScalingFactor()

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 165 of file TGeneralHoughSpace.h.

◆ GetExtensionMode()

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, double >.

Definition at line 223 of file TGeneralHoughSpace.h.

◆ GetSpaceDistance()

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, double >.

Definition at line 100 of file TGeneralHoughSpace.h.

◆ GetSpaceDistance2()

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, double >.

Definition at line 107 of file TGeneralHoughSpace.h.

◆ GetSpacePosition()

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, double >.

Definition at line 435 of file TGeneralHoughSpace.h.

◆ GetSpaceSize()

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, double >.

Definition at line 187 of file TGeneralHoughSpace.h.

◆ IncreaseValueAt()

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

Definition at line 233 of file TGeneralHoughSpace.h.

◆ IsDimensionWrapped()

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, double >.

Definition at line 213 of file TGeneralHoughSpace.h.

◆ Serialize()

template<int Dimensions, class Element >
bool ialgo::TGeneralHoughSpace< Dimensions, Element >::Serialize ( iser::IArchive & archive)
virtual

Load or store state of this object as a archive stream.

Type of operation is depending on archive type.

See also
iser::IArchive

Implements iser::ISerializable.

Definition at line 494 of file TGeneralHoughSpace.h.

References iser::IArchive::BeginMultiTag(), iser::IArchive::BeginTag(), iser::IArchive::EndTag(), iser::IArchive::IsChanging(), iser::IArchive::Process(), iser::CArchiveTag::TT_GROUP, and iser::CArchiveTag::TT_MULTIPLE.

◆ SetDimensionWrapped()

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 145 of file TGeneralHoughSpace.h.

◆ SetDistScalingFactor()

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 175 of file TGeneralHoughSpace.h.

◆ SetExtensionBorder()

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 155 of file TGeneralHoughSpace.h.

◆ SmoothHoughSpace()

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, double >.

Definition at line 264 of file TGeneralHoughSpace.h.

◆ SmoothSingleDimension()

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

Definition at line 541 of file TGeneralHoughSpace.h.


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

© Witold Gantzke and Kirill Lepskiy