DensityFlagged Class Reference

Density function with tracking of used points for growing a volumn. More...

#include <DensityFlagged.H>

Inheritance diagram for DensityFlagged:

Density List of all members.

Public Member Functions

 DensityFlagged (const size_t width, const size_t height, const size_t depth, const float minX, const float maxX, const float minY, const float maxY, const float minZ, const float maxZ)
size_t getLargest () const
 Return the index of the highest count cell. First occurance of this high value.
size_t getLargestUnflagged () const
 Return the index of the highest count cell without flag set true. First occurance of this high value.
size_t getLargestNeighbor (const size_t index) const
 Which cell next to this cell has the largest count?
size_t getLargestUnflaggedNeighbor (const size_t index) const
 Which cell next to this cell has the largest count? Ignore those that have been flagged.
bool isFlagged (size_t i) const
 flagged means a vell has been used false if not flagged or true if flagged
void setFlag (size_t i, bool v=true)
size_t getNumFlagged () const
 How many cells flagged?
size_t getFlaggedCount () const
 Return the number of counts in all the flagged cells. FIX: slow! Same as used count.
size_t getNumUsed () const
 How many elements in the blob?
size_t getUsedIndex (const size_t i) const
 Get the nth cell of the blob.
size_t getLargestNeighborOfFlagged () const
 Scan through used and look for the largest unflagged point.
void buildBlob (const float percent)
 Grow a blob until we reach percent of total counts Puts used cells in the used private vector. This will stop if it runs out of connected cells.
void printBlob () const
 dump a description of the blob to stdout

Private Attributes

std::vector< bool > flags
std::vector< size_t > used

Detailed Description

Density function with tracking of used points for growing a volumn.

Take the standard density class and allow growing of a connected usage surface. Uses largest neighbor traversal. This should be SLOW


Constructor & Destructor Documentation

DensityFlagged::DensityFlagged const size_t  width,
const size_t  height,
const size_t  depth,
const float  minX,
const float  maxX,
const float  minY,
const float  maxY,
const float  minZ,
const float  maxZ
 


Member Function Documentation

void DensityFlagged::buildBlob const float  percent  ) 
 

Grow a blob until we reach percent of total counts Puts used cells in the used private vector. This will stop if it runs out of connected cells.

size_t DensityFlagged::getFlaggedCount  )  const
 

Return the number of counts in all the flagged cells. FIX: slow! Same as used count.

size_t DensityFlagged::getLargest  )  const
 

Return the index of the highest count cell. First occurance of this high value.

size_t DensityFlagged::getLargestNeighbor const size_t  index  )  const
 

Which cell next to this cell has the largest count?

Parameters:
index Cell number to look around
Returns:
cell index of largest or Density::badValue if nothing possible. Picks lowest index if there are duplicates

size_t DensityFlagged::getLargestNeighborOfFlagged  )  const
 

Scan through used and look for the largest unflagged point.

size_t DensityFlagged::getLargestUnflagged  )  const
 

Return the index of the highest count cell without flag set true. First occurance of this high value.

size_t DensityFlagged::getLargestUnflaggedNeighbor const size_t  index  )  const
 

Which cell next to this cell has the largest count? Ignore those that have been flagged.

Parameters:
index Cell number to look around
Returns:
cell index of largest or Density::badValue if nothing possible. Picks lowest index if there are duplicates

size_t DensityFlagged::getNumFlagged  )  const
 

How many cells flagged?

size_t DensityFlagged::getNumUsed  )  const [inline]
 

How many elements in the blob?

size_t DensityFlagged::getUsedIndex const size_t  i  )  const [inline]
 

Get the nth cell of the blob.

bool DensityFlagged::isFlagged size_t  i  )  const [inline]
 

flagged means a vell has been used false if not flagged or true if flagged

void DensityFlagged::printBlob  )  const
 

dump a description of the blob to stdout

void DensityFlagged::setFlag size_t  i,
bool  v = true
[inline]
 


Member Data Documentation

std::vector<bool> DensityFlagged::flags [private]
 

std::vector<size_t> DensityFlagged::used [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Mar 2 17:55:26 2006 for density by  doxygen 1.4.6