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

Processor: Normalize a single channel image. More...

#include <IPNormalize.h>

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

List of all members.

Public Member Functions

 IPNormalize (double _lower_bound=0, double _upper_bound=1)
 The constructor.
virtual ~IPNormalize ()
 The destructor.
virtual ImageBase_shptr run (ImageBase_shptr _in)
 Start processing.

Private Attributes

double lower_bound
double upper_bound

Detailed Description

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

Processor: Normalize a single channel image.

Definition at line 36 of file IPNormalize.h.


Constructor & Destructor Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
degate::IPNormalize< ImageTypeIn, ImageTypeOut >::IPNormalize ( double  _lower_bound = 0,
double  _upper_bound = 1 
) [inline]

The constructor.

Definition at line 48 of file IPNormalize.h.

                                                                  :
      ImageProcessorBase("IPNormalize",
                         "Normalize an image.",
                         false,
                         typeid(typename ImageTypeIn::pixel_type),
                         typeid(typename ImageTypeOut::pixel_type)),
      lower_bound(_lower_bound),
      upper_bound(_upper_bound) { }
template<typename ImageTypeIn , typename ImageTypeOut >
virtual degate::IPNormalize< ImageTypeIn, ImageTypeOut >::~IPNormalize ( ) [inline, virtual]

The destructor.

Definition at line 61 of file IPNormalize.h.

{}

Member Function Documentation

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

Start processing.

Implements degate::ImageProcessorBase.

Definition at line 64 of file IPNormalize.h.

References degate::IPNormalize< ImageTypeIn, ImageTypeOut >::lower_bound, and degate::IPNormalize< ImageTypeIn, ImageTypeOut >::upper_bound.

                                                     {

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

      normalize<ImageTypeOut, ImageTypeIn>(img_out, img_in, lower_bound, upper_bound);

      return img_out;
    }

Member Data Documentation

template<typename ImageTypeIn , typename ImageTypeOut >
double degate::IPNormalize< ImageTypeIn, ImageTypeOut >::lower_bound [private]

Definition at line 39 of file IPNormalize.h.

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

template<typename ImageTypeIn , typename ImageTypeOut >
double degate::IPNormalize< ImageTypeIn, ImageTypeOut >::upper_bound [private]

Definition at line 40 of file IPNormalize.h.

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


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