Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Related Functions
vil3d_image_view< T > Class Template Reference

Concrete view of image data of type T held in memory. More...

#include <vil3d_image_view.h>

Inheritance diagram for vil3d_image_view< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T pixel_type
 The pixel type of this image.
typedef T * iterator
typedef T const * const_iterator

Public Member Functions

 vil3d_image_view ()
 Dflt ctor.
 vil3d_image_view (unsigned ni, unsigned nj, unsigned nk, unsigned n_planes=1)
 Create an n_plane plane image of ni x nj x nk pixels.
 vil3d_image_view (const T *top_left, unsigned ni, unsigned nj, unsigned nk, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step, vcl_ptrdiff_t k_step, vcl_ptrdiff_t plane_step)
 Set this view to look at someone else's memory data.
 vil3d_image_view (const vil_memory_chunk_sptr &mem_chunk, const T *top_left, unsigned ni, unsigned nj, unsigned nk, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step, vcl_ptrdiff_t k_step, vcl_ptrdiff_t plane_step)
 Set this view to look at another view's data.
 vil3d_image_view (const vil3d_image_view< T > &rhs)
 Copy construct.
 vil3d_image_view (const vil3d_image_view_base &base_ref)
 Create shallow copy of image with given base reference.
 vil3d_image_view (const vil3d_image_view_base_sptr &base_sptr)
 Create shallow copy of image with given base reference.
const vil3d_image_view< T > & operator= (const vil3d_image_view< T > &rhs)
 Copy a view. The rhs and lhs will point to the same image data.
const vil3d_image_viewoperator= (const vil3d_image_view_base &base_ref)
 Create shallow copy of image with given base reference.
const vil3d_image_view< T > & operator= (const vil3d_image_view_base_sptr &rhs)
 Copy a view. The rhs and lhs will point to the same image data.
virtual ~vil3d_image_view ()
bool is_contiguous () const
 True if data all in one unbroken block and origin_ptr() is lowest data address.
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
T * origin_ptr ()
 Pointer to the first (top left in plane 0) pixel.
const T * origin_ptr () const
 Pointer to the first (top left in plane 0) pixel.
vcl_ptrdiff_t istep () const
 Add this to your pixel pointer to get next i pixel.
vcl_ptrdiff_t jstep () const
 Add this to your pixel pointer to get next j pixel.
vcl_ptrdiff_t kstep () const
 Add this to your pixel pointer to get next k pixel.
vcl_ptrdiff_t planestep () const
 Add this to your pixel pointer to get pixel on next plane.
 operator safe_bool () const
 Cast to bool is true if pointing at some data.
bool operator! () const
 Return false if pointing at some data.
vcl_size_t size_bytes () const
 The number of bytes in the data.
const vil_memory_chunk_sptrmemory_chunk () const
 Smart pointer to the object holding the data for this view.
vil_memory_chunk_sptrmemory_chunk ()
 Smart pointer to the object holding the data for this view.
const T & operator() (unsigned i, unsigned j, unsigned k) const
 Return read-only reference to pixel at (i,j,k) in plane 0.
T & operator() (unsigned i, unsigned j, unsigned k)
 Return read/write reference to pixel at (i,j,k) in plane 0.
const T & operator() (unsigned i, unsigned j, unsigned k, unsigned p) const
 Return read-only reference to pixel at (i,j,k) in plane p.
T & operator() (unsigned i, unsigned j, unsigned k, unsigned p)
 Return read-only reference to pixel at (i,j,k) in plane p.
virtual void set_size (unsigned ni, unsigned nj, unsigned nk)
 resize current planes to ni x nj x nk.
virtual void set_size (unsigned ni, unsigned nj, unsigned nk, unsigned nplanes)
 resize to ni x nj x nk x nplanes.
void deep_copy (const vil3d_image_view< T > &src)
 Make a copy of the data in src and set this to view it.
void clear ()
 Make empty.
void set_to_memory (const T *top_left, unsigned ni, unsigned nj, unsigned nk, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t j_step, vcl_ptrdiff_t k_step, vcl_ptrdiff_t plane_step)
 Set this view to look at someone else's memory data.
void fill (T value)
 Fill view with given value.
virtual void print (vcl_ostream &) const
 Print a 1-line summary of contents.
virtual vcl_string is_a () const
 Return class name.
virtual bool is_class (vcl_string const &s) const
 True if this is (or is derived from) class s.
vil_pixel_format pixel_format () const
 Return a description of the concrete data pixel type.
bool operator== (const vil3d_image_view< T > &other) const
 True if they share same view of same image data.
bool operator!= (const vil3d_image_view< T > &rhs) const
 True if they do not share same view of same image data.
bool operator< (const vil3d_image_view< T > &other) const
 Provides an ordering.
bool operator>= (const vil3d_image_view< T > &other) const
 Provides an ordering.
bool operator> (const vil3d_image_view< T > &other) const
 Provides an ordering.
bool operator<= (const vil3d_image_view< T > &other) const
 Provides an ordering.
unsigned ni () const
 Width.
unsigned nj () const
 Height.
unsigned nk () const
 Depth.
unsigned nplanes () const
 Number of planes.
vcl_size_t size () const
 The number of pixels.

Protected Member Functions

void release_memory ()
 Disconnect this view from the underlying data,.

Protected Attributes

T * top_left_
 Pointer to pixel at origin.
vcl_ptrdiff_t istep_
 Add this to a pixel pointer to move one column left.
vcl_ptrdiff_t jstep_
 Add this to a pixel pointer to move one row down.
vcl_ptrdiff_t kstep_
 Add this to a pixel pointer to move one slice down.
vcl_ptrdiff_t planestep_
 Add this to a pixel pointer to move one plane back.
vil_memory_chunk_sptr ptr_
 Reference to actual image data.
unsigned ni_
 Number of columns.
unsigned nj_
 Number of rasters.
unsigned nk_
 Number of slices.
unsigned nplanes_
 Number of planes.

Private Attributes

 VCL_SAFE_BOOL_DEFINE

Related Functions

(Note that these are not member functions.)

template<class srcT , class destT , class kernelT , class accumT >
void vil3d_convolve_1d (const vil3d_image_view< srcT > &src_im, vil3d_image_view< destT > &dest_im, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, accumT ac, enum vil_convolve_boundary_option start_option, enum vil_convolve_boundary_option end_option)
 Convolve kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.
template<class srcT , class destT >
void vil3d_grad_1x3 (const vil3d_image_view< srcT > &src, vil3d_image_view< destT > &grad_i, vil3d_image_view< destT > &grad_j, vil3d_image_view< destT > &grad_k)
 Compute gradients of an image using (-0.5 0 0.5) Sobel filters.
template<class srcT , class destT >
void vil3d_grad_1x3 (const vil3d_image_view< srcT > &src, vil3d_image_view< destT > &grad_ijk)
 Compute gradients of an image using (-0.5 0 0.5) filters.
template<class srcT , class kernelT , class accumT >
accumT vil_norm_corr_2d_at_pt (const srcT *src_im, vcl_ptrdiff_t s_istep, vcl_ptrdiff_t s_jstep, vcl_ptrdiff_t s_kstep, vcl_ptrdiff_t s_pstep, const vil3d_image_view< kernelT > &kernel, accumT)
 Evaluate dot product between kernel and src_im.
template<class srcT , class destT , class kernelT , class accumT >
void vil3d_normalised_correlation_3d (const vil3d_image_view< srcT > &src_im, vil3d_image_view< destT > &dest_im, const vil3d_image_view< kernelT > &kernel, accumT ac)
 Normalised cross-correlation of (pre-normalised) kernel with srcT.
template<class srcT >
void vil3d_suppress_non_max_edges (const vil3d_image_view< srcT > &world_grad, const vil3d_image_view< srcT > &grad_mag, double voxel_width_i, double voxel_width_j, double voxel_width_k, srcT grad_mag_threshold, vil3d_image_view< srcT > &max_grad_mag)
 Given gradient images, computes magnitude image containing maximal edges.
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.
template<class T >
void vil3d_clamp (vil3d_image_view< T > &src, vil3d_image_view< T > &dest, T lo, T hi)
 Clamp an image view between two values.
template<class T >
void vil3d_clamp_below (vil3d_image_view< T > &src, T t, T v)
 Clamp an image view above a given value t, setting it to v if below or on t.
template<class T >
void vil3d_clamp_below (vil3d_image_view< T > &src, T t)
 Clamp an image view above a given value t, setting it to this t if below t.
template<class T >
void vil3d_clamp_above (vil3d_image_view< T > &src, T t, T v)
 Clamp an image view below a given value t, setting it to v if above or on t.
template<class T >
void vil3d_clamp_above (vil3d_image_view< T > &src, T t)
 Clamp an image view below a given value t, setting it to this t if above t.
template<class inP , class outP >
void vil3d_convert_cast (const vil3d_image_view< inP > &src, vil3d_image_view< outP > &dest)
 Cast one pixel type to another.
template<class inP , class outP >
void vil3d_convert_round (const vil3d_image_view< inP > &src, vil3d_image_view< outP > &dest)
 Convert one pixel type to another with rounding.
template<class T >
void vil3d_convert_stretch_range (const vil3d_image_view< T > &src, vil3d_image_view< vxl_byte > &dest)
 Convert src to byte image dest by stretching to range [0,255].
template<class T >
void vil3d_copy_reformat (const vil3d_image_view< T > &src, vil3d_image_view< T > &dest)
 Copy src to dest, without changing dest's view parameters.
template<class T >
void vil3d_copy_to_window (const vil3d_image_view< T > &src, vil3d_image_view< T > &dest, unsigned i0, unsigned j0, unsigned k0)
 Copy src to window in dest.
template<class T >
void vil3d_copy_deep (const vil3d_image_view< T > &src, vil3d_image_view< T > &dest)
 Deep copy src to dest.
template<class T >
vil3d_image_view< T > vil3d_copy_deep (const vil3d_image_view< T > &src)
 Create a deep copy of an image, with completely new underlying memory.
template<class T >
vil3d_image_view< T > vil3d_decimate (const vil3d_image_view< T > &im, unsigned i_factor, unsigned j_factor=0, unsigned k_factor=0)
 Create a view which is a decimated version of src.
template<class T >
bool vil3d_image_view_deep_equality (const vil3d_image_view< T > &lhs, const vil3d_image_view< T > &rhs)
 True if the actual images are identical.
template<class T >
void vil3d_math_value_range (const vil3d_image_view< T > &im, T &min_value, T &max_value)
 Compute minimum and maximum values over im.
template<class T >
void vil3d_math_value_range_percentile (const vil3d_image_view< T > &im, const double fraction, T &value)
 Compute value corresponding to a percentile of the range of im.
template<class T >
void vil3d_math_value_range_percentiles (const vil3d_image_view< T > &im, const vcl_vector< double > fraction, vcl_vector< T > &value)
 Compute value corresponding to several percentiles of the range of im.
template<class aT , class sumT >
void vil3d_math_mean_over_planes (const vil3d_image_view< aT > &src, vil3d_image_view< sumT > &dest)
 Calc the mean of each pixel over all the planes.
template<class inT , class outT , class sumT >
void vil3d_math_mean_over_planes (const vil3d_image_view< inT > &src, vil3d_image_view< outT > &dest, sumT)
 Calc the mean of each pixel over all the planes.
template<class inT , class outT , class sumT >
void vil3d_math_rms (const vil3d_image_view< inT > &src, vil3d_image_view< outT > &dest, sumT)
 Calculate the rms of each pixel over all the planes.
template<class imT , class sumT >
void vil3d_math_sum (sumT &sum, const vil3d_image_view< imT > &im, unsigned p)
 Compute sum of values in plane p.
template<class imT , class sumT >
void vil3d_math_mean (sumT &mean, const vil3d_image_view< imT > &im, unsigned p)
 Mean of elements in plane p of image.
template<class imT , class sumT >
void vil3d_math_sum_squares (sumT &sum, sumT &sum_sq, const vil3d_image_view< imT > &im, unsigned p)
 Sum of squares of elements in plane p of image.
template<class imT , class offsetT >
void vil3d_math_scale_and_offset_values (vil3d_image_view< imT > &image, double scale, offsetT offset)
 Multiply values in-place in image view by scale and add offset.
template<class imT , class sumT >
void vil3d_math_mean_and_variance (sumT &mean, sumT &var, const vil3d_image_view< imT > &im, unsigned p)
 Mean and variance of elements in plane p of image.
template<class imT , class sumT >
sumT vil3d_math_dot_product (const vil3d_image_view< imT > &imA, const vil3d_image_view< imT > &imB, sumT)
 Mean and variance of elements in plane p of image.
template<class T >
void vil3d_math_truncate_range (vil3d_image_view< T > &image, T min_v, T max_v)
 Truncate each pixel value so it fits into range [min_v,max_v].
template<class T >
vil3d_image_view< T > vil3d_plane (const vil3d_image_view< T > &im, unsigned p)
 Return a view of im's plane p.
template<class T >
void vil3d_print_all (vcl_ostream &os, const vil3d_image_view< T > &view)
 Print all image data to os in a grid (rounds output to int).
template<class T >
vil3d_image_view< T > vil3d_reflect_i (const vil3d_image_view< T > &v)
 Create a reflected view in which i -> ni-1-i.
template<class T >
vil3d_image_view< T > vil3d_reflect_j (const vil3d_image_view< T > &v)
 Create a reflected view in which j -> nj-1-j.
template<class T >
vil3d_image_view< T > vil3d_reflect_k (const vil3d_image_view< T > &v)
 Create a reflected view in which k -> nk-1-k.
template<class imType , class vecType >
void vil3d_sample_profile_trilin (vecType *v, const vil3d_image_view< imType > &image, double x0, double y0, double z0, double dx, double dy, double dz, unsigned n)
 Sample along profile, using trilinear interpolation.
template<class imType , class vecType >
void vil3d_sample_profile_trilin_extend (vecType *v, const vil3d_image_view< imType > &image, double x0, double y0, double z0, double dx, double dy, double dz, unsigned n)
 Sample along profile, using safe-extend trilinear interpolation.
template<class imType , class vecType >
void vil3d_sample_profile_trilin_edgena (vecType *v, const vil3d_image_view< imType > &image, double x0, double y0, double z0, double dx, double dy, double dz, unsigned n)
 Sample along profile, using safe-extend trilinear interpolation.
bool vil3d_save (const vil3d_image_view_base &im, float voxel_width_i, float voxel_width_j, float voxel_width_k, char const *filename)
 Send a vil3d_image_view to disk, deducing format from filename.
bool vil3d_save (const vil3d_image_view_base &, char const *filename)
 Send a vil3d_image_view to disk, deducing format from filename.
bool vil3d_save (const vil3d_image_view_base &, char const *filename, char const *file_format)
 Send a vil3d_image_view to disk, given filename.
template<class T >
vil3d_image_view< T > vil3d_switch_axes_jik (const vil3d_image_view< T > &im)
 Change axes so that result(j,i,k)==im(i,j,k).
template<class T >
vil3d_image_view< T > vil3d_switch_axes_jki (const vil3d_image_view< T > &im)
 Change axes so that result(j,k,i)==im(i,j,k).
template<class T >
vil3d_image_view< T > vil3d_switch_axes_kij (const vil3d_image_view< T > &im)
 Change axes so that result(k,i,j)==im(i,j,k).
template<class T >
vil3d_image_view< T > vil3d_switch_axes_kji (const vil3d_image_view< T > &im)
 Change axes so that result(k,j,i)==im(i,j,k).
template<class T >
vil3d_image_view< T > vil3d_switch_axes_ikj (const vil3d_image_view< T > &im)
 Change axes so that result(i,k,j)==im(i,j,k).

Detailed Description

template<class T>
class vil3d_image_view< T >

Concrete view of image data of type T held in memory.

Views nplanes() planes of data each of size ni() x nj() x nk(). The (i,j,k) element of the p'th plane is given by im.origin_ptr()[i*im.istep() + j*im.jstep()+ k*im.kstep() + p*im.planestep] The actual image data is either allocated by the class (using set_size), in which case it is deleted only when it has no views observing it, or is allocated outside (and is not deleted on destruction). This allows external images to be accessed without a deep copy.

Note that copying one vil3d_image_view<T> to another takes a shallow copy by default - it copies the view, not the raw image data. Use the explicit deep_copy() call to take a deep copy.

Definition at line 35 of file vil3d_image_view.h.


Member Typedef Documentation

template<class T>
typedef T const* vil3d_image_view< T >::const_iterator

Definition at line 132 of file vil3d_image_view.h.

template<class T>
typedef T* vil3d_image_view< T >::iterator

Definition at line 128 of file vil3d_image_view.h.

template<class T>
typedef T vil3d_image_view< T >::pixel_type

The pixel type of this image.

Definition at line 122 of file vil3d_image_view.h.


Constructor & Destructor Documentation

template<class T >
vil3d_image_view< T >::vil3d_image_view ( )

Dflt ctor.

Creates an empty one-plane image.

Definition at line 27 of file vil3d_image_view.txx.

template<class T >
vil3d_image_view< T >::vil3d_image_view ( unsigned  ni,
unsigned  nj,
unsigned  nk,
unsigned  n_planes = 1 
)

Create an n_plane plane image of ni x nj x nk pixels.

Definition at line 32 of file vil3d_image_view.txx.

template<class T>
vil3d_image_view< T >::vil3d_image_view ( const T *  top_left,
unsigned  ni,
unsigned  nj,
unsigned  nk,
unsigned  nplanes,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step,
vcl_ptrdiff_t  k_step,
vcl_ptrdiff_t  plane_step 
)

Set this view to look at someone else's memory data.

If the data goes out of scope then this view could be invalid, and there's no way of knowing until it's too late - so take care!

Definition at line 41 of file vil3d_image_view.txx.

template<class T>
vil3d_image_view< T >::vil3d_image_view ( const vil_memory_chunk_sptr mem_chunk,
const T *  top_left,
unsigned  n_i,
unsigned  n_j,
unsigned  n_k,
unsigned  n_planes,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step,
vcl_ptrdiff_t  k_step,
vcl_ptrdiff_t  plane_step 
)

Set this view to look at another view's data.

Typically used by functions which generate a manipulated view of another's image data. Need to pass the memory chunk to set up the internal smart ptr appropriately

Need to pass the memory chunk to set up the internal smart ptr appropriately

Definition at line 52 of file vil3d_image_view.txx.

template<class T>
vil3d_image_view< T >::vil3d_image_view ( const vil3d_image_view< T > &  im)

Copy construct.

Copy constructor.

The new object will point to the same underlying image as the rhs.

If this view cannot set itself to view the other data (because the pixel formats are incompatible) it will set itself to empty.

Definition at line 81 of file vil3d_image_view.txx.

template<class T>
vil3d_image_view< T >::vil3d_image_view ( const vil3d_image_view_base base_ref)

Create shallow copy of image with given base reference.

Sets to empty image if target is of different pixel type

Definition at line 93 of file vil3d_image_view.txx.

template<class T>
vil3d_image_view< T >::vil3d_image_view ( const vil3d_image_view_base_sptr base_sptr)

Create shallow copy of image with given base reference.

Sets to empty image if target is of different pixel type

Definition at line 102 of file vil3d_image_view.txx.

template<class T >
vil3d_image_view< T >::~vil3d_image_view ( ) [virtual]

Definition at line 177 of file vil3d_image_view.txx.


Member Function Documentation

template<class T>
iterator vil3d_image_view< T >::begin ( ) [inline]

Definition at line 129 of file vil3d_image_view.h.

template<class T>
const_iterator vil3d_image_view< T >::begin ( ) const [inline]

Definition at line 133 of file vil3d_image_view.h.

template<class T>
void vil3d_image_view< T >::clear ( void  ) [inline]

Make empty.

Disconnects view from underlying data.

Definition at line 220 of file vil3d_image_view.h.

template<class T>
void vil3d_image_view< T >::deep_copy ( const vil3d_image_view< T > &  src)

Make a copy of the data in src and set this to view it.

Perform deep copy of the src image, placing in this image.

Definition at line 145 of file vil3d_image_view.txx.

template<class T>
iterator vil3d_image_view< T >::end ( ) [inline]

Definition at line 130 of file vil3d_image_view.h.

template<class T>
const_iterator vil3d_image_view< T >::end ( ) const [inline]

Definition at line 134 of file vil3d_image_view.h.

template<class T>
void vil3d_image_view< T >::fill ( value)

Fill view with given value.

Definition at line 271 of file vil3d_image_view.txx.

template<class T>
virtual vcl_string vil3d_image_view< T >::is_a ( ) const [virtual]

Return class name.

Implements vil3d_image_view_base.

template<class T >
bool vil3d_image_view< T >::is_class ( vcl_string const &  s) const [virtual]

True if this is (or is derived from) class s.

Reimplemented from vil3d_image_view_base.

Definition at line 300 of file vil3d_image_view.txx.

template<class T >
bool vil3d_image_view< T >::is_contiguous ( ) const

True if data all in one unbroken block and origin_ptr() is lowest data address.

Definition at line 192 of file vil3d_image_view.txx.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::istep ( ) const [inline]

Add this to your pixel pointer to get next i pixel.

Note that istep() may well be negative;

Definition at line 147 of file vil3d_image_view.h.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::jstep ( ) const [inline]

Add this to your pixel pointer to get next j pixel.

Note that jstep() may well be negative;

Definition at line 150 of file vil3d_image_view.h.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::kstep ( ) const [inline]

Add this to your pixel pointer to get next k pixel.

Note that kstep() may well be negative;

Definition at line 153 of file vil3d_image_view.h.

template<class T>
const vil_memory_chunk_sptr& vil3d_image_view< T >::memory_chunk ( ) const [inline]

Smart pointer to the object holding the data for this view.

Will be a null pointer if this view looks at `third-party' data, e.g. using set_to_memory.

Typically used when creating new views of the data

Definition at line 174 of file vil3d_image_view.h.

template<class T>
vil_memory_chunk_sptr& vil3d_image_view< T >::memory_chunk ( ) [inline]

Smart pointer to the object holding the data for this view.

Will be a null pointer if this view looks at `third-party' data, e.g. using set_to_memory

Typically used when creating new views of the data

Definition at line 181 of file vil3d_image_view.h.

unsigned vil3d_image_view_base::ni ( void  ) const [inline, inherited]

Width.

Definition at line 51 of file vil3d_image_view_base.h.

unsigned vil3d_image_view_base::nj ( void  ) const [inline, inherited]

Height.

Definition at line 53 of file vil3d_image_view_base.h.

unsigned vil3d_image_view_base::nk ( void  ) const [inline, inherited]

Depth.

Definition at line 55 of file vil3d_image_view_base.h.

unsigned vil3d_image_view_base::nplanes ( void  ) const [inline, inherited]

Number of planes.

Definition at line 57 of file vil3d_image_view_base.h.

template<class T>
vil3d_image_view< T >::operator safe_bool ( ) const [inline]

Cast to bool is true if pointing at some data.

Definition at line 159 of file vil3d_image_view.h.

template<class T>
bool vil3d_image_view< T >::operator! ( ) const [inline]

Return false if pointing at some data.

Definition at line 163 of file vil3d_image_view.h.

template<class T>
bool vil3d_image_view< T >::operator!= ( const vil3d_image_view< T > &  rhs) const [inline]

True if they do not share same view of same image data.

This does not do a deep inequality on image data. If the images point to different image data objects that contain identical images, then the result will still be true.

Definition at line 259 of file vil3d_image_view.h.

template<class T>
const T& vil3d_image_view< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  k 
) const [inline]

Return read-only reference to pixel at (i,j,k) in plane 0.

Definition at line 186 of file vil3d_image_view.h.

template<class T>
T& vil3d_image_view< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  k 
) [inline]

Return read/write reference to pixel at (i,j,k) in plane 0.

Definition at line 191 of file vil3d_image_view.h.

template<class T>
const T& vil3d_image_view< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  k,
unsigned  p 
) const [inline]

Return read-only reference to pixel at (i,j,k) in plane p.

Definition at line 196 of file vil3d_image_view.h.

template<class T>
T& vil3d_image_view< T >::operator() ( unsigned  i,
unsigned  j,
unsigned  k,
unsigned  p 
) [inline]

Return read-only reference to pixel at (i,j,k) in plane p.

Definition at line 201 of file vil3d_image_view.h.

template<class T>
bool vil3d_image_view< T >::operator< ( const vil3d_image_view< T > &  other) const

Provides an ordering.

Useful for ordered containers. There is no guaranteed meaning to the less than operator, except that (a<b && b<a) is false and !(a<b) && !(b<a) is equivalent to a==b

Definition at line 340 of file vil3d_image_view.txx.

template<class T>
bool vil3d_image_view< T >::operator<= ( const vil3d_image_view< T > &  other) const [inline]

Provides an ordering.

Definition at line 274 of file vil3d_image_view.h.

template<class T>
const vil3d_image_view< T > & vil3d_image_view< T >::operator= ( const vil3d_image_view< T > &  rhs)

Copy a view. The rhs and lhs will point to the same image data.

Create shallow copy of image with same type image.

Definition at line 110 of file vil3d_image_view.txx.

template<class T>
const vil3d_image_view< T > & vil3d_image_view< T >::operator= ( const vil3d_image_view_base base_ref)

Create shallow copy of image with given base reference.

Sets to empty image if target is of different pixel type

Definition at line 118 of file vil3d_image_view.txx.

template<class T>
const vil3d_image_view<T>& vil3d_image_view< T >::operator= ( const vil3d_image_view_base_sptr rhs) [inline]

Copy a view. The rhs and lhs will point to the same image data.

If the view types are not compatible this object will be set to empty. If the pointer is null, this object will be set to empty.

Definition at line 107 of file vil3d_image_view.h.

template<class T>
bool vil3d_image_view< T >::operator== ( const vil3d_image_view< T > &  other) const

True if they share same view of same image data.

This does not do a deep equality on image data. If the images point to different image data objects that contain identical images, then the result will still be false.

Definition at line 319 of file vil3d_image_view.txx.

template<class T>
bool vil3d_image_view< T >::operator> ( const vil3d_image_view< T > &  other) const [inline]

Provides an ordering.

Definition at line 271 of file vil3d_image_view.h.

template<class T>
bool vil3d_image_view< T >::operator>= ( const vil3d_image_view< T > &  other) const [inline]

Provides an ordering.

Definition at line 268 of file vil3d_image_view.h.

template<class T>
T* vil3d_image_view< T >::origin_ptr ( ) [inline]

Pointer to the first (top left in plane 0) pixel.

Note that this is not necessarily the lowest data memory address.

Definition at line 140 of file vil3d_image_view.h.

template<class T>
const T* vil3d_image_view< T >::origin_ptr ( ) const [inline]

Pointer to the first (top left in plane 0) pixel.

Note that this is not necessarily the lowest data memory address.

Definition at line 143 of file vil3d_image_view.h.

template<class T>
vil_pixel_format vil3d_image_view< T >::pixel_format ( void  ) const [inline, virtual]

Return a description of the concrete data pixel type.

The value corresponds directly to pixel_type.

Implements vil3d_image_view_base.

Definition at line 247 of file vil3d_image_view.h.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::planestep ( ) const [inline]

Add this to your pixel pointer to get pixel on next plane.

Note that planestep() may well be negative, e.g. with BMP file images

Definition at line 156 of file vil3d_image_view.h.

template<class T >
void vil3d_image_view< T >::print ( vcl_ostream &  os) const [virtual]

Print a 1-line summary of contents.

Implements vil3d_image_view_base.

Definition at line 308 of file vil3d_image_view.txx.

template<class T>
void vil3d_image_view< T >::release_memory ( ) [inline, protected]

Disconnect this view from the underlying data,.

Definition at line 55 of file vil3d_image_view.h.

template<class T >
void vil3d_image_view< T >::set_size ( unsigned  ni,
unsigned  nj,
unsigned  nk 
) [virtual]

resize current planes to ni x nj x nk.

If already correct size, this function returns quickly

Implements vil3d_image_view_base.

Definition at line 185 of file vil3d_image_view.txx.

template<class T >
void vil3d_image_view< T >::set_size ( unsigned  ni,
unsigned  nj,
unsigned  nk,
unsigned  nplanes 
) [virtual]

resize to ni x nj x nk x nplanes.

If already correct size, this function returns quickly

Implements vil3d_image_view_base.

Definition at line 224 of file vil3d_image_view.txx.

template<class T>
void vil3d_image_view< T >::set_to_memory ( const T *  top_left,
unsigned  ni,
unsigned  nj,
unsigned  nk,
unsigned  nplanes,
vcl_ptrdiff_t  i_step,
vcl_ptrdiff_t  j_step,
vcl_ptrdiff_t  k_step,
vcl_ptrdiff_t  plane_step 
)

Set this view to look at someone else's memory data.

Set this view to look at someone else's memory.

If the data goes out of scope then this view could be invalid, and there's no way of knowing until it's too late -- so take care!

Note that though top_left is passed in as const, the data may be manipulated through the view.

Definition at line 249 of file vil3d_image_view.txx.

vcl_size_t vil3d_image_view_base::size ( ) const [inline, inherited]

The number of pixels.

Definition at line 60 of file vil3d_image_view_base.h.

template<class T>
vcl_size_t vil3d_image_view< T >::size_bytes ( ) const [inline]

The number of bytes in the data.

Definition at line 167 of file vil3d_image_view.h.


Friends And Related Function Documentation

template<class T >
void vil3d_clamp ( vil3d_image_view< T > &  src,
vil3d_image_view< T > &  dest,
lo,
hi 
) [related]

Clamp an image view between two values.

Definition at line 18 of file vil3d_clamp.h.

template<class T >
void vil3d_clamp_above ( vil3d_image_view< T > &  src,
t,
v 
) [related]

Clamp an image view below a given value t, setting it to v if above or on t.

Definition at line 71 of file vil3d_clamp.h.

template<class T >
void vil3d_clamp_above ( vil3d_image_view< T > &  src,
t 
) [related]

Clamp an image view below a given value t, setting it to this t if above t.

Definition at line 96 of file vil3d_clamp.h.

template<class T >
void vil3d_clamp_below ( vil3d_image_view< T > &  src,
t,
v 
) [related]

Clamp an image view above a given value t, setting it to v if below or on t.

Definition at line 38 of file vil3d_clamp.h.

template<class T >
void vil3d_clamp_below ( vil3d_image_view< T > &  src,
t 
) [related]

Clamp an image view above a given value t, setting it to this t if below t.

Definition at line 63 of file vil3d_clamp.h.

template<class inP , class outP >
void vil3d_convert_cast ( const vil3d_image_view< inP > &  src,
vil3d_image_view< outP > &  dest 
) [related]

Cast one pixel type to another.

There must be a cast operator from inP to outP

If the two pixel types are the same, the destination may only be a shallow copy of the source.

Definition at line 74 of file vil3d_convert.h.

template<class inP , class outP >
void vil3d_convert_round ( const vil3d_image_view< inP > &  src,
vil3d_image_view< outP > &  dest 
) [related]

Convert one pixel type to another with rounding.

This should only be used to convert scalar pixel types to other scalar pixel types, or RGBs to RGBs. This function only rounds in terms of the destination type.

If the two pixel types are the same, the destination may only be a shallow copy of the source.

Definition at line 93 of file vil3d_convert.h.

template<class T >
void vil3d_convert_stretch_range ( const vil3d_image_view< T > &  src,
vil3d_image_view< vxl_byte > &  dest 
) [related]

Convert src to byte image dest by stretching to range [0,255].

Definition at line 106 of file vil3d_convert.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil3d_convolve_1d ( const vil3d_image_view< srcT > &  src_im,
vil3d_image_view< destT > &  dest_im,
const kernelT *  kernel,
vcl_ptrdiff_t  k_lo,
vcl_ptrdiff_t  k_hi,
accumT  ac,
enum vil_convolve_boundary_option  start_option,
enum vil_convolve_boundary_option  end_option 
) [related]

Convolve kernel[i] (i in [k_lo,k_hi]) with srcT in i-direction.

On exit dest_im(i,j) = sum src_m(i-x,j)*kernel(x) (x=k_lo..k_hi)

Note:
This function reverses the kernel. If you don't want the kernel reversed, use vil_correlate_1d instead. The kernel must not be larger than src_im.ni()
Parameters:
kernelshould point to tap 0.
dest_imwill be resized to size of src_im.

If you want to convolve in all three directions, use the following approach: verbatim vil3d_convolve_1d( src, smoothed1, ... );

vil3d_convolve_1d(vil3d_switch_axes_jki(smoothed1), smoothed2, ... ); smoothed2_im = vil3d_switch_axes_kij(smoothed2);

vil3d_convolve_1d(vil3d_switch_axes_kij(smoothed2), smoothed3, ... ); smoothed3_im = vil3d_switch_axes_jki(smoothed3);

Definition at line 41 of file vil3d_convolve_1d.h.

template<class T >
void vil3d_copy_deep ( const vil3d_image_view< T > &  src,
vil3d_image_view< T > &  dest 
) [related]

Deep copy src to dest.

O(size).

template<class T >
vil3d_image_view< T > vil3d_copy_deep ( const vil3d_image_view< T > &  src) [related]

Create a deep copy of an image, with completely new underlying memory.

O(size).

template<class T >
void vil3d_copy_reformat ( const vil3d_image_view< T > &  src,
vil3d_image_view< T > &  dest 
) [related]

Copy src to dest, without changing dest's view parameters.

This is useful if you want to copy on image into a window on another image. src and dest must have identical sizes, and types. O(size).

template<class T >
void vil3d_copy_to_window ( const vil3d_image_view< T > &  src,
vil3d_image_view< T > &  dest,
unsigned  i0,
unsigned  j0,
unsigned  k0 
) [related]

Copy src to window in dest.

Size of window is defined by src. O(src.size).

template<class T >
vil3d_image_view< T > vil3d_decimate ( const vil3d_image_view< T > &  im,
unsigned  i_factor,
unsigned  j_factor = 0,
unsigned  k_factor = 0 
) [related]

Create a view which is a decimated version of src.

Doesn't modify underlying data. O(1).

The factor describes the number of input rows (or columns) that are equivalent to one output. If you don't specify the j_factor or k_factor, they will be set equal to i_factor.

Definition at line 21 of file vil3d_decimate.h.

template<class srcT , class destT >
void vil3d_grad_1x3 ( const vil3d_image_view< srcT > &  src,
vil3d_image_view< destT > &  grad_i,
vil3d_image_view< destT > &  grad_j,
vil3d_image_view< destT > &  grad_k 
) [related]

Compute gradients of an image using (-0.5 0 0.5) Sobel filters.

Computes both i,j and k gradients of an ni x nj x nk plane of data 1 pixel border around grad images is set to zero

template<class srcT , class destT >
void vil3d_grad_1x3 ( const vil3d_image_view< srcT > &  src,
vil3d_image_view< destT > &  grad_ijk 
) [related]

Compute gradients of an image using (-0.5 0 0.5) filters.

Computes both i,j and k gradients of an image. grad_ijk has three times as many planes as src, with dest plane (3i) being the i-gradient of source plane i and dest plane (3i+1) being the j-gradient etc 1 pixel border around grad images is set to zero

template<class T >
bool vil3d_image_view_deep_equality ( const vil3d_image_view< T > &  lhs,
const vil3d_image_view< T > &  rhs 
) [related]

True if the actual images are identical.

$\bigwedge_{i,j,k,p} {\textstyle src}(i,j,k,p) == {\textstyle dest}(i,j,k,p)$ The data may be formatted differently in each memory chunk. O(size).

Definition at line 362 of file vil3d_image_view.txx.

template<class imT , class sumT >
sumT vil3d_math_dot_product ( const vil3d_image_view< imT > &  imA,
const vil3d_image_view< imT > &  imB,
sumT   
) [related]

Mean and variance of elements in plane p of image.

Definition at line 353 of file vil3d_math.h.

template<class imT , class sumT >
void vil3d_math_mean ( sumT &  mean,
const vil3d_image_view< imT > &  im,
unsigned  p 
) [related]

Mean of elements in plane p of image.

Definition at line 244 of file vil3d_math.h.

template<class imT , class sumT >
void vil3d_math_mean_and_variance ( sumT &  mean,
sumT &  var,
const vil3d_image_view< imT > &  im,
unsigned  p 
) [related]

Mean and variance of elements in plane p of image.

Definition at line 338 of file vil3d_math.h.

template<class aT , class sumT >
void vil3d_math_mean_over_planes ( const vil3d_image_view< aT > &  src,
vil3d_image_view< sumT > &  dest 
) [related]

Calc the mean of each pixel over all the planes.

Definition at line 156 of file vil3d_math.h.

template<class inT , class outT , class sumT >
void vil3d_math_mean_over_planes ( const vil3d_image_view< inT > &  src,
vil3d_image_view< outT > &  dest,
sumT   
) [related]

Calc the mean of each pixel over all the planes.

Definition at line 174 of file vil3d_math.h.

template<class inT , class outT , class sumT >
void vil3d_math_rms ( const vil3d_image_view< inT > &  src,
vil3d_image_view< outT > &  dest,
sumT   
) [related]

Calculate the rms of each pixel over all the planes.

Definition at line 193 of file vil3d_math.h.

template<class imT , class offsetT >
void vil3d_math_scale_and_offset_values ( vil3d_image_view< imT > &  image,
double  scale,
offsetT  offset 
) [related]

Multiply values in-place in image view by scale and add offset.

Definition at line 310 of file vil3d_math.h.

template<class imT , class sumT >
void vil3d_math_sum ( sumT &  sum,
const vil3d_image_view< imT > &  im,
unsigned  p 
) [related]

Compute sum of values in plane p.

Definition at line 213 of file vil3d_math.h.

template<class imT , class sumT >
void vil3d_math_sum_squares ( sumT &  sum,
sumT &  sum_sq,
const vil3d_image_view< imT > &  im,
unsigned  p 
) [related]

Sum of squares of elements in plane p of image.

Definition at line 256 of file vil3d_math.h.

template<class T >
void vil3d_math_truncate_range ( vil3d_image_view< T > &  image,
min_v,
max_v 
) [related]

Truncate each pixel value so it fits into range [min_v,max_v].

If value < min_v value=min_v If value > max_v value=max_v

Definition at line 525 of file vil3d_math.h.

template<class T >
void vil3d_math_value_range ( const vil3d_image_view< T > &  im,
T &  min_value,
T &  max_value 
) [related]

Compute minimum and maximum values over im.

Definition at line 20 of file vil3d_math.h.

template<class T >
void vil3d_math_value_range_percentile ( const vil3d_image_view< T > &  im,
const double  fraction,
T &  value 
) [related]

Compute value corresponding to a percentile of the range of im.

Percentiles expressed as fraction, e.g. 0.05, or 0.95.

Parameters:
imThe image to examine.
fractionThe fraction of the data range (from the lower end).
Return values:
valueThe image data value corresponding to the specified percentile.
Note:
This function requires the sorting of large parts of the image data and can be very expensive in terms of both processing and memory.
See also:
vil3d_math_value_range_percentiles()

Definition at line 70 of file vil3d_math.h.

template<class T >
void vil3d_math_value_range_percentiles ( const vil3d_image_view< T > &  im,
const vcl_vector< double >  fraction,
vcl_vector< T > &  value 
) [related]

Compute value corresponding to several percentiles of the range of im.

Percentiles expressed as fraction, e.g. 0.05, or 0.95.

Parameters:
imThe image to examine.
fractionThe fraction of the data range (from the lower end).
Return values:
valueThe image data value corresponding to the specified percentiles.
Note:
This function requires the sorting of large parts of the image data and can be very expensive in terms of both processing and memory.

Definition at line 91 of file vil3d_math.h.

template<class srcT , class destT , class kernelT , class accumT >
void vil3d_normalised_correlation_3d ( const vil3d_image_view< srcT > &  src_im,
vil3d_image_view< destT > &  dest_im,
const vil3d_image_view< kernelT > &  kernel,
accumT  ac 
) [related]

Normalised cross-correlation of (pre-normalised) kernel with srcT.

Each dimension of dest is resized to (1+src_im.nX()-kernel.nX()) (a one plane image). On exit dest(x,y,z) = sum_ijk src_im(x+i,y+j,y+k)*kernel(i,j,k)/sd_under_region

Assumes that the kernel has been normalised to have zero mean and unit variance

Definition at line 79 of file vil3d_normalised_correlation_3d.h.

template<class T >
vil3d_image_view< T > vil3d_plane ( const vil3d_image_view< T > &  im,
unsigned  p 
) [related]

Return a view of im's plane p.

O(1).

Definition at line 19 of file vil3d_plane.h.

template<class T >
void vil3d_print_all ( vcl_ostream &  os,
const vil3d_image_view< T > &  view 
) [related]

Print all image data to os in a grid (rounds output to int).

Definition at line 23 of file vil3d_print.h.

template<class T >
vil3d_image_view< T > vil3d_reflect_i ( const vil3d_image_view< T > &  v) [related]

Create a reflected view in which i -> ni-1-i.

i.e. vil3d_reflect_i(view)(i, j, k, p) = view(ni-1-i, j, k, p) O(1).

Definition at line 21 of file vil3d_reflect.h.

template<class T >
vil3d_image_view< T > vil3d_reflect_j ( const vil3d_image_view< T > &  v) [related]

Create a reflected view in which j -> nj-1-j.

i.e. vil3d_reflect_j(view)(i, j, k, p) = view(i, nj-1-j, k, p) O(1).

Definition at line 35 of file vil3d_reflect.h.

template<class T >
vil3d_image_view< T > vil3d_reflect_k ( const vil3d_image_view< T > &  v) [related]

Create a reflected view in which k -> nk-1-k.

i.e. vil3d_reflect_k(view)(i, j, k, p) = view(i, j, nk-1-k, p) O(1).

Definition at line 49 of file vil3d_reflect.h.

template<class imType , class vecType >
void vil3d_sample_profile_trilin ( vecType *  v,
const vil3d_image_view< imType > &  image,
double  x0,
double  y0,
double  z0,
double  dx,
double  dy,
double  dz,
unsigned  n 
) [related]

Sample along profile, using trilinear interpolation.

Profile points are (x0+i.dx,y0+i.dy,z0+i.dz), where i=[0..n-1]. Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents() v[0]..v[np-1] are the values from point (x0,y0,z0) Points outside image return zero.

template<class imType , class vecType >
void vil3d_sample_profile_trilin_edgena ( vecType *  v,
const vil3d_image_view< imType > &  image,
double  x0,
double  y0,
double  z0,
double  dx,
double  dy,
double  dz,
unsigned  n 
) [related]

Sample along profile, using safe-extend trilinear interpolation.

Profile points are along the line between p0 and p1 (in image co-ordinates). Vector v is resized to n*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Points outside image return NA.

template<class imType , class vecType >
void vil3d_sample_profile_trilin_extend ( vecType *  v,
const vil3d_image_view< imType > &  image,
double  x0,
double  y0,
double  z0,
double  dx,
double  dy,
double  dz,
unsigned  n 
) [related]

Sample along profile, using safe-extend trilinear interpolation.

Profile points are along the line between p0 and p1 (in image co-ordinates). Vector v is resized to n*np elements, where np=image.n_planes(). v[0]..v[np-1] are the values from point p Points outside image return nearest valid voxel value.

template<class T>
bool vil3d_save ( const vil3d_image_view_base ,
char const *  filename 
) [related]

Send a vil3d_image_view to disk, deducing format from filename.

Definition at line 91 of file vil3d_save.cxx.

template<class T>
bool vil3d_save ( const vil3d_image_view_base ,
char const *  filename,
char const *  file_format 
) [related]

Send a vil3d_image_view to disk, given filename.

Definition at line 24 of file vil3d_save.cxx.

template<class T>
bool vil3d_save ( const vil3d_image_view_base im,
float  voxel_width_i,
float  voxel_width_j,
float  voxel_width_k,
char const *  filename 
) [related]

Send a vil3d_image_view to disk, deducing format from filename.

Utility function, allowing definition of voxel widths in header info.

Definition at line 119 of file vil3d_save.cxx.

template<class srcT >
void vil3d_suppress_non_max_edges ( const vil3d_image_view< srcT > &  world_grad,
const vil3d_image_view< srcT > &  grad_mag,
double  voxel_width_i,
double  voxel_width_j,
double  voxel_width_k,
srcT  grad_mag_threshold,
vil3d_image_view< srcT > &  max_grad_mag 
) [related]

Given gradient images, computes magnitude image containing maximal edges.

Points with gradient magnitude above a threshold are tested against gradient along normal to the edge and retained only if they are higher than their neighbours.

Gradient images are assumed to be in units of (intensity change) per world unit. (ie the output of vil3d_world_gradients)

Note: Currently assumes single plane only. 2 pixel border around output set to zero. If two neighbouring edges have exactly the same strength, it retains both (ie an edge is eliminated if it is strictly lower than a neighbour, but not if it is the same as two neighbours).

Points with magnitude above a threshold are tested against gradient along normal to the edge and retained only if they are higher than their neighbours.

Gradient images are assumed to be in units of (intensity change) per world unit. (ie the output of vil3d_world_gradients)

Note: Currently assumes single plane only. 2 pixel border around output set to zero. If two neighbouring edges have exactly the same strength, it retains both (ie an edge is eliminated if it is strictly lower than a neighbour, but not if it is the same as two neighbours).

Definition at line 32 of file vil3d_suppress_non_max_edges.txx.

template<class T >
vil3d_image_view< T > vil3d_switch_axes_ikj ( const vil3d_image_view< T > &  im) [related]

Change axes so that result(i,k,j)==im(i,j,k).

Definition at line 55 of file vil3d_switch_axes.h.

template<class T >
vil3d_image_view< T > vil3d_switch_axes_jik ( const vil3d_image_view< T > &  im) [related]

Change axes so that result(j,i,k)==im(i,j,k).

Definition at line 15 of file vil3d_switch_axes.h.

template<class T >
vil3d_image_view< T > vil3d_switch_axes_jki ( const vil3d_image_view< T > &  im) [related]

Change axes so that result(j,k,i)==im(i,j,k).

Definition at line 25 of file vil3d_switch_axes.h.

template<class T >
vil3d_image_view< T > vil3d_switch_axes_kij ( const vil3d_image_view< T > &  im) [related]

Change axes so that result(k,i,j)==im(i,j,k).

Definition at line 35 of file vil3d_switch_axes.h.

template<class T >
vil3d_image_view< T > vil3d_switch_axes_kji ( const vil3d_image_view< T > &  im) [related]

Change axes so that result(k,j,i)==im(i,j,k).

Definition at line 45 of file vil3d_switch_axes.h.

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 
) [related]

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.

template<class srcT , class kernelT , class accumT >
accumT vil_norm_corr_2d_at_pt ( const srcT *  src_im,
vcl_ptrdiff_t  s_istep,
vcl_ptrdiff_t  s_jstep,
vcl_ptrdiff_t  s_kstep,
vcl_ptrdiff_t  s_pstep,
const vil3d_image_view< kernelT > &  kernel,
accumT   
) [related]

Evaluate dot product between kernel and src_im.

Assumes that the kernel has been normalised to have zero mean and unit variance

Definition at line 19 of file vil3d_normalised_correlation_3d.h.


Member Data Documentation

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::istep_ [protected]

Add this to a pixel pointer to move one column left.

Definition at line 43 of file vil3d_image_view.h.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::jstep_ [protected]

Add this to a pixel pointer to move one row down.

Definition at line 45 of file vil3d_image_view.h.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::kstep_ [protected]

Add this to a pixel pointer to move one slice down.

Definition at line 47 of file vil3d_image_view.h.

unsigned vil3d_image_view_base::ni_ [protected, inherited]

Number of columns.

Definition at line 31 of file vil3d_image_view_base.h.

unsigned vil3d_image_view_base::nj_ [protected, inherited]

Number of rasters.

Definition at line 33 of file vil3d_image_view_base.h.

unsigned vil3d_image_view_base::nk_ [protected, inherited]

Number of slices.

Definition at line 35 of file vil3d_image_view_base.h.

unsigned vil3d_image_view_base::nplanes_ [protected, inherited]

Number of planes.

Definition at line 37 of file vil3d_image_view_base.h.

template<class T>
vcl_ptrdiff_t vil3d_image_view< T >::planestep_ [protected]

Add this to a pixel pointer to move one plane back.

Definition at line 49 of file vil3d_image_view.h.

template<class T>
vil_memory_chunk_sptr vil3d_image_view< T >::ptr_ [protected]

Reference to actual image data.

Definition at line 52 of file vil3d_image_view.h.

template<class T>
T* vil3d_image_view< T >::top_left_ [protected]

Pointer to pixel at origin.

Definition at line 41 of file vil3d_image_view.h.

template<class T>
vil3d_image_view< T >::VCL_SAFE_BOOL_DEFINE [private]

Definition at line 38 of file vil3d_image_view.h.


The documentation for this class was generated from the following files: