|
degate 0.1.1
|
Represents an image processing pipe for multiple image processors. More...
#include <IPPipe.h>

Public Member Functions | |
| IPPipe () | |
| The constructor for a processing pipe. | |
| virtual | ~IPPipe () |
| The destructor for a plugin. | |
| void | add (std::tr1::shared_ptr< ImageProcessorBase > processor) |
| Add a processor. | |
| bool | is_empty () const |
| Check if the pipe is empty. | |
| size_t | size () const |
| Get the number of processing elements in the pipe. | |
| ImageBase_shptr | run (ImageBase_shptr img_in) |
| Start processing. | |
Private Types | |
| typedef std::list < std::tr1::shared_ptr < ImageProcessorBase > > | processor_list_type |
Private Attributes | |
| processor_list_type | processor_list |
Represents an image processing pipe for multiple image processors.
typedef std::list<std::tr1::shared_ptr<ImageProcessorBase> > degate::IPPipe::processor_list_type [private] |
| degate::IPPipe::IPPipe | ( | ) | [inline] |
| virtual degate::IPPipe::~IPPipe | ( | ) | [inline, virtual] |
| void degate::IPPipe::add | ( | std::tr1::shared_ptr< ImageProcessorBase > | processor | ) | [inline] |
Add a processor.
Definition at line 63 of file IPPipe.h.
References processor_list.
Referenced by degate::EdgeDetection::setup_pipe().
{
processor_list.push_back(processor);
}

| bool degate::IPPipe::is_empty | ( | ) | const [inline] |
Check if the pipe is empty.
Definition at line 72 of file IPPipe.h.
References processor_list.
{
return processor_list.empty();
}
| ImageBase_shptr degate::IPPipe::run | ( | ImageBase_shptr | img_in | ) | [inline] |
Start processing.
Definition at line 91 of file IPPipe.h.
References processor_list.
Referenced by degate::EdgeDetection::run_edge_detection().
{
assert(img_in != NULL);
ImageBase_shptr last_img = img_in;
// iterate over list
for(processor_list_type::iterator iter = processor_list.begin();
iter != processor_list.end(); ++iter) {
ImageProcessorBase_shptr ip = *iter;
assert(last_img != NULL);
last_img = ip->run(last_img);
assert(last_img != NULL);
}
return last_img;
}

| size_t degate::IPPipe::size | ( | ) | const [inline] |
Get the number of processing elements in the pipe.
Definition at line 81 of file IPPipe.h.
References processor_list.
{
return processor_list.size();
}
1.7.4