libidx
ebl::padder< T > Class Template Reference

A class that adds padding around an input to be convolved by a filter. More...

#include <padder.h>

List of all members.

Public Member Functions

 padder (const idxdim &kerdims, bool mirror=true)
virtual idx< T > pad (idx< T > &in)
virtual void pad (idx< T > &in, idx< T > &out)

Protected Member Functions

virtual void mirror (idx< T > &in, idx< T > &padded)
 Fills padded areas in 'padded' with mirrors of 'in'.

Protected Attributes

int nrow
int ncol
int nrow2
int ncol2
bool bmirror

Detailed Description

template<typename T>
class ebl::padder< T >

A class that adds padding around an input to be convolved by a filter.


Constructor & Destructor Documentation

template<typename T >
ebl::padder< T >::padder ( const idxdim kerdims,
bool  mirror = true 
)

Create a padder given kernel size 'kerdims'.

Parameters:
mirrorIf true, mirror input into padding.

Member Function Documentation

template<typename T >
idx< T > ebl::padder< T >::pad ( idx< T > &  in) [virtual]

This method allocates an idx with zero pads accomodating the kernel, copies 'in' to the center and returns the idx.

template<typename T >
void ebl::padder< T >::pad ( idx< T > &  in,
idx< T > &  out 
) [virtual]

This method resizes idx 'out' if necessary with extra zero pads accomodating the kernel, copies 'in' to the center and returns the idx.


The documentation for this class was generated from the following files: