degate  0.1.2
Public Member Functions | Private Attributes
degate::IPConvolve< ImageTypeIn, ImageTypeOut > Class Template Reference

Processor: Convolve an image. More...

#include <IPConvolve.h>

Inheritance diagram for degate::IPConvolve< ImageTypeIn, ImageTypeOut >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IPConvolve (FilterKernel_shptr _kernel)
 The constructor.
virtual ~IPConvolve ()
 The destructor.
virtual ImageBase_shptr run (ImageBase_shptr _in)
 Start processing.

Private Attributes

FilterKernel_shptr kernel

Detailed Description

template<typename ImageTypeIn, typename ImageTypeOut>
class degate::IPConvolve< ImageTypeIn, ImageTypeOut >

Processor: Convolve an image.

Definition at line 36 of file IPConvolve.h.


Constructor & Destructor Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
degate::IPConvolve< ImageTypeIn, ImageTypeOut >::IPConvolve ( FilterKernel_shptr  _kernel) [inline]

The constructor.

Definition at line 47 of file IPConvolve.h.

                                           :
      ImageProcessorBase("IPConvolve",
                         "Convolve an image.",
                         false,
                         typeid(typename ImageTypeIn::pixel_type),
                         typeid(typename ImageTypeOut::pixel_type)),
        kernel(_kernel) { }
template<typename ImageTypeIn , typename ImageTypeOut >
virtual degate::IPConvolve< ImageTypeIn, ImageTypeOut >::~IPConvolve ( ) [inline, virtual]

The destructor.

Definition at line 59 of file IPConvolve.h.

{}

Member Function Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
virtual ImageBase_shptr degate::IPConvolve< ImageTypeIn, ImageTypeOut >::run ( ImageBase_shptr  _in) [inline, virtual]

Start processing.

Implements degate::ImageProcessorBase.

Definition at line 62 of file IPConvolve.h.

References degate::IPConvolve< ImageTypeIn, ImageTypeOut >::kernel.

                                                     {

      assert(_in != NULL);

      std::shared_ptr<ImageTypeIn> img_in =
        std::dynamic_pointer_cast<ImageTypeIn>(_in);

      std::shared_ptr<ImageTypeOut>
        img_out(new ImageTypeOut(_in->get_width(), _in->get_height()));

      assert(img_in != NULL);
      assert(img_out != NULL);

      convolve<ImageTypeOut, ImageTypeIn>(img_out, img_in, kernel);

      return img_out;
    }

Member Data Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
FilterKernel_shptr degate::IPConvolve< ImageTypeIn, ImageTypeOut >::kernel [private]

Definition at line 39 of file IPConvolve.h.

Referenced by degate::IPConvolve< ImageTypeIn, ImageTypeOut >::run().


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