7 #include "ColorConstants.h" 8 #include "ColorFilterSettings.h" 9 #include "ColorFilterSettingsStrategyIntensity.h" 10 #include <QTextStream> 16 ColorFilterSettingsStrategyIntensity::~ColorFilterSettingsStrategyIntensity ()
22 return (
double) (colorFilterSettings.
intensityHigh () - INTENSITY_MIN) /
23 (
double) (INTENSITY_MAX - INTENSITY_MIN);
28 return (
double) (colorFilterSettings.
intensityLow () - INTENSITY_MIN) /
29 (
double) (INTENSITY_MAX - INTENSITY_MIN);
34 QTextStream &str)
const 36 str << indentation <<
"intensityLow=" << colorFilterSettings.
intensityLow () <<
"\n";
37 str << indentation <<
"intensityHigh=" << colorFilterSettings.
intensityHigh () <<
"\n";
43 colorFilterSettings.
setIntensityHigh (INTENSITY_MIN + s0To1 * (INTENSITY_MAX - INTENSITY_MIN));
49 colorFilterSettings.
setIntensityLow (INTENSITY_MIN + s0To1 * (INTENSITY_MAX - INTENSITY_MIN));
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
virtual double low(const ColorFilterSettings &colorFilterSettings) const
Return the low value normalized to 0 to 1.
virtual void setHigh(ColorFilterSettings &colorFilterSettings, double s0To1)
Set the high value given the normalized value.
virtual void setLow(ColorFilterSettings &colorFilterSettings, double s0To1)
Set the low value given the normalized value.
ColorFilterSettingsStrategyIntensity()
Single constructor.
int intensityHigh() const
Get method for intensity higher bound.
void setIntensityHigh(int intensityHigh)
Set method for intensity higher bound.
int intensityLow() const
Get method for intensity lower bound.
virtual double high(const ColorFilterSettings &colorFilterSettings) const
Return the high value normalized to 0 to 1.
void setIntensityLow(int intensityLow)
Set method for intensity lower bound.
virtual void printStream(const ColorFilterSettings &colorFilterSettings, QString indentation, QTextStream &str) const
Print the low and high values.