Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

iptk::IP_Function Class Reference

#include <ip_function.h>

Inheritance diagram for iptk::IP_Function:

Inheritance graph
[legend]
Collaboration diagram for iptk::IP_Function:

Collaboration graph
[legend]
List of all members.

Detailed Description

An abstract-base class for Image Processing functions.

All the classes encapsulating image processing functions can be derived from here. The derived classes should ideally override all the virtual functions declared in this class. The image can be processed in place or another image can be made available, as required, by the derived class.


Public Member Functions

 IP_Function (void)
 Default Constructor.
An object created using the default constructor should set the image by using the setImage member function.

 IP_Function (const iptk::Image &im)
 Image registering constructor.
The image is autmatically registered at the construction stage.

 IP_Function (const IP_Function &ip)
 Copy constructor.
Though this constructor does not look like a reference copier, the image data is shared between the passed object(i.e the parameter to the copy constructor) and the new object.

virtual ~IP_Function ()
 Do nothing destructor.

void setImage (const iptk::Image &im)
 Sets the image with the paramter im.

iptk::Image getImage (void)
 Gives access to the registered image directly.

virtual void process (void)=0
 A pure virtual function to process the image.

virtual iptk::Image getResult (void)
 A virtual function to access the result of the process.

virtual void setParams (double params[])
 A virtual function to set the parameters aiding the process.

iptk::FunctionInfo getFunctionInfo (void)
 Returns the function information as a iptk::FunctionInfo object.


Protected Attributes

iptk::Image IMAGE
 Protected data member to hold the image registered with this or a derived class.

iptk::FunctionInfo FUN_INFO
 Protected data member to hold the function information like the name of the function, names of the parameters, etc.


Constructor & Destructor Documentation

virtual iptk::IP_Function::~IP_Function  )  [virtual]
 

Do nothing destructor.

Destructor does nothing at all as the default destructor would have been sufficient.


Member Function Documentation

iptk::FunctionInfo iptk::IP_Function::getFunctionInfo void   ) 
 

Returns the function information as a iptk::FunctionInfo object.

See iptk::FunctionInfo for more information.

iptk::Image iptk::IP_Function::getImage void   ) 
 

Gives access to the registered image directly.

Use this function to process the image directly. It returns an Image but it is only a reference as the copy constructor is only a reference copier.

virtual iptk::Image iptk::IP_Function::getResult void   )  [virtual]
 

A virtual function to access the result of the process.

Will only return a valid result after a call to the process member function. A derived class has the liberty to return an image of its choice.

Reimplemented in iptk::Canny, iptk::Envelope, iptk::Gradient, iptk::HistogramEqualisation, iptk::Hough, iptk::MaskFilter, iptk::MorphologicalOperationUsingStrel, iptk::NeighbourhoodStatisticsFilter, iptk::PrewittGradient, iptk::RegionExtractor, iptk::Ridge, iptk::RobertGradient, iptk::SobelGradient, iptk::SteepestAscent, iptk::SteepestDescent, iptk::TERM, iptk::Threshold, iptk::VoronoiEnvelope, iptk::VoronoiEnvelopeUsingMaxima, and iptk::Watershed.

virtual void iptk::IP_Function::process void   )  [pure virtual]
 

A pure virtual function to process the image.

This function has to be over-ridden by the derived classes. It does nothing as part of this class. To access the image, this function can use the getImage function.

Implemented in iptk::Canny, iptk::Dilate, iptk::Envelope, iptk::Erode, iptk::Gradient, iptk::HistogramEqualisation, iptk::Hough, iptk::ImExtrema, iptk::MaskFilter, iptk::Close, iptk::MeanImage, iptk::MedianFilter, iptk::MembershipFilter, iptk::Open, iptk::MorphologicalOperationUsingStrel, iptk::NeighbourhoodStatisticsFilter, iptk::PrewittGradient, iptk::RainfallingWatershed, iptk::RangeImage, iptk::RegionExtractor, iptk::Ridge, iptk::RobertGradient, iptk::SdImage, iptk::SobelGradient, iptk::SteepestAscent, iptk::SteepestDescent, iptk::TERM, iptk::Threshold, iptk::VoronoiEnvelope, iptk::VoronoiEnvelopeUsingMaxima, and iptk::Watershed.

void iptk::IP_Function::setImage const iptk::Image im  ) 
 

Sets the image with the paramter im.

Use this function when you use the default constructor to initialise an IP_Function or its derivative object. This is the registration operation. i.e, you register an image with the setImage member function. An example is as:

SomeFilter filter; // SomeFilter is derived from IP_Function.
filter.setImage(image);

virtual void iptk::IP_Function::setParams double  params[]  )  [virtual]
 

A virtual function to set the parameters aiding the process.

This function has to be overidden by the derived class. It does nothing as part of this class. The derived class should also declare members which can hold these parameters.

Reimplemented in iptk::Canny, iptk::GaussianFilter, iptk::Hough, iptk::LaplacianFilter, iptk::MembershipFilter, iptk::MorphologicalOperationUsingStrel, iptk::NeighbourhoodStatisticsFilter, iptk::RectangularMaskFilter, iptk::RegionExtractor, iptk::Ridge, iptk::TERM, iptk::Threshold, and iptk::Watershed.


Member Data Documentation

iptk::FunctionInfo iptk::IP_Function::FUN_INFO [protected]
 

Protected data member to hold the function information like the name of the function, names of the parameters, etc.

See iptk::FunctionInfo for more information. Each class derived from iptk::IP_Function should fill in its own iptk::FunctionInfo information.

iptk::Image iptk::IP_Function::IMAGE [protected]
 

Protected data member to hold the image registered with this or a derived class.

The process member function should make use of this iptk::Image object.


The documentation for this class was generated from the following file:
Generated on Mon Nov 22 11:12:42 2004 for ImprolaLib by doxygen 1.3.7