vil3d_image_view< T > Class Template Reference

#include <vil3d_image_view.h>

Inheritance diagram for vil3d_image_view< T >:

vil3d_image_view_base List of all members.

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.


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.
unsigned 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.
unsigned long 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.)

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.
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.
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.
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.
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.
void vil3d_clamp (vil3d_image_view< T > &src, vil3d_image_view< T > &dest, T lo, T hi)
 Clamp an image view between two values.
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.
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.
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.
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.
void vil3d_convert_cast (const vil3d_image_view< inP > &src, vil3d_image_view< outP > &dest)
 Cast one pixel type to another (with rounding).
void vil3d_convert_round (const vil3d_image_view< inP > &src, vil3d_image_view< outP > &dest)
 Convert one pixel type to another with rounding.
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].
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.
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.
void vil3d_copy_deep (const vil3d_image_view< T > &src, vil3d_image_view< T > &dest)
 Deep copy src to dest.
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.
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.
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.
void vil3d_math_value_range (const vil3d_image_view< T > &im, T &min_value, T &max_value)
 Compute minimum and maximum values over im.
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.
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.
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.
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.
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.
void vil3d_math_sum (sumT &sum, const vil3d_image_view< imT > &im, unsigned p)
 Compute sum of values in plane p.
void vil3d_math_mean (sumT &mean, const vil3d_image_view< imT > &im, unsigned p)
 Mean of elements in plane p of image.
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.
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.
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.
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.
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].
vil3d_image_view< T > vil3d_plane (const vil3d_image_view< T > &im, unsigned p)
 Return a view of im's plane p.
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).
vil3d_image_view< T > vil3d_reflect_i (const vil3d_image_view< T > &v)
 Create a reflected view in which i -> ni-1-i.
vil3d_image_view< T > vil3d_reflect_j (const vil3d_image_view< T > &v)
 Create a reflected view in which j -> nj-1-j.
vil3d_image_view< T > vil3d_reflect_k (const vil3d_image_view< T > &v)
 Create a reflected view in which k -> nk-1-k.
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.
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.
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.
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).
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).
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).
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).
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).

Member Typedef Documentation

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.

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 const* vil3d_image_view< T >::const_iterator

Definition at line 132 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 its 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  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.

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

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 > &  rhs  ) 

Copy construct.

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

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>
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>
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.

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 >::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>
iterator vil3d_image_view< T >::begin (  )  [inline]

Definition at line 129 of file vil3d_image_view.h.

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 >::begin (  )  const [inline]

Definition at line 133 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>
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>
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>
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>
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>
unsigned 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.

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.

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>
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 >::deep_copy ( const vil3d_image_view< T > &  src  ) 

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

Definition at line 145 of file vil3d_image_view.txx.

template<class T>
void vil3d_image_view< T >::clear (  )  [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 >::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.

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.

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>
void vil3d_image_view< T >::print ( vcl_ostream &   )  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>
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>
vil_pixel_format vil3d_image_view< T >::pixel_format (  )  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>
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 > &  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>
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 268 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 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 274 of file vil3d_image_view.h.

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

Width.

Definition at line 50 of file vil3d_image_view_base.h.

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

Height.

Definition at line 52 of file vil3d_image_view_base.h.

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

Depth.

Definition at line 54 of file vil3d_image_view_base.h.

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

Number of planes.

Definition at line 56 of file vil3d_image_view_base.h.

unsigned long vil3d_image_view_base::size (  )  const [inline, inherited]

The number of pixels.

Definition at line 59 of file vil3d_image_view_base.h.


Friends And Related Function Documentation