Functions
contrib/mul/vil3d/algo/vil3d_anisotropic_filter.h File Reference

Functions to apply anisotropic filters to 3D images. More...

#include <vil3d/vil3d_image_view.h>
#include <vgl/vgl_vector_3d.h>
#include <vil/algo/vil_gauss_filter.h>
#include <vil3d/algo/vil3d_convolve_1d.h>
#include <vnl/vnl_math.h>
#include <vil3d/vil3d_switch_axes.h>
#include <vil3d/vil3d_convert.h>
#include <vil3d/vil3d_print.h>
#include <vcl_iostream.h>

Go to the source code of this file.

Functions

template<class T >
void vil3d_anisotropic_filter (const vil3d_image_view< T > &src, vil3d_image_view< float > &dest, const vgl_vector_3d< vcl_vector< double > > &filter, const vgl_vector_3d< unsigned > &c, const vgl_vector_3d< int > &lo, const vgl_vector_3d< int > &hi, const vgl_vector_3d< vil_convolve_boundary_option > &cbo, vil3d_image_view< float > &work1, vil3d_image_view< float > &work2)
 Function to apply 3 different 1D filters to a 3D image.
void vil3d_generate_gaussian_filters (const vgl_vector_3d< double > &sd, vgl_vector_3d< vcl_vector< double > > &filter, vgl_vector_3d< unsigned > &c, vgl_vector_3d< int > &lo, vgl_vector_3d< int > &hi)
 Generates 3 Gaussian filters, 1 for each dimension.
template<class T >
void vil3d_anisotropic_gaussian_filter (const vil3d_image_view< T > &src, vil3d_image_view< T > &dest, const vgl_vector_3d< double > &sd, vil3d_image_view< float > &work1, vil3d_image_view< float > &work2, vil3d_image_view< float > &work3)
 A convenience function to generate and apply an anisotropic Gaussian filter to a 3D image.

Detailed Description

Functions to apply anisotropic filters to 3D images.

Author:
Kevin de Souza and Ian Scott

Definition in file vil3d_anisotropic_filter.h.


Function Documentation

template<class T >
void vil3d_anisotropic_filter ( const vil3d_image_view< T > &  src,
vil3d_image_view< float > &  dest,
const vgl_vector_3d< vcl_vector< double > > &  filter,
const vgl_vector_3d< unsigned > &  c,
const vgl_vector_3d< int > &  lo,
const vgl_vector_3d< int > &  hi,
const vgl_vector_3d< vil_convolve_boundary_option > &  cbo,
vil3d_image_view< float > &  work1,
vil3d_image_view< float > &  work2 
) [inline]

Function to apply 3 different 1D filters to a 3D image.

Parameters:
srcThe source image.
Return values:
destThe destination image (of type <float>).
Parameters:
filterThe filter to apply in each direction.
cThe (absolute) index of the centre tap of each filter.
loThe (relative) index of the lowest tap of each filter.
hiThe (relative) index of the highest tap of each filter.
cboThe convolution boundary option to use with each filter.
work1Workspace image (assumed to be correct size).
work2Workspace image (assumed to be correct size).
Note:
The returned image <float> can be converted to the source type by a subsequent call to vil3d_convert_round() or vil3d_convert-cast().

Definition at line 36 of file vil3d_anisotropic_filter.h.

template<class T >
void vil3d_anisotropic_gaussian_filter ( const vil3d_image_view< T > &  src,
vil3d_image_view< T > &  dest,
const vgl_vector_3d< double > &  sd,
vil3d_image_view< float > &  work1,
vil3d_image_view< float > &  work2,
vil3d_image_view< float > &  work3 
) [inline]

A convenience function to generate and apply an anisotropic Gaussian filter to a 3D image.

Parameters:
srcThe source image.
Return values:
destThe destination (filtered) image.
Parameters:
sdThe width of the Gaussian (in voxel widths) for each dimension.
work1Workspace image (assumed to be correct size).
work2Workspace image (assumed to be correct size).
work3Workspace image (assumed to be correct size).
Note:
The filtering is done in floating-point arithmetic, and the destination image is rounded to the same pixel type as the source.
See also:
vil3d_generate_gaussian_filters()
vil3d_anisotropic_filter()

Definition at line 168 of file vil3d_anisotropic_filter.h.

void vil3d_generate_gaussian_filters ( const vgl_vector_3d< double > &  sd,
vgl_vector_3d< vcl_vector< double > > &  filter,
vgl_vector_3d< unsigned > &  c,
vgl_vector_3d< int > &  lo,
vgl_vector_3d< int > &  hi 
) [inline]

Generates 3 Gaussian filters, 1 for each dimension.

Parameters:
sdThe width of the Gaussian (in voxel widths) for each dimension.
Return values:
filterThe 3 filters.
cThe (absolute) index of the centre tap of each filter.
loThe (relative) index of the lowest tap of each filter.
hiThe (relative) index of the highest tap of each filter.

Definition at line 101 of file vil3d_anisotropic_filter.h.