32 #define IMAGELIKE_H_ "ImageLike 1.1, 2020/02 Markus.Peura@fmi.fi"
43 #include "ImageConf.h"
70 std::cerr << __FILE__ << __FUNCTION__ <<
" setConf/Geom has no effect\n";
71 conf.setConf(image.conf);
105 bool typeIsSet()
const {
106 return conf.
caster.typeIsSet();
111 const Geometry & getGeometry()
const {
117 size_t getWidth()
const {
118 return conf.getWidth();
122 size_t getHeight()
const {
123 return conf.getHeight();
127 size_t getArea()
const {
128 return conf.getArea();
132 size_t getChannelCount()
const {
138 const size_t getImageChannelCount()
const {
139 return conf.getImageChannelCount();
144 const size_t getAlphaChannelCount()
const {
145 return conf.getAlphaChannelCount();
150 bool hasAlphaChannel()
const {
151 return conf.hasAlphaChannel();
156 size_t getVolume()
const {
157 return conf.getVolume();
161 bool isEmpty()
const {
162 return conf.isEmpty();
180 void setCoordinatePolicy(
const T & policy){
186 void setCoordinatePolicy(EdgePolicy::index_t xUnderFlowPolicy, EdgePolicy::index_t yUnderFlowPolicy, EdgePolicy::index_t xOverFlowPolicy, EdgePolicy::index_t yOverFlowPolicy){
187 conf.
coordinatePolicy.set(xUnderFlowPolicy, yUnderFlowPolicy, xOverFlowPolicy, yOverFlowPolicy);
210 void setScaling(
double scale,
double offset){
219 return drain::Type::call<drain::typeLimiter<T> >(conf.
caster.
getType());
const std::type_info & getType() const
Returns type_info of the current type.
Definition: Caster.h:144
Linear scaling and physical range for image intensities.
Definition: ValueScaling.h:64
virtual const ValueScaling & getScaling() const
Get linear scaling.
Definition: ValueScaling.h:147
virtual void setScaling(double scale, double offset)
Set linear scaling.
Definition: ValueScaling.h:136
Policies for coordinate underflows and overflows.
Definition: CoordinatePolicy.h:106
Caster caster
In base class(es), mainly for storing storage type. In derived classes, also for value conversions.
Definition: ImageConf.h:97
Definition: Geometry.h:145
size_t getChannelCount() const
Set...
Definition: Geometry.h:257
CoordinatePolicy coordinatePolicy
Rules to handle under- and overflows of horizontal and vertical coordinates.
Definition: ImageConf.h:383
A base class for images.
Definition: ImageLike.h:61
const std::type_info & getType() const
Get the storage type.
Definition: ImageLike.h:100
CoordinatePolicy & getCoordinatePolicy()
Coord policy.
Definition: ImageLike.h:173
const CoordinatePolicy & getCoordinatePolicy() const
Coord policy.
Definition: ImageLike.h:167
Class for ensuring that variable of type D remains within limits of type S.
Definition: TypeUtils.h:653
Definition: DataSelector.cpp:1277