Alida-C++ 0.1

Alida::OpenCVImageDataIO Class Reference

Class for I/O of OpenCV images via command line. More...

#include <OpenCVImageDataIO.h>

Inheritance diagram for Alida::OpenCVImageDataIO:
Collaboration diagram for Alida::OpenCVImageDataIO:

List of all members.

Public Member Functions

virtual ~OpenCVImageDataIO ()
 Default destructor.
virtual void * readData (std::string, std::string) const
 Function to open an image from given filename.
virtual std::string writeData (std::string format, std::string type, void *data) const
 Function to output an image to file or screen.

Detailed Description

Class for I/O of OpenCV images via command line.

Here we demonstrate what needs to be done to add data I/O providers for specific data types to the Alida framework.
In this case a provider for the OpenCV image data type IplImage is defined used in conjunction with the corresponding operator DemoOperatorOpenCV.

Definition at line 53 of file OpenCVImageDataIO.h.


Constructor & Destructor Documentation

virtual Alida::OpenCVImageDataIO::~OpenCVImageDataIO ( ) [inline, virtual]

Default destructor.

Definition at line 58 of file OpenCVImageDataIO.h.


Member Function Documentation

void * OpenCVImageDataIO::readData ( std::string  input,
std::string  type 
) const [virtual]

Function to open an image from given filename.

This function interprets the given input string as filename and tries to read an image from the specified location.

Parameters:
inputName of file to be read.
typeImage type requested.
Returns:
Generated openCV image.

Implements Alida::ALDDataIOCmdline.

Definition at line 69 of file OpenCVImageDataIO.cc.

string OpenCVImageDataIO::writeData ( std::string  format,
std::string  type,
void *  data 
) const [virtual]

Function to output an image to file or screen.

This function outputs/displays a given image. If the format string just contains "-", the image is displayed on screen, otherwise the format string is interpreted as filename where to save the image. The returned string is empty in both cases.

Parameters:
formatOutput filename.
typeIdentifier string for object type.
dataImage to be displayed/saved.
Returns:
Empty string.

Implements Alida::ALDDataIOCmdline.

Definition at line 87 of file OpenCVImageDataIO.cc.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines