Volume Cartographer 2.27.0
Public Member Functions | Private Attributes | Friends | List of all members
volcart::segmentation::IntensityMap Class Reference

A class representing the intensity map generated from a row of a matrix, normalized to the range [0, 1]. More...

#include <vc/segmentation/lrps/IntensityMap.hpp>

Public Member Functions

cv::Mat draw ()
 Generate a rastered intensity map for debug.
 
std::deque< std::pair< int, double > > sortedMaxima ()
 Return the row's maxima, sorted by intensity and weighted by distance from the center of the row.
 
void setChosenMaximaIndex (int index)
 Select a maxima from the map by index. More...
 
int chosenMaximaIndex () const
 Return the currently selected maxima index. More...
 
void incrementMaximaIndex ()
 Increase the maxima index by 1. More...
 
int peakRadius () const
 Return the peak radius. More...
 
Constructors
 IntensityMap (cv::Mat r, int stepSize, int peakDistanceWeight, bool shouldIncludeMiddle)
 

Private Attributes

int stepSize_
 
int peakDistanceWeight_
 
cv::Mat_< double > intensities_
 
cv::Mat_< std::uint8_t > resliceData_
 
int displayWidth_
 
int displayHeight_
 
cv::Mat drawTarget_
 
int binWidth_
 
int mapWidth_
 
int chosenMaximaIndex_
 
bool shouldIncludeMiddle_
 
const int peakRadius_ = 5
 

Friends

std::ostream & operator<< (std::ostream &s, const IntensityMap &m)
 

Detailed Description

A class representing the intensity map generated from a row of a matrix, normalized to the range [0, 1].

Attempts to classify and sort maxima relative to the horizontal center of the matrix.

Definition at line 25 of file IntensityMap.hpp.

Constructor & Destructor Documentation

◆ IntensityMap()

volcart::segmentation::IntensityMap::IntensityMap ( cv::Mat  r,
int  stepSize,
int  peakDistanceWeight,
bool  shouldIncludeMiddle 
)
Parameters
stepSizeRow offset (from center) for generating intensity values
peakDistanceWeightDistance weight factor for maxima sorting
shouldIncludeMiddleInclude center of selected row as maxima

Member Function Documentation

◆ chosenMaximaIndex()

int volcart::segmentation::IntensityMap::chosenMaximaIndex ( ) const
inline

Return the currently selected maxima index.

Definition at line 57 of file IntensityMap.hpp.

◆ incrementMaximaIndex()

void volcart::segmentation::IntensityMap::incrementMaximaIndex ( )
inline

Increase the maxima index by 1.

Definition at line 60 of file IntensityMap.hpp.

◆ peakRadius()

int volcart::segmentation::IntensityMap::peakRadius ( ) const
inline

Return the peak radius.

Definition at line 63 of file IntensityMap.hpp.

◆ setChosenMaximaIndex()

void volcart::segmentation::IntensityMap::setChosenMaximaIndex ( int  index)
inline

Select a maxima from the map by index.

Definition at line 54 of file IntensityMap.hpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  s,
const IntensityMap m 
)
friend

Definition at line 66 of file IntensityMap.hpp.

Member Data Documentation

◆ binWidth_

int volcart::segmentation::IntensityMap::binWidth_
private

Width of the bin to hold the image

Definition at line 93 of file IntensityMap.hpp.

◆ chosenMaximaIndex_

int volcart::segmentation::IntensityMap::chosenMaximaIndex_
private

Maxima Index

Definition at line 99 of file IntensityMap.hpp.

◆ displayHeight_

int volcart::segmentation::IntensityMap::displayHeight_
private

Height of the image returned by draw()

Definition at line 87 of file IntensityMap.hpp.

◆ displayWidth_

int volcart::segmentation::IntensityMap::displayWidth_
private

Width of the image returned by draw()

Definition at line 84 of file IntensityMap.hpp.

◆ drawTarget_

cv::Mat volcart::segmentation::IntensityMap::drawTarget_
private

Image returned by draw()

Definition at line 90 of file IntensityMap.hpp.

◆ intensities_

cv::Mat_<double> volcart::segmentation::IntensityMap::intensities_
private

Unsorted intensity plot of selected row

Definition at line 78 of file IntensityMap.hpp.

◆ mapWidth_

int volcart::segmentation::IntensityMap::mapWidth_
private

Width of the intensity map

Definition at line 96 of file IntensityMap.hpp.

◆ peakDistanceWeight_

int volcart::segmentation::IntensityMap::peakDistanceWeight_
private

Distance weight factor for maxima sorting

Definition at line 75 of file IntensityMap.hpp.

◆ peakRadius_

const int volcart::segmentation::IntensityMap::peakRadius_ = 5
private

Largest distance a maxima can be away from center

Definition at line 105 of file IntensityMap.hpp.

◆ resliceData_

cv::Mat_<std::uint8_t> volcart::segmentation::IntensityMap::resliceData_
private

Input matrix

Definition at line 81 of file IntensityMap.hpp.

◆ shouldIncludeMiddle_

bool volcart::segmentation::IntensityMap::shouldIncludeMiddle_
private

Include center of selected row as maxima?

Definition at line 102 of file IntensityMap.hpp.

◆ stepSize_

int volcart::segmentation::IntensityMap::stepSize_
private

How much you want to move each time you leave an element

Definition at line 72 of file IntensityMap.hpp.


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