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

Compute shuffle distance between two 3D images. More...

#include <vil3d/algo/vil3d_structuring_element.h>
#include <vil3d/vil3d_image_view.h>

Go to the source code of this file.

Functions

template<class T1 , class T2 >
double vil3d_abs_shuffle_distance (T1 v0, const T2 *im, const vcl_ptrdiff_t *offset, unsigned n)
 Return minimum value of |im[offset[k]]-v0| k=0..n-1.
template<class T1 , class T2 >
double vil3d_abs_shuffle_distance (T1 v0, const vil3d_image_view< T2 > &image, unsigned plane, const vil3d_structuring_element &element, int i0, int j0, int k0)
 Return min difference of pixels under structuring element centred at (i0,j0,k0).
template<class T1 , class T2 >
double vil3d_abs_shuffle_distance (const vil3d_image_view< T1 > &image1, const vil3d_image_view< T2 > &image2, const vil3d_structuring_element &element, bool include_borders=true)
 Computes shuffle distance between image1 and image2.
template<class T1 , class T2 >
void vil3d_abs_shuffle_distance (const vil3d_image_view< T1 > &image1, const vil3d_image_view< T2 > &image2, const vil3d_structuring_element &element, vil3d_image_view< T1 > &image3)
 Computes shuffle distance between image1 and image2.

Detailed Description

Compute shuffle distance between two 3D images.

Author:
Vlad Petrovic & Tim Cootes

Definition in file vil3d_abs_shuffle_distance.h.


Function Documentation

template<class T1 , class T2 >
double vil3d_abs_shuffle_distance ( T1  v0,
const T2 *  im,
const vcl_ptrdiff_t *  offset,
unsigned  n 
) [inline]

Return minimum value of |im[offset[k]]-v0| k=0..n-1.

Definition at line 13 of file vil3d_abs_shuffle_distance.h.

template<class T1 , class T2 >
double vil3d_abs_shuffle_distance ( T1  v0,
const vil3d_image_view< T2 > &  image,
unsigned  plane,
const vil3d_structuring_element element,
int  i0,
int  j0,
int  k0 
) [inline]

Return min difference of pixels under structuring element centred at (i0,j0,k0).

I.e., returns minimum of |v0-image(i,j,k,plane)| over (i,j,k) in element. Checks boundary overlap.

Definition at line 30 of file vil3d_abs_shuffle_distance.h.

template<class T1 , class T2 >
double vil3d_abs_shuffle_distance ( const vil3d_image_view< T1 > &  image1,
const vil3d_image_view< T2 > &  image2,
const vil3d_structuring_element element,
bool  include_borders 
)

Computes shuffle distance between image1 and image2.

For each pixel in image1 it finds the pixel in image2 with the closest value in an offset area defined by the element. Returns mean over all pixels of this minimum value. Images must be of same size. If include_borders is false then only include pixels for which the structuring element is entirely within the image.

For each pixel in image1 it finds the pixel in image2 with the closest value in an offset area defined by the element. Returns mean over all pixels of this minimum value.

Definition at line 18 of file vil3d_abs_shuffle_distance.txx.

template<class T1 , class T2 >
void vil3d_abs_shuffle_distance ( const vil3d_image_view< T1 > &  image1,
const vil3d_image_view< T2 > &  image2,
const vil3d_structuring_element element,
vil3d_image_view< T1 > &  image3 
)

Computes shuffle distance between image1 and image2.

For each pixel in image1 it finds the pixel in image2 with the closest value in an offset area defined by the element. If include_borders is false then only include pixels for which the structuring element is entirely within the image.

For each pixel in image1 it finds the pixel in image2 with the closest value in an offset area defined by the element.

Definition at line 113 of file vil3d_abs_shuffle_distance.txx.