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

iptk::ArithmeticImage Class Reference

#include <arithmeticImage.h>

Inheritance diagram for iptk::ArithmeticImage:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

An abstract base class to perform image arithmetic.


Image arithmetic is assumed to be performed between two objects of type iptk::Image using one binary operator. The left operand is called the left-image and the right operand is called the right-image. The member function evaluate() should be called to perform the actual arithmetic operation after the operands are set. If required, the re-scaleing of the intensity values can be performed using the rescale() member function.


Public Member Functions

 ArithmeticImage (void)
 Default Constructor.

 ArithmeticImage (const ArithmeticImage &ai)
 Copy Constructor.

 ~ArithmeticImage ()
 Destructor.

void setLeftImage (const iptk::Image &im)
 Sets the left operand image.

void setRightImage (const iptk::Image &im)
 Sets the right operand image.

iptk::Image getResult (void)
 Returns the result of the arithmetic operation and optionally, result of rescaling.

virtual void evaluate (void)=0
 A pure virtual function which should be overidden in the derived class.

void rescale (void)
 Rescales the intensity values.


Protected Attributes

iptk::Image LEFT_IMAGE
 The left operand image.

iptk::Image RIGHT_IMAGE
 The right operand image.

iptk::Image RESULT
 The result image.


Constructor & Destructor Documentation

iptk::ArithmeticImage::ArithmeticImage void   ) 
 

Default Constructor.

Does nothing.

iptk::ArithmeticImage::ArithmeticImage const ArithmeticImage ai  ) 
 

Copy Constructor.

Its is only a reference copier.


Member Function Documentation

virtual void iptk::ArithmeticImage::evaluate void   )  [pure virtual]
 

A pure virtual function which should be overidden in the derived class.

This function should do/does the actual evaluation of the arithmetic operation and stores the result in the protected member RESULT. It can be accesed through the member function getResult(). The image stored in RESULT will be meaningful only after the left and right images of the operand are set using the corresponding member functions.

NOTE :: A derived class should store only the raw image in RESULT. If required, the rescaling of intensity values should be done by a call to the rescale() member function.

Implemented in iptk::AdditionImage, iptk::DifferenceImage, iptk::ProductImage, and iptk::QuotientImage.

void iptk::ArithmeticImage::rescale void   ) 
 

Rescales the intensity values.

The intensity values in the image would be such that the minimum value is 0 and the maximum value is 255.

Note that this function leads to a meaningful result only after a call to the evaluate() member function.


Member Data Documentation

iptk::Image iptk::ArithmeticImage::LEFT_IMAGE [protected]
 

The left operand image.

A derived class should make use of this image.

iptk::Image iptk::ArithmeticImage::RESULT [protected]
 

The result image.

A derived class should store the result in this image.

iptk::Image iptk::ArithmeticImage::RIGHT_IMAGE [protected]
 

The right operand image.

A derived class should make use of this image.


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