Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vimt_scale_pyramid_builder_2d< T > Class Template Reference

#include <vimt_scale_pyramid_builder_2d.h>

Inheritance diagram for vimt_scale_pyramid_builder_2d< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class T>
class vimt_scale_pyramid_builder_2d< T >

Build pyramids of vimt_image_2d_of<vxl_byte> at any scale step.

Definition at line 15 of file vimt_scale_pyramid_builder_2d.h.

Public Member Functions

void set_min_size (unsigned X, unsigned Y)
 Set the minimum size of the top layer of the pyramid.
virtual vimt_image_pyramidnew_image_pyramid () const
 Create new (empty) pyramid on heap.
virtual void set_max_levels (int max_l)
 Define maximum number of levels to build.
virtual int max_levels () const
 Get the current maximum number levels allowed.
virtual void build (vimt_image_pyramid &im_pyr, const vimt_image &im) const
 Build pyramid.
 vimt_scale_pyramid_builder_2d ()
 Dflt ctor.
 vimt_scale_pyramid_builder_2d (double scale_step)
 Construct with given scale_step.
 ~vimt_scale_pyramid_builder_2d ()
 Destructor.
virtual double scale_step () const
 get the current scale step;.
void set_scale_step (double scale_step)
 Set the Scale step.
void scale_reduce (vimt_image_2d_of< T > &dest_im, vimt_image_2d_of< T >const &src_im) const
 Smooth and subsample src_im to produce dest_im.
virtual void extend (vimt_image_pyramid &image_pyr) const
 Extend pyramid.
void scale_reduce (T *dest_im, vcl_ptrdiff_t dest_ystep, const T *src_im, int src_nx, int src_ny, int dest_nx, int dest_ny, vcl_ptrdiff_t src_istep, vcl_ptrdiff_t src_jstep) const
 Smooth and subsample src_im to produce dest_im.
vimt_image_pyramid_builderclone () const
 Create a copy on the heap and return base class pointer.
short version_no () const
 Version number for I/O.
virtual vcl_string is_a () const
 Name of the class.
virtual bool is_class (vcl_string const &s) const
 Does the name of the class match the argument?.
virtual void print_summary (vcl_ostream &) const
 Print class to os.
virtual void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.

Private Member Functions

void checkPyr (vimt_image_pyramid &im_pyr, int n_levels) const
 Checks pyramid has at least n levels of correct type.
void emptyPyr (vimt_image_pyramid &im_pyr) const
 Deletes all data in im_pyr.

Private Attributes

unsigned min_x_size_
 Minimum size in X direction of top layer of pyramid.
unsigned min_y_size_
 Minimum size in Y direction of top layer of pyramid.
unsigned max_levels_
 Maximum levels.
double scale_step_
 The current scale step between pyramid levels.


Constructor & Destructor Documentation

template<class T>
vimt_scale_pyramid_builder_2d< T >::vimt_scale_pyramid_builder_2d  ) 
 

Dflt ctor.

Definition at line 24 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
vimt_scale_pyramid_builder_2d< T >::vimt_scale_pyramid_builder_2d double  scale_step  ) 
 

Construct with given scale_step.

Definition at line 33 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
vimt_scale_pyramid_builder_2d< T >::~vimt_scale_pyramid_builder_2d  ) 
 

Destructor.

Definition at line 41 of file vimt_scale_pyramid_builder_2d.txx.


Member Function Documentation

template<class T>
void vimt_scale_pyramid_builder_2d< T >::b_read vsl_b_istream bfs  )  [virtual]
 

Load class from binary file stream.

Implements vimt_image_pyramid_builder.

Definition at line 380 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::b_write vsl_b_ostream bfs  )  const [virtual]
 

Save class to binary file stream.

Implements vimt_image_pyramid_builder.

Definition at line 371 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::build vimt_image_pyramid im_pyr,
const vimt_image im
const [virtual]
 

Build pyramid.

Implements vimt_image_pyramid_builder.

Definition at line 192 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::checkPyr vimt_image_pyramid im_pyr,
int  n_levels
const [private]
 

Checks pyramid has at least n levels of correct type.

Definition at line 167 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
vimt_image_pyramid_builder * vimt_scale_pyramid_builder_2d< T >::clone  )  const [virtual]
 

Create a copy on the heap and return base class pointer.

Implements vimt_image_pyramid_builder.

Definition at line 355 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::emptyPyr vimt_image_pyramid im_pyr  )  const [private]
 

Deletes all data in im_pyr.

Definition at line 158 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::extend vimt_image_pyramid image_pyr  )  const [virtual]
 

Extend pyramid.

The first layer of the pyramid must already be set.

Implements vimt_image_pyramid_builder.

Definition at line 253 of file vimt_scale_pyramid_builder_2d.txx.

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

Name of the class.

Reimplemented from vimt_image_pyramid_builder.

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

Does the name of the class match the argument?.

Reimplemented from vimt_image_pyramid_builder.

Definition at line 339 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
int vimt_scale_pyramid_builder_2d< T >::max_levels  )  const [virtual]
 

Get the current maximum number levels allowed.

Implements vimt_image_pyramid_builder.

Definition at line 311 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
vimt_image_pyramid * vimt_scale_pyramid_builder_2d< T >::new_image_pyramid  )  const [virtual]
 

Create new (empty) pyramid on heap.

Caller responsible for its deletion

Implements vimt_image_pyramid_builder.

Definition at line 321 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::print_summary vcl_ostream &   )  const [virtual]
 

Print class to os.

Implements vimt_image_pyramid_builder.

Definition at line 363 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::scale_reduce T *  dest_im,
vcl_ptrdiff_t  dest_ystep,
const T *  src_im,
int  src_nx,
int  src_ny,
int  dest_nx,
int  dest_ny,
vcl_ptrdiff_t  src_istep,
vcl_ptrdiff_t  src_jstep
const
 

Smooth and subsample src_im to produce dest_im.

Applies 5 element FIR filter in x and y, then samples Assumes dest_im has sufficient data allocated

Definition at line 121 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::scale_reduce vimt_image_2d_of< T > &  dest_im,
vimt_image_2d_of< T >const &  src_im
const
 

Smooth and subsample src_im to produce dest_im.

Applies an appropriate filter in x and y, then sub-samples at the chosen scaleStep;

Definition at line 46 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
virtual double vimt_scale_pyramid_builder_2d< T >::scale_step  )  const [inline, virtual]
 

get the current scale step;.

Implements vimt_image_pyramid_builder.

Definition at line 67 of file vimt_scale_pyramid_builder_2d.h.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::set_max_levels int  max_l  )  [virtual]
 

Define maximum number of levels to build.

Limits levels built in subsequent calls to build() Useful efficiency measure. As build() only takes a shallow copy of the original image, using max_l=1 avoids any copying or smoothing.

Implements vimt_image_pyramid_builder.

Definition at line 298 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::set_min_size unsigned  X,
unsigned  Y
[inline]
 

Set the minimum size of the top layer of the pyramid.

Definition at line 38 of file vimt_scale_pyramid_builder_2d.h.

template<class T>
void vimt_scale_pyramid_builder_2d< T >::set_scale_step double  scale_step  ) 
 

Set the Scale step.

Definition at line 148 of file vimt_scale_pyramid_builder_2d.txx.

template<class T>
short vimt_scale_pyramid_builder_2d< T >::version_no  )  const
 

Version number for I/O.

Reimplemented from vimt_image_pyramid_builder.

Definition at line 347 of file vimt_scale_pyramid_builder_2d.txx.


Member Data Documentation

template<class T>
unsigned vimt_scale_pyramid_builder_2d< T >::max_levels_ [private]
 

Maximum levels.

Definition at line 24 of file vimt_scale_pyramid_builder_2d.h.

template<class T>
unsigned vimt_scale_pyramid_builder_2d< T >::min_x_size_ [private]
 

Minimum size in X direction of top layer of pyramid.

Definition at line 18 of file vimt_scale_pyramid_builder_2d.h.

template<class T>
unsigned vimt_scale_pyramid_builder_2d< T >::min_y_size_ [private]
 

Minimum size in Y direction of top layer of pyramid.

Definition at line 21 of file vimt_scale_pyramid_builder_2d.h.

template<class T>
double vimt_scale_pyramid_builder_2d< T >::scale_step_ [private]
 

The current scale step between pyramid levels.

Definition at line 33 of file vimt_scale_pyramid_builder_2d.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:44:00 2008 for contrib/mul/vimt by  doxygen 1.4.4