31#ifndef SLIDINGWINDOWOP13_H_
32#define SLIDINGWINDOWOP13_H_
34#include "drain/image/SlidingWindow.h"
85 Logger mout(getImgLog(), __FILE__, __FUNCTION__);
87 mout.
debug(
"unweighted version");
89 typename W::unweighted window(this->conf);
91 window.setSrcFrame(src);
92 window.setDstFrame(dst);
116 Logger mout(getImgLog(), __FILE__, __FUNCTION__);
118 mout.
debug(
"weighted version" );
119 if (srcWeight.isEmpty()){
120 mout.
error(
"weight image empty" );
123 W window(this->conf);
124 window.setSrcFrame(src);
125 window.setSrcFrameWeight(srcWeight);
126 window.setDstFrame(dst);
127 window.setDstFrameWeight(dstWeight);
129 mout.debug3(window );
138 Logger mout(getImgLog(), __FILE__, __FUNCTION__);
140 mout.debug(
"start" );
142 if (!src.hasAlpha() || !dst.hasAlpha()){
143 mout.info(
"unweighted window" );
144 typename W::unweighted window(this->conf);
145 window.setSrcFrames(src);
146 window.setDstFrames(dst);
147 mout.debug3(window );
151 mout.info(
"weighted window" );
152 W window(this->conf);
153 window.setSrcFrames(src);
154 window.setDstFrames(dst);
155 mout.debug3(window );
164 SlidingWindowOp(
const std::string &name = __FUNCTION__,
const std::string &description =
"") : WindowOp<W>(name, description){
168 const std::string &
getName()
const override {
180 static const std::string & str(){
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:312
Logger & debug(const TT &... args)
Debug information.
Definition Log.h:666
Logger & error(const TT &... args)
Echoes.
Definition Log.h:416
Logger & debug2(const TT &... args)
Debug information.
Definition Log.h:676
Definition StringBuilder.h:58
Image with static geometry.
Definition ImageChannel.h:60
void traverseChannelsSeparately(const ImageTray< const Channel > &src, ImageTray< Channel > &dst) const
Process each (src,dst) channel pair independently. Raise error if their counts differ.
Definition ImageOp.cpp:340
Container applicable for Channels and Images, with alpha support.
Definition ImageTray.h:267
Template for operators applying pipeline-like sliding window.
Definition SlidingWindowOp.h:59
virtual const std::string & getName() const override
Return the name of an instance.
Definition SlidingWindowOp.h:168
virtual void traverseChannel(const Channel &src, const Channel &srcWeight, Channel &dst, Channel &dstWeight) const
Apply to single channel with alpha.
Definition SlidingWindowOp.h:112
virtual void traverseChannel(const Channel &src, Channel &dst) const
Apply to single channel.
Definition SlidingWindowOp.h:82
Definition DataSelector.cpp:1277
static const std::string name
Default implementation: name returned by std::type_info::name()
Definition Type.h:558