Volume Cartographer 2.27.0
|
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) |
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.
volcart::segmentation::IntensityMap::IntensityMap | ( | cv::Mat | r, |
int | stepSize, | ||
int | peakDistanceWeight, | ||
bool | shouldIncludeMiddle | ||
) |
stepSize | Row offset (from center) for generating intensity values |
peakDistanceWeight | Distance weight factor for maxima sorting |
shouldIncludeMiddle | Include center of selected row as maxima |
|
inline |
Return the currently selected maxima index.
Definition at line 57 of file IntensityMap.hpp.
|
inline |
Increase the maxima index by 1.
Definition at line 60 of file IntensityMap.hpp.
|
inline |
Return the peak radius.
Definition at line 63 of file IntensityMap.hpp.
|
inline |
Select a maxima from the map by index.
Definition at line 54 of file IntensityMap.hpp.
|
friend |
Definition at line 66 of file IntensityMap.hpp.
|
private |
Width of the bin to hold the image
Definition at line 93 of file IntensityMap.hpp.
|
private |
Maxima Index
Definition at line 99 of file IntensityMap.hpp.
|
private |
Height of the image returned by draw()
Definition at line 87 of file IntensityMap.hpp.
|
private |
Width of the image returned by draw()
Definition at line 84 of file IntensityMap.hpp.
|
private |
Image returned by draw()
Definition at line 90 of file IntensityMap.hpp.
|
private |
Unsorted intensity plot of selected row
Definition at line 78 of file IntensityMap.hpp.
|
private |
Width of the intensity map
Definition at line 96 of file IntensityMap.hpp.
|
private |
Distance weight factor for maxima sorting
Definition at line 75 of file IntensityMap.hpp.
|
private |
Largest distance a maxima can be away from center
Definition at line 105 of file IntensityMap.hpp.
|
private |
Input matrix
Definition at line 81 of file IntensityMap.hpp.
|
private |
Include center of selected row as maxima?
Definition at line 102 of file IntensityMap.hpp.
|
private |
How much you want to move each time you leave an element
Definition at line 72 of file IntensityMap.hpp.