Class Threshold

Class Documentation

class Threshold

A Threshold is used to pass a threshold value to detection algorithms

The threshold may be a simple value (type == VALUE), or in units of the image standard deviation. Alternatively you may specify that you’ll provide the standard deviation (type == STDEV) or variance (type == VARIANCE)

Note that the constructor is not declared explicit, so you may pass a bare threshold, and it’ll be interpreted as a VALUE.

Public Types

enum ThresholdType

Types of threshold:

Values:

VALUE

Use pixel value.

BITMASK

Use (pixels & (given mask))

STDEV

Use number of sigma given s.d.

VARIANCE

Use number of sigma given variance.

PIXEL_STDEV

Use number of sigma given per-pixel s.d.

Public Functions

Threshold(double const value, ThresholdType const type = VALUE, bool const polarity = true, double const includeMultiplier = 1.0)

Parameters
  • value: desired threshold value

  • type: interpretation of type

  • polarity: search pixel above threshold? (useful for -ve thresholds)

  • includeMultiplier: threshold multiplier for inclusion in FootprintSet

Threshold constructor

~Threshold()
Threshold(Threshold const&)
Threshold(Threshold&&)
Threshold &operator=(Threshold const&)
Threshold &operator=(Threshold&&)
ThresholdType getType() const

return type of threshold

double getValue(const double param = -1) const

return value of threshold, to be interpreted via type

Return

value of threshold

Parameters
  • param: value of variance/stdev if needed

template<typename ImageT>
double getValue(ImageT const &image) const

return value of threshold by interrogating the image, if required

Return

value of threshold

Parameters
  • image: Image to interrogate, if threshold type demands

bool getPolarity() const

return Threshold’s polarity

void setPolarity(bool const polarity)

set Threshold’s polarity

Parameters
  • polarity: desired polarity

double getIncludeMultiplier() const

return includeMultiplier

void setIncludeMultiplier(double const includeMultiplier)

set includeMultiplier

Parameters
  • includeMultiplier: desired multiplier

Public Static Functions

static ThresholdType parseTypeString(std::string const &typeStr)
static std::string getTypeString(ThresholdType const &type)