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

Convolution.hpp File Reference

Convolution of two images. More...

#include <ImLib3D/ImageProcessor.hpp>
#include <ImLib3D/Display.hpp>
#include <ImLib3D/TestPatterns.hpp>
#include <ImLib3D/Filter.hpp>
#include <ImLib3D/Arithmetic.hpp>
#include <ImLib3D/ImageProgress.hpp>
#include <ImLib3D/Transformation.hpp>
#include <ImLib3D/Convolution.hxx>

Include dependency graph for Convolution.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  IP3D

Functions

template<class ImageType>
void Convolution (const ImageType &imToConvolve, const Filter &imFilter, ImageType &imResult)
template<class ImageType>
void SeparableConvolution (const ImageType &imToConvolve, const SeparableFilter &filter, ImageType &imResult)
template<class ImageType>
void ConvolutionFFT (const ImageType &imToConvolve, const Filter &imFilter, ImageType &imResult)
template<class ImageType>
void PartialSum (const ImageType &cumSum, const RectZone3Di &r0, typename ImageType::value_type &res)
template<class ImageType>
void CumulativeSum (const ImageType &src, ImageType &res0)
template<class ImageType>
void BoxFilter (const ImageType &src, int size, ImageType &res0)
template<class ImageType>
void GaussianApproxFilter (const ImageType &src, int order, int size, ImageType &res)
template<class ImageType>
void BorderCorrectedGaussianApproxFilter (const ImageType &src, int size, int nbFilterIter, ImageType &res)
template<class ImageType>
void SymmetricBinomialFilter (const ImageType &src, int order, ImageType &res)
void FFTLowPassFilterApodizedIdeal (const Image3Df &src, float cutoffFreq, Image3Df &res, float rolloffFactor=0)
void FFTLowPassFilterButterworth (const Image3Df &src, float cutoffFreq, float order, Image3Df &res)
void FFTLowPassFilterChebyscheff (const Image3Df &src, float cutoffFreq, float order, Image3Df &res)


Detailed Description

Convolution of two images.

<long description="">

See AUTHORS and COPYING files for more information

Date:
2001-01-24

Definition in file Convolution.hpp.


Function Documentation

template<class ImageType>
void IP3D::Convolution const ImageType &  imToConvolve,
const Filter imFilter,
ImageType &  imResult
 

#&Convolution&# Convolution of an image by a user defined filter. The filter class is just like a float valued image, with a center point added. Ignores masks.

Source image type:ImageType Filter type:Filter Result image type:ImageType ~

template<class ImageType>
void IP3D::SeparableConvolution const ImageType &  imToConvolve,
const SeparableFilter &  filter,
ImageType &  imResult
 

#&SeparableConvolution&# Convolution of an image by a user defined filter. The filter class is just like a float valued image, with a center point added. Ignores masks.

Source image type:ImageType Separable filter type:SeparableFilter Result image type:ImageType ~

Referenced by IP3D::SymmetricBinomialFilter().

template<class ImageType>
void IP3D::ConvolutionFFT const ImageType &  imToConvolve,
const Filter imFilter,
ImageType &  imResult
 

#&ConvolutionFFT&# Convolution of an image by a user defined filter using FFT. It uses multiplication in fourier domain with forward and inverse fft. This is faster than normal convolution for lmarge filter sizes. Ignores masks. UNIMPLEMENTED!

Source image type:ImageType Filter type:Filter Result image type:ImageType ~

template<class ImageType>
void IP3D::PartialSum const ImageType &  cumSum,
const RectZone3Di &  r0,
typename ImageType::value_type &  res
 

#&PartialSum&# Computes the sum of an image in a rectangular zone. It uses an image computed using CumulativeSum. This is a fast way of doing filtering with big square convolution filters. Result is the sum of all points in the rectzone: the rectzone *includes both* of its defining points.

CumulativeSum image type:ImageType zone type:RectZone3Di result type:Im3DValue ~

Definition at line 100 of file Convolution.hpp.

Referenced by IP3D::CumulativeSum().

template<class ImageType>
void IP3D::CumulativeSum const ImageType &  src,
ImageType &  res0
 

#&CumulativeSum&# Computes an image that I(i,j,k)=Sum(0<=r<=i, 0<=s<=j , 0<=t<=k : S(r,s,t) ) This can be used by PartialSum for fast filtering.

Source image type:ImageType Result image type:ImageType ~

Definition at line 128 of file Convolution.hpp.

References IP3D::PartialSum(), Vect3D< Value, Real >::x, Vect3D< Value, Real >::y, and Vect3D< Value, Real >::z.

template<class ImageType>
void IP3D::BoxFilter const ImageType &  src,
int  size,
ImageType &  res0
 

#&BoxFilter&# Very fast convolution by an integer sized box signal Ignores masks. Variance of the filter is 1/12*(size*size-1).

Source image type:ImageType size type:int Result image type:ImageType ~

Definition at line 157 of file Convolution.hpp.

Referenced by IP3D::GaussianApproxFilter().

template<class ImageType>
void IP3D::GaussianApproxFilter const ImageType &  src,
int  order,
int  size,
ImageType &  res
 

#&GaussianApproxFilter&# Fast convolution by an approximate "integer" guassian filter/ This just applies several boxfilters (boxsize=size and order times), and is only efficient for low orders. Ignores masks. If size is pair, the order must also be pair for the resulting image to lay on the same grid (else translated 0.5 voxel towards (0,0,0).

Source image type:ImageType order type:int size type:int Result image type:ImageType ~

Definition at line 225 of file Convolution.hpp.

References IP3D::BoxFilter(), and IP3D::WrapTranslate().

Referenced by IP3D::BorderCorrectedGaussianApproxFilter().

template<class ImageType>
void IP3D::BorderCorrectedGaussianApproxFilter const ImageType &  src,
int  size,
int  nbFilterIter,
ImageType &  res
 

#&BorderCorrectedGaussianApproxFilter&# GaussianApproxFilter with compensation on image borders and mask borders Attenuation on border regions and border of masked regions is compensated. This is equivalent of gaussian filtering using only filter coefficients that are inside the "shape" being considered.

Source image type:ImageType order type:int size type:int Result image type:ImageType ~

Definition at line 253 of file Convolution.hpp.

References Container3D< Im3DValue >::Fill(), IP3D::GaussianApproxFilter(), and Image3D::Mask().

template<class ImageType>
void IP3D::SymmetricBinomialFilter const ImageType &  src,
int  order,
ImageType &  res
 

#&SymmetricBinomialFilter&# Convolution by a binomial filter/ Order should be pair to permit resulting image to be on the same grid as the original image. The filtering is quite long for high orders. This is equivalent to using the BoxFilter of size=2 of the same order, but a lot faster for high orders. A BinomialFilter approximates the Gaussian so that the variance=order/4.

Source image type:ImageType order type:int Result image type:ImageType ~

Definition at line 299 of file Convolution.hpp.

References IP3D::SeparableConvolution().

void IP3D::FFTLowPassFilterApodizedIdeal const Image3Df src,
float  cutoffFreq,
Image3Df res,
float  rolloffFactor = 0
 

#&FFTLowPassFilterApodizedIdeal&# Low pass filtering using fft. Multiplies in fourrier domain by an cosine-shaped apodized rectangular window. Cutoff frequency should be between 0 and 1. Rolloff factor between 0 and 1 describes smoothness of cutoff. rolloff=0 means filter is square.

Source image type:Image3Df cutoff frequency type:float Result image type:Image3Df rolloff factor type:float ~

void IP3D::FFTLowPassFilterButterworth const Image3Df src,
float  cutoffFreq,
float  order,
Image3Df res
 

#&FFTLowPassFilterButterworth&# Low pass filtering using fft. Multiplies in fourrier domain by 1/(1+(r/r0)^2n). Cutoff frequency should be between 0 and 1. For n=inf this is an ideal lowpass filter. For n=1 this is a smooth filter.

Source image type:Image3Df cutoff frequency type:float order type:float Result image type:Image3Df ~

void IP3D::FFTLowPassFilterChebyscheff const Image3Df src,
float  cutoffFreq,
float  order,
Image3Df res
 

#&FFTLowPassFilterChebyscheff&# Low pass filtering using fft. Multiplies in fourrier domain by 1/(1+(cos(n*acos(r/r0))^2)). Cutoff frequency should be between 0 and 1. For n=inf this is an ideal lowpass filter. For n=1 this is a smooth filter.

Source image type:Image3Df cutoff frequency type:float order type:float Result image type:Image3Df ~


Generated on Fri Jun 17 13:36:13 2005 for ImLib3D by  doxygen 1.4.2