|
degate 0.1.1
|
Processor: Create a binary image from a single channel image. More...
#include <IPThresholding.h>

Public Member Functions | |
| IPThresholding (double _threshold=0.5) | |
| The constructor. | |
| virtual | ~IPThresholding () |
| The destructor. | |
| virtual ImageBase_shptr | run (ImageBase_shptr _in) |
| Start processing. | |
Private Attributes | |
| double | threshold |
Processor: Create a binary image from a single channel image.
Definition at line 36 of file IPThresholding.h.
| degate::IPThresholding< ImageTypeIn, ImageTypeOut >::IPThresholding | ( | double | _threshold = 0.5 | ) | [inline] |
The constructor.
Definition at line 47 of file IPThresholding.h.
:
ImageProcessorBase("IPThresholding",
"Binarize an image.",
false,
typeid(typename ImageTypeIn::pixel_type),
typeid(typename ImageTypeOut::pixel_type)),
threshold(_threshold) { }
| virtual degate::IPThresholding< ImageTypeIn, ImageTypeOut >::~IPThresholding | ( | ) | [inline, virtual] |
| virtual ImageBase_shptr degate::IPThresholding< ImageTypeIn, ImageTypeOut >::run | ( | ImageBase_shptr | _in | ) | [inline, virtual] |
Start processing.
Implements degate::ImageProcessorBase.
Definition at line 62 of file IPThresholding.h.
References degate::IPThresholding< ImageTypeIn, ImageTypeOut >::threshold.
{
assert(_in != NULL);
std::tr1::shared_ptr<ImageTypeIn> img_in =
std::tr1::dynamic_pointer_cast<ImageTypeIn>(_in);
std::tr1::shared_ptr<ImageTypeOut>
img_out(new ImageTypeOut(_in->get_width(), _in->get_height()));
assert(img_in != NULL);
assert(img_out != NULL);
thresholding_image<ImageTypeOut, ImageTypeIn>(img_out, img_in, threshold);
return img_out;
}
double degate::IPThresholding< ImageTypeIn, ImageTypeOut >::threshold [private] |
Definition at line 39 of file IPThresholding.h.
Referenced by degate::IPThresholding< ImageTypeIn, ImageTypeOut >::run().
1.7.4