[Insight-developers] Generic binary filter -> FilterImageBinary

Luis Ibanez ibanez at cs.unc.edu
Fri Sep 22 11:10:15 EDT 2000


Hi,

I just checked in a generic binary filter.

It takes two images as input and produce
one image as output using a pixel-wise
operation between the two input images.

It is parametrized by a function class that
defines the operation to be performed between
the two input images.

Now, the itkFilterImageAdd class derives from
itkFilterImageBinary.

During the declaration, a function class is used.
this function class only defines a constructor,
a destructor and overloads  "operator()".

To avoid name collisions, it have been put in a
new namespace named "function".

In this way the basic code for all the binary
pixel wise filters is concentrated in one place,
and any new binary filter can be created with
just a short header file.

The FilterImageMult have been created in the
same way, just modifying FilterImageAdd.




Luis.







More information about the Insight-developers mailing list