3 #include "opals/config.hpp"
4 #include "opals/Vector.hpp"
27 bool isAutoScale()
const {
return type == TypeScalePal::autoScale; };
28 bool isScaleByFactor()
const {
return type == TypeScalePal::scaleByFactor; };
29 bool isScaleByRange()
const {
return type >= TypeScalePal::scaleByRange && type <= TypeScalePal::scaleByRelRangeClip; };
31 bool isRelativeRange()
const {
return type == TypeScalePal::scaleByRelRange || type == TypeScalePal::scaleByRelRangeClip; };
32 bool withClipping()
const {
return type == TypeScalePal::scaleByRangeClip || type == TypeScalePal::scaleByRelRangeClip; };
34 TypeScalePal::Type getType()
const {
return type; }
37 void setScaleFactor(
const double& scalefac,
const double& offset=0 );
38 void setScaleRange(
const double& rangemin,
const double& rangemax,
bool relativeValues,
bool withClipping );
41 double getScaleFactor()
const {
return isScaleByFactor() ?
scale[0] : 0.; };
42 double getOffset()
const {
return isScaleByFactor() &&
scale.size() > 1 ?
scale[1] : 0.; };
43 double getScaleMin()
const {
return *
scale.begin(); };
44 double getScaleMax()
const {
return *
scale.rbegin(); };
48 TypeScalePal::Type type;
@ scale
scanner range scale (opalsStripAdjust)
scaling of palette nodes
Definition: ScalePal.hpp:16
@ scaleByRelRangeClip
scaling relative range with clipping
Definition: ScalePal.hpp:23
@ scaleByRelRange
scaling relative range
Definition: ScalePal.hpp:21
Type
Definition: ScalePal.hpp:17
Contains the public interface of OPALS.
Definition: AbsValueOrQuantile.hpp:8
Class describing different scaling methods for palette entries.
Definition: ScalePal.hpp:9
@ scaleByFactor
single scaling factor
Definition: ScalePal.hpp:19
@ scaleByRangeClip
scaling range with clipping
Definition: ScalePal.hpp:22
@ scaleByRange
scaling range
Definition: ScalePal.hpp:20