#include <ncutCore.h>
Public Member Functions | |
const greedy_ptr< const Profile< IMG_ELM_TYPE, MSK_ELM_TYPE > > | profile () const |
Get the Profile this Node uses. | |
const std::map< MSK_ELM_TYPE, unsigned int > * | indices () const |
Get the index map of the elements in this NcutNode. | |
const greedy_ptr< const Ncut > | ncut () const |
Get the Ncut calculated by this NcutNode. | |
double | eigVal () const |
Get the eigenvalue of the eigenvector this NcutNode uses for partitioning. | |
const double * | eigVec () const |
Get a pointer to the eigenvector this NcutNode uses for partitioning. | |
double | splitPoint () const |
Get the splitting point this NcutNode uses for partitioning. | |
double | eigVecNum () const |
Get the number of the eigenvector that was used for partitioning. | |
const greedy_ptr< const NcutNode > | leftNode () const |
Get the left child NcutNode of this NcutNode. | |
const greedy_ptr< const NcutNode > | rightNode () const |
Get the right child NcutNode of this NcutNode. | |
int | calculate (unsigned int maxDepth, unsigned int depth, unsigned int nEigVecs, unsigned int eigvn, double *initVec=NULL) |
Constructs the ncut dendogram. | |
bool | isLeft (unsigned int idx) const |
Checks to which half an element is assigned in this node. | |
NcutNode (std::auto_ptr< Profile< IMG_ELM_TYPE, MSK_ELM_TYPE > > &profile, const std::map< MSK_ELM_TYPE, unsigned int > &indices, greedy_ptr< Ncut > &ncut, const Setting *setting) | |
NcutNode owning constructor, takes ownership of profile . | |
NcutNode (greedy_ptr< Profile< IMG_ELM_TYPE, MSK_ELM_TYPE > > &profile, const std::map< MSK_ELM_TYPE, unsigned int > &indices, greedy_ptr< Ncut > &ncut, const Setting *setting) | |
NcutNode non-owning constructor, does not own profile . | |
NcutNode (const NcutNode &clone) | |
NcutNode copy constructor. | |
NcutNode (const NcutNode &clone, greedy_ptr< Profile< IMG_ELM_TYPE, MSK_ELM_TYPE > > &pclone, greedy_ptr< Ncut > &nclone) | |
NcutNode custom copy constructor. | |
virtual | ~NcutNode () |
NcutNode destructor. | |
virtual NcutNode & | operator= (const NcutNode &clone) |
NcutNode assignment operator. | |
Protected Attributes | |
greedy_ptr< Profile< IMG_ELM_TYPE, MSK_ELM_TYPE > > | profile_ |
std::map< MSK_ELM_TYPE, unsigned int > | indices_ |
greedy_ptr< Ncut > | ncut_ |
double | eigVal_ |
const double * | eigVec_ |
double | splitPoint_ |
unsigned int | eigVecNum_ |
greedy_ptr< NcutNode > | leftNode_ |
greedy_ptr< NcutNode > | rightNode_ |
const Setting * | setting_ |
A node represents one bipartition of a segment into two halves. The root NcutNode
bipartitions (splits) the whole image. leftNode
and rightNode
point to the NcutNode
s (=partitions) of the two resulting segments or to NULL
if the resulting segments aren't partitioned any further. An eigenvector, calculated by the class Ncut
, is used as an indicator vector to bipartition a segment. The node does not neccessarily contain a new ncut, an eigenvector of an ncut calculated in a level closer to the root may also be used. If this is the case, ncut_
points to the old ncut, but eigVec_
points to the eigenvector that is used to partition this segment. Segmentation is not performed on pixels, but on elements, for example the segments of a pre-segmentation. Elements have global identifiers and local indices. indices_
is a map from element identifiers to element indices in each NcutNode
. This map is also a list of elements that are part of the current segment. Do not use NcutNode
directly, construct the ncut dendogram using the functions provided by the class Segmentation
.
|
NcutNode owning constructor, takes ownership of
profile , element indices list indices and optionally with Ncut ncut . profile is owned by this NcutNode. |
|
NcutNode non-owning constructor, does not own
profile , element indices list indices and optionally with Ncut ncut . profile is not owned by this NcutNode. |
|
NcutNode copy constructor.
clone and all its child nodes (e.g. clones the subtree clone is root of). |
|
NcutNode custom copy constructor.
Profile and a pointer to a different Ncut . These pointers are handed down the tree to make sure every child node of this node will be independent of clone . |
|
NcutNode destructor.
Deletes the subtree this |
|
Constructs the ncut dendogram.
indices_ (either using an existing Ncut or calculating a new one). Child nodes are recursively constructed until the maximum depth is reached. If one of the child nodes needs a new Ncut , a new element profile with reduced similarity matrix (only containing the elements in the respective segment) is constructed and passed to the child node. |
|
Get the eigenvalue of the eigenvector this NcutNode uses for partitioning.
|
|
Get a pointer to the eigenvector this NcutNode uses for partitioning.
|
|
Get the number of the eigenvector that was used for partitioning.
|
|
Get the index map of the elements in this NcutNode.
|
|
Checks to which half an element is assigned in this node.
idx belongs to the left half of this node's bipartition. |
|
Get the left child NcutNode of this NcutNode.
|
|
Get the Ncut calculated by this NcutNode.
|
|
NcutNode assignment operator.
clone and all its child nodes (e.g. clones the subtree clone is root of). |
|
Get the Profile this Node uses.
|
|
Get the right child NcutNode of this NcutNode.
|
|
Get the splitting point this NcutNode uses for partitioning.
|
|
the eigenvalue corresponding to the eigenvector used to bipartition this segment |
|
the eigenvector used to bipartition this segment |
|
the number of the eigenvector that was used for bipartitioning |
|
the list of elements bipartitioned in this node and their indices |
|
the left child node represents the further bipartition of one of the two segments resulting from this bipartition |
|
the |
|
the profile used in this Node |
|
the left child node represents the further bipartition of the other of the two segments resulting from this bipartition |
|
Contains all needed parameters |
|
the threshold for bipartitioning the graph |