26 #ifndef __Rescale_hh__
27 #define __Rescale_hh__
29 #include "FilterBase.hh"
30 #include "FilterNToN.hh"
32 #include "Binomial.hh"
35 #define D_RESCALE_INIT 0x00000001
36 #define D_RESCALE_WRITE_IMG 0x00000002
70 template <
class InputStorageType,
class OutputStorageType>
104 const unsigned newwidth,
const unsigned newheight);
298 const unsigned newwidth,
const unsigned newheight);
312 const unsigned newwidth,
const unsigned newheight);
335 const double& valmin = 0.0,
336 const double& valmax = 255.0);
348 const double& valmin = 0.0,
349 const double& valmax = 255.0);
353 void UpdateLowpass(
double factor);
361 inline void SetFactor(
double factor) { _RescaleFactor=factor; }
363 inline double GetFactor()
const {
return _RescaleFactor; }
369 void SetLowPassType(
int lpt);
414 virtual void GetBordersValid_(
int &border_x,
int &border_y)
const;
445 #ifdef BUILD_IMAGE_USHORT
469 #endif //BUILD_IMAGE_USHORT
478 #endif // __Rescale_hh__
int _FillInterpolatedGrey(const Image< OutputStorageType > &src, Image< OutputStorageType > &dst)
Assumes dst is initialized and ROI is set.
int DownsampleBy4Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
Assumes that destination is initialized.
virtual parent class for API definition of all (future) filters
Down-, Upsampling routines and Resize.
double _LastPositionOffset
see DownsampleBy2 for explanation
int DownsampleBy2Grey(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
assumes that destination is initialized.
double _RescaleMeanSigmaFactor
int DownsampleBy2Color(const Image< InputStorageType > &src, Image< OutputStorageType > &dst)
assumes that destination is initialized.
base class for simple n->n filter implementations
FilterNToN< InputStorageType, OutputStorageType > * _lowpass
double GetPositionOffset() const
see DownsampleBy2 for explanation
FilterNToN< InputStorageType, OutputStorageType > * GetLowpass()
int _FillInterpolatedColor(const Image< OutputStorageType > &src, Image< OutputStorageType > &dst)
Same as _FillInterpolatedGrey but for multi channel interleaved images.
void SetFactor(double factor)
the downsampling factor