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

vimt_image_pyramid_builder.h

Go to the documentation of this file.
00001 // This is mul/vimt/vimt_image_pyramid_builder.h
00002 #ifndef vimt_image_pyramid_builder_h_
00003 #define vimt_image_pyramid_builder_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 //  \file
00009 //  \brief Base class for objects which build image pyramids.
00010 //  \author Tim Cootes
00011 
00012 #include <vsl/vsl_binary_io.h>
00013 #include <vcl_string.h>
00014 
00015 class vimt_image;
00016 class vimt_image_pyramid;
00017 
00018 //: Base class for objects which build image pyramids
00019 class vimt_image_pyramid_builder
00020 {
00021  public:
00022 
00023     //: Dflt ctor
00024     vimt_image_pyramid_builder();
00025 
00026     //: Destructor
00027     virtual ~vimt_image_pyramid_builder();
00028 
00029     //: Create new (empty) pyramid on heap
00030     //  Caller responsible for its deletion
00031     virtual vimt_image_pyramid* new_image_pyramid() const =0;
00032 
00033     //: Define maximum number of levels to build
00034     //  Limits levels built in subsequent calls to build()
00035     //  Useful efficiency measure.  As build() only takes
00036     //  a shallow copy of the original image, using
00037     //  max_l=1 avoids any copying or smoothing.
00038     virtual void set_max_levels(int max_l) =0;
00039 
00040     //: Get the current maximum number levels allowed
00041     virtual int max_levels() const =0;
00042 
00043     //: Build pyramid
00044     virtual void build(vimt_image_pyramid&, const vimt_image&) const = 0;
00045 
00046     //: Extend pyramid
00047     // The first layer of the pyramid must already be set.
00048     virtual void extend(vimt_image_pyramid&) const = 0;
00049 
00050     //: Scale step between levels
00051     virtual double scale_step() const = 0;
00052 
00053     //: Version number for I/O
00054     short version_no() const;
00055 
00056     //: Name of the class
00057     virtual vcl_string is_a() const;
00058 
00059     //: Does the name of the class match the argument?
00060     virtual bool is_class(vcl_string const& s) const;
00061 
00062     //: Create a copy on the heap and return base class pointer
00063     virtual vimt_image_pyramid_builder* clone() const = 0;
00064 
00065     //: Print class to os
00066     virtual void print_summary(vcl_ostream& os) const = 0;
00067 
00068     //: Save class to binary file stream
00069     virtual void b_write(vsl_b_ostream& bfs) const = 0;
00070 
00071     //: Load class from binary file stream
00072     virtual void b_read(vsl_b_istream& bfs) = 0;
00073 };
00074 
00075 //: Allows derived class to be loaded by base-class pointer
00076 //  A loader object exists which is invoked by calls
00077 //  of the form "vsl_b_read(bfs,base_ptr);".  This loads derived class
00078 //  objects from the disk, places them on the heap and
00079 //  returns a base class pointer.
00080 //  In order to work the loader object requires
00081 //  an instance of each derived class that might be
00082 //  found.  This function gives the model class to
00083 //  the appropriate loader.
00084 void vsl_add_to_binary_loader(const vimt_image_pyramid_builder& b);
00085 
00086 //: Binary file stream output operator for class reference
00087 void vsl_b_write(vsl_b_ostream& bfs, const vimt_image_pyramid_builder& b);
00088 
00089 //: Binary file stream input operator for class reference
00090 void vsl_b_read(vsl_b_istream& bfs, vimt_image_pyramid_builder& b);
00091 
00092 //: Stream output operator for class reference
00093 vcl_ostream& operator<<(vcl_ostream& os,const vimt_image_pyramid_builder& b);
00094 
00095 //: Stream output operator for class pointer
00096 vcl_ostream& operator<<(vcl_ostream& os,const vimt_image_pyramid_builder* b);
00097 
00098 #endif // vimt_image_pyramid_builder_h_

Generated on Thu Jan 10 14:43:58 2008 for contrib/mul/vimt by  doxygen 1.4.4