69 ResizeOp(
size_t width=0,
size_t height=0,
const std::string & interpolation =
"n") :
ImageOp(__FUNCTION__,
"Resize geometry and scale intensities") {
70 this->parameters.link(
"width", this->width=width,
"pix");
71 this->parameters.link(
"height", this->height=height,
"pix");
72 this->parameters.link(
"interpolation", this->interpolation=interpolation,
"n=nearest,b=bilinear");
73 this->parameters.link(
"scale", this->scale = 1.0,
"rescaling factor");
77 void setWidth(
size_t w){
82 void setHeight(
size_t h){
88 this->width = area.getWidth();
89 this->height = area.getHeight();
93 void setScale(
double s){
104 this->scale =
static_cast<double>(d) /
static_cast<double>(n);
110 std::string interpolation;
138 mout.
note(
"delegating to: 2 x traverseChannel(2)" );
146 double getRounds(
double value,
int & cFloor,
int & cCeil)
const {
147 double f = floor(value);
148 cFloor =
static_cast<int>(f);
149 cCeil =
static_cast<int>(ceil(value));
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:312
Logger & note(const TT &... args)
For top-level information.
Definition Log.h:489
Image with static geometry.
Definition ImageChannel.h:60
Struct for image (excluding data)
Definition ImageConf.h:333
virtual int srcAlpha() const
Tell if alpha channel(s) is required in input.
Definition ImageMod.h:66
Base class for image processing functions.
Definition ImageOp.h:49
void traverseChannelsEqually(const ImageTray< const Channel > &src, ImageTray< Channel > &dst) const
Calls processWithTemp() if the frames overlap.
Definition ImageOp.cpp:414
Container applicable for Channels and Images, with alpha support.
Definition ImageTray.h:267
Resizes the image, stretching the image correspondingly.
Definition ResizeOp.h:65
virtual void getDstConf(const ImageConf &srcConf, ImageConf &dstConf) const
Given source image, determine respective dest image configuration.
Definition ResizeOp.cpp:38
void setScale(int d, int n)
Sets scale to fraction d/n.
Definition ResizeOp.h:103
virtual void traverseChannel(const Channel &src, Channel &dst) const
The main functionality called by traverseFrame() after image compatibility check and tmp allocations.
Definition ResizeOp.cpp:55
virtual void traverseChannel(const Channel &src, const Channel &srcAlpha, Channel &dst, Channel &dstAlpha) const
The main functionality called by traverseFrame() after image compatibility check and tmp allocations.
Definition ResizeOp.h:136
Definition DataSelector.cpp:1277