Defines | Functions
contrib/mul/vil3d/algo/vil3d_gauss_reduce.txx File Reference

Functions to smooth and sub-sample 3D images in one direction. More...

#include "vil3d_gauss_reduce.h"
#include <vil/algo/vil_gauss_reduce.h>

Go to the source code of this file.

Defines

#define vil3d_gauss_reduce_txx_
#define VIL3D_GAUSS_REDUCE_INSTANTIATE(T)

Functions

template<class T >
void vil3d_gauss_reduce_i (const T *src_im, unsigned src_ni, unsigned src_nj, unsigned src_nk, vcl_ptrdiff_t s_i_step, vcl_ptrdiff_t s_j_step, vcl_ptrdiff_t s_k_step, T *dest_im, vcl_ptrdiff_t d_i_step, vcl_ptrdiff_t d_j_step, vcl_ptrdiff_t d_k_step)
 Smooth and subsample single plane src_im in i to produce dest_im.
template<class T >
void vil3d_gauss_reduce (const vil3d_image_view< T > &src_im, vil3d_image_view< T > &dest_im, vil3d_image_view< T > &work_im1, vil3d_image_view< T > &work_im2)
 Smooth and subsample src_im to produce dest_im.
template<class T >
void vil3d_gauss_reduce_ij (const vil3d_image_view< T > &src_im, vil3d_image_view< T > &dest_im, vil3d_image_view< T > &work_im1)
 Smooth and subsample src_im along i and j to produce dest_im.
template<class T >
void vil3d_gauss_reduce_ik (const vil3d_image_view< T > &src_im, vil3d_image_view< T > &dest_im, vil3d_image_view< T > &work_im1)
 Smooth and subsample src_im along i and k to produce dest_im.
template<class T >
void vil3d_gauss_reduce_jk (const vil3d_image_view< T > &src_im, vil3d_image_view< T > &dest_im, vil3d_image_view< T > &work_im1)
 Smooth and subsample src_im along j and k to produce dest_im.

Detailed Description

Functions to smooth and sub-sample 3D images in one direction.

These are not templated because

Definition in file vil3d_gauss_reduce.txx.


Define Documentation

#define VIL3D_GAUSS_REDUCE_INSTANTIATE (   T)
Value:
template void vil3d_gauss_reduce_i(const T* src_im,   \
                                   unsigned src_ni, unsigned src_nj, unsigned src_nk, \
                                   vcl_ptrdiff_t s_i_step, vcl_ptrdiff_t s_j_step,  \
                                   vcl_ptrdiff_t s_k_step,  \
                                   T* dest_im,  \
                                   vcl_ptrdiff_t d_i_step,  \
                                   vcl_ptrdiff_t d_j_step, vcl_ptrdiff_t d_k_step); \
template void vil3d_gauss_reduce(const vil3d_image_view<T >& src_im, \
                                 vil3d_image_view<T >& dest_im,  \
                                 vil3d_image_view<T >& work_im1, \
                                 vil3d_image_view<T >& work_im2);  \
template void vil3d_gauss_reduce_ij(const vil3d_image_view<T >& src_im,  \
                                    vil3d_image_view<T >& dest_im, \
                                    vil3d_image_view<T >& work_im1); \
template void vil3d_gauss_reduce_ik(const vil3d_image_view<T >& src_im,  \
                                    vil3d_image_view<T >& dest_im, \
                                    vil3d_image_view<T >& work_im1); \
template void vil3d_gauss_reduce_jk(const vil3d_image_view<T >& src_im,  \
                                    vil3d_image_view<T >& dest_im, \
                                    vil3d_image_view<T >& work_im1)

Definition at line 219 of file vil3d_gauss_reduce.txx.

#define vil3d_gauss_reduce_txx_

Definition at line 3 of file vil3d_gauss_reduce.txx.


Function Documentation

template<class T >
void vil3d_gauss_reduce ( const vil3d_image_view< T > &  src_im,
vil3d_image_view< T > &  dest_im,
vil3d_image_view< T > &  work_im1,
vil3d_image_view< T > &  work_im2 
)

Smooth and subsample src_im to produce dest_im.

Applies filter in i,j and k directions, then samples every other pixel. Resulting image is (ni+1)/2 x (nj+1)/2 x (nk+1)/2

Definition at line 47 of file vil3d_gauss_reduce.txx.

template<class T >
void vil3d_gauss_reduce_i ( const T *  src_im,
unsigned  src_ni,
unsigned  src_nj,
unsigned  src_nk,
vcl_ptrdiff_t  s_i_step,
vcl_ptrdiff_t  s_j_step,
vcl_ptrdiff_t  s_k_step,
T *  dest_im,
vcl_ptrdiff_t  d_i_step,
vcl_ptrdiff_t  d_j_step,
vcl_ptrdiff_t  d_k_step 
)

Smooth and subsample single plane src_im in i to produce dest_im.

Applies 1-5-8-5-1 filter in i, then samples every other pixel. Fills [0,(ni+1)/2-1][0,nj-1][0,nk-1] elements of dest Assumes dest_im has sufficient data allocated.

By applying three times we can obtain a full gaussian smoothed and sub-sampled 3D image

Definition at line 25 of file vil3d_gauss_reduce.txx.

template<class T >
void vil3d_gauss_reduce_ij ( const vil3d_image_view< T > &  src_im,
vil3d_image_view< T > &  dest_im,
vil3d_image_view< T > &  work_im1 
)

Smooth and subsample src_im along i and j to produce dest_im.

Applies filter in i,j directions, then samples every other pixel. Resulting image is (ni+1)/2 x (nj+1)/2 x nk

Definition at line 101 of file vil3d_gauss_reduce.txx.

template<class T >
void vil3d_gauss_reduce_ik ( const vil3d_image_view< T > &  src_im,
vil3d_image_view< T > &  dest_im,
vil3d_image_view< T > &  work_im1 
)

Smooth and subsample src_im along i and k to produce dest_im.

Applies filter in i,k directions, then samples every other pixel. Resulting image is (ni+1)/2 x nj x (nk+1)/2

Definition at line 141 of file vil3d_gauss_reduce.txx.

template<class T >
void vil3d_gauss_reduce_jk ( const vil3d_image_view< T > &  src_im,
vil3d_image_view< T > &  dest_im,
vil3d_image_view< T > &  work_im1 
)

Smooth and subsample src_im along j and k to produce dest_im.

Applies filter in j,k directions, then samples every other pixel. Resulting image is ni x (nj+1)/2 x (nk+1)/2

Definition at line 181 of file vil3d_gauss_reduce.txx.