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

Processor: Median filter a single channel image. More...

#include <IPMedianFilter.h>

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

List of all members.

Public Member Functions

 IPMedianFilter (unsigned int _median_filter_width=3)
 The constructor.
virtual ImageBase_shptr run (ImageBase_shptr _in)
 Start processing.

Private Attributes

unsigned int median_filter_width

Detailed Description

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

Processor: Median filter a single channel image.

Definition at line 36 of file IPMedianFilter.h.


Constructor & Destructor Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
degate::IPMedianFilter< ImageTypeIn, ImageTypeOut >::IPMedianFilter ( unsigned int  _median_filter_width = 3) [inline]

The constructor.

Definition at line 48 of file IPMedianFilter.h.

                                                          :
      ImageProcessorBase("IPNormalize",
                         "Normalize an image.",
                         false,
                         typeid(typename ImageTypeIn::pixel_type),
                         typeid(typename ImageTypeOut::pixel_type)),
      median_filter_width(_median_filter_width) { }

Member Function Documentation

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

Start processing.

Implements degate::ImageProcessorBase.

Definition at line 57 of file IPMedianFilter.h.

References degate::IPMedianFilter< ImageTypeIn, ImageTypeOut >::median_filter_width.

                                                     {

      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);

      median_filter<ImageTypeOut, ImageTypeIn>(img_out, img_in, median_filter_width);

      return img_out;
    }

Member Data Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
unsigned int degate::IPMedianFilter< ImageTypeIn, ImageTypeOut >::median_filter_width [private]

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