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

Given image gradients compute world gradients and gradient magnitude. More...

#include "vil3d_world_gradients.h"
#include <vil3d/algo/vil3d_fill_border.h>
#include <vil3d/vil3d_transform.h>
#include <vil3d/vil3d_plane.h>
#include <vcl_cmath.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Classes

class  vil3d_math_scale_functor
 Functor class to scale by s. More...

Defines

#define vil3d_world_gradients_txx_
#define VIL3D_WORLD_GRADIENTS_INSTANTIATE(srcT, destT)

Functions

template<class srcT , class destT >
void vil3d_world_gradients (const vil3d_image_view< srcT > &grad_i, const vil3d_image_view< srcT > &grad_j, const vil3d_image_view< srcT > &grad_k, double voxel_width_i, double voxel_width_j, double voxel_width_k, vil3d_image_view< destT > &world_grad, vil3d_image_view< destT > &grad_mag)
 Given image gradients compute world gradients and gradient magnitude.

Detailed Description

Given image gradients compute world gradients and gradient magnitude.

Author:
Tim Cootes

Definition in file vil3d_world_gradients.txx.


Define Documentation

#define VIL3D_WORLD_GRADIENTS_INSTANTIATE (   srcT,
  destT 
)
Value:
template void vil3d_world_gradients(const vil3d_image_view<srcT >& grad_i,\
                                    const vil3d_image_view<srcT >& grad_j,\
                                    const vil3d_image_view<srcT >& grad_k,\
                                    double voxel_width_i,\
                                    double voxel_width_j,\
                                    double voxel_width_k,\
                                    vil3d_image_view<destT >& world_grad,\
                                    vil3d_image_view<destT >& grad_mag)

Definition at line 123 of file vil3d_world_gradients.txx.

#define vil3d_world_gradients_txx_

Definition at line 3 of file vil3d_world_gradients.txx.


Function Documentation

template<class srcT , class destT >
void vil3d_world_gradients ( const vil3d_image_view< srcT > &  grad_i,
const vil3d_image_view< srcT > &  grad_j,
const vil3d_image_view< srcT > &  grad_k,
double  voxel_width_i,
double  voxel_width_j,
double  voxel_width_k,
vil3d_image_view< destT > &  world_grad,
vil3d_image_view< destT > &  grad_mag 
)

Given image gradients compute world gradients and gradient magnitude.

Input gradient images are assumed to be un-normalised pixel gradients (ie no scaling has been done to take account of world pixel widths). Divides each by corresponding pixel dimension to give gradient in world units (ie intensity change per unit world length) in world_grad (3 plane image) The gradient magnitude output is in units of intensity change per world length (ie it does take account of voxel sizes).

Note: Currently assumes single plane only. 1 pixel border around output set to zero.

Definition at line 44 of file vil3d_world_gradients.txx.