![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
General Hough space. More...
#include <TGeneralHoughSpace.h>
Public Types | |
typedef istd::TArray< Element, Dimensions > | BaseClass |
typedef TIHoughSpace< Dimensions, Element > | BaseClass2 |
![]() | |
typedef TIndex< Dimensions > | IndexType |
typedef TIndex< Dimensions > | SizesType |
typedef double | ElementType |
![]() | |
enum | ExtensionMode |
Describe how the space is extended, it means how the area outside of space should be interpreted. More... | |
![]() | |
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. | |
![]() | |
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 SizesType & | GetSizes () 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. | |
TArray & | operator= (TArray &&array)=default |
TArray & | operator= (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) |
![]() | |
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. | |
![]() | |
virtual quint32 | GetMinimalVersion (int versionId) const |
Get minimal needed version to correct storing of this data. | |
![]() | |
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< IChangeable > | CloneMe (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) |
![]() | |
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) |
![]() | |
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 const ChangeSet & | GetNoChanges () |
Get empty set of changes. | |
static const ChangeSet & | GetAnyChange () |
Get anonymous change set. | |
static const ChangeSet & | GetAllChanges () |
Get anonymous change set. | |
static const ChangeSet & | GetDelegatedChanges () |
Get delegated change set. | |
![]() | |
typedef std::vector< double > | Elements |
![]() | |
SizesType | m_sizes |
Elements | m_elements |
General Hough space.
Definition at line 26 of file TGeneralHoughSpace.h.
istd::TArray<Element, Dimensions> ialgo::TGeneralHoughSpace< Dimensions, Element >::BaseClass |
Definition at line 31 of file TGeneralHoughSpace.h.
TIHoughSpace<Dimensions, Element> ialgo::TGeneralHoughSpace< Dimensions, Element >::BaseClass2 |
Definition at line 32 of file TGeneralHoughSpace.h.
ialgo::TGeneralHoughSpace< Dimensions, Element >::TGeneralHoughSpace | ( | ) |
Definition at line 132 of file TGeneralHoughSpace.h.
ialgo::TGeneralHoughSpace< Dimensions, Element >::TGeneralHoughSpace | ( | const istd::TIndex< Dimensions > & | size | ) |
Definition at line 138 of file TGeneralHoughSpace.h.
References ialgo::TGeneralHoughSpace< Dimensions, Element >::CreateHoughSpace().
|
virtual |
Definition at line 278 of file TGeneralHoughSpace.h.
References ialgo::TIHoughSpace< Dimensions, Element >::ResultsConsumer::GetSupportedNeghboursCount(), istd::TIndex< Dimensions >::Increase(), istd::TIndex< Dimensions >::IsInside(), ialgo::TIHoughSpace< Dimensions, Element >::ResultsConsumer::OnMaximumFound(), ialgo::TIHoughSpace< Dimensions, Element >::ResultsConsumer::OnProcessingBegin(), and ialgo::TIHoughSpace< Dimensions, Element >::ResultsConsumer::OnProcessingEnd().
void ialgo::TGeneralHoughSpace< Dimensions, Element >::ApplyOperation | ( | Operation | operation | ) |
Apply some operation to each element.
Definition at line 459 of file TGeneralHoughSpace.h.
void ialgo::TGeneralHoughSpace< Dimensions, Element >::CombineWithSpace | ( | const TGeneralHoughSpace< Dimensions, Element > & | space, |
Operation | operation ) |
Combine this space with some other space.
Definition at line 473 of file TGeneralHoughSpace.h.
References istd::TIndex< Dimensions >::GetZero(), istd::TIndex< Dimensions >::Increase(), istd::TIndex< Dimensions >::IsInside(), and istd::TArray< Element, Dimensions >::m_sizes.
|
virtual |
Definition at line 194 of file TGeneralHoughSpace.h.
Referenced by ialgo::TGeneralHoughSpace< Dimensions, Element >::TGeneralHoughSpace().
|
virtual |
Extract this Hough space to some gray scale bitmap.
Implements ialgo::TIHoughSpace< Dimensions, double >.
Definition at line 385 of file TGeneralHoughSpace.h.
References iimg::IRasterImage::ClearImage(), iimg::IBitmap::CreateBitmap(), iimg::IBitmap::GetLinePtr(), istd::CIndex2d::GetX(), istd::CIndex2d::GetY(), and iimg::IBitmap::PF_GRAY.
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.
|
virtual |
Get extension mode for single dimension.
Implements ialgo::TIHoughSpace< Dimensions, double >.
Definition at line 223 of file TGeneralHoughSpace.h.
|
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.
|
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.
|
virtual |
Get position in space for some input.
It consides the wrapping of space.
Implements ialgo::TIHoughSpace< Dimensions, double >.
Definition at line 435 of file TGeneralHoughSpace.h.
|
virtual |
Get size of this Hough space.
Implements ialgo::TIHoughSpace< Dimensions, double >.
Definition at line 187 of file TGeneralHoughSpace.h.
|
virtual |
Definition at line 233 of file TGeneralHoughSpace.h.
|
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.
|
virtual |
Load or store state of this object as a archive stream.
Type of operation is depending on archive type.
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.
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.
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.
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.
|
virtual |
Smooth this space with specified stronness.
Implements ialgo::TIHoughSpace< Dimensions, double >.
Definition at line 264 of file TGeneralHoughSpace.h.
|
protected |
Definition at line 541 of file TGeneralHoughSpace.h.
© Witold Gantzke and Kirill Lepskiy