degate  0.1.2
Public Member Functions | Private Types | Private Attributes
degate::IPPipe Class Reference

Represents an image processing pipe for multiple image processors. More...

#include <IPPipe.h>

Inheritance diagram for degate::IPPipe:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IPPipe ()
 The constructor for a processing pipe.
virtual ~IPPipe ()
 The destructor for a plugin.
void add (std::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::shared_ptr
< ImageProcessorBase > > 
processor_list_type

Private Attributes

processor_list_type processor_list

Detailed Description

Represents an image processing pipe for multiple image processors.

Definition at line 36 of file IPPipe.h.


Member Typedef Documentation

typedef std::list<std::shared_ptr<ImageProcessorBase> > degate::IPPipe::processor_list_type [private]

Definition at line 40 of file IPPipe.h.


Constructor & Destructor Documentation

degate::IPPipe::IPPipe ( ) [inline]

The constructor for a processing pipe.

Definition at line 49 of file IPPipe.h.

             {
    }
virtual degate::IPPipe::~IPPipe ( ) [inline, virtual]

The destructor for a plugin.

Definition at line 56 of file IPPipe.h.

{}

Member Function Documentation

void degate::IPPipe::add ( std::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);
    }

Here is the caller graph for this function:

bool degate::IPPipe::is_empty ( ) const [inline]

Check if the pipe is empty.

See also:
size()

Definition at line 72 of file IPPipe.h.

References processor_list.

                          {
      return processor_list.empty();
    }

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

Here is the caller graph for this function:

size_t degate::IPPipe::size ( ) const [inline]

Get the number of processing elements in the pipe.

See also:
empty()

Definition at line 81 of file IPPipe.h.

References processor_list.

                        {
      return processor_list.size();
    }

Member Data Documentation

Definition at line 41 of file IPPipe.h.

Referenced by add(), is_empty(), run(), and size().


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