00001 // This is mul/vimt/vimt_image_pyramid_builder.cxx 00002 #include "vimt_image_pyramid_builder.h" 00003 //: 00004 // \file 00005 // \brief Class to load and save images from named files 00006 // \author Tim Cootes 00007 00008 #include <vsl/vsl_indent.h> 00009 #include <vsl/vsl_binary_loader.h> 00010 00011 //======================================================================= 00012 00013 vimt_image_pyramid_builder::vimt_image_pyramid_builder() 00014 { 00015 } 00016 00017 //======================================================================= 00018 00019 vimt_image_pyramid_builder::~vimt_image_pyramid_builder() 00020 { 00021 } 00022 00023 //======================================================================= 00024 00025 short vimt_image_pyramid_builder::version_no() const 00026 { 00027 return 1; 00028 } 00029 00030 //======================================================================= 00031 00032 void vsl_add_to_binary_loader(const vimt_image_pyramid_builder& b) 00033 { 00034 vsl_binary_loader<vimt_image_pyramid_builder>::instance().add(b); 00035 } 00036 00037 //======================================================================= 00038 00039 vcl_string vimt_image_pyramid_builder::is_a() const 00040 { 00041 return vcl_string("vimt_image_pyramid_builder"); 00042 } 00043 00044 //======================================================================= 00045 00046 bool vimt_image_pyramid_builder::is_class(vcl_string const& s) const 00047 { 00048 return s==vimt_image_pyramid_builder::is_a(); 00049 } 00050 00051 //======================================================================= 00052 00053 void vsl_b_write(vsl_b_ostream& bfs, const vimt_image_pyramid_builder& b) 00054 { 00055 b.b_write(bfs); 00056 } 00057 00058 //======================================================================= 00059 00060 void vsl_b_read(vsl_b_istream& bfs, vimt_image_pyramid_builder& b) 00061 { 00062 b.b_read(bfs); 00063 } 00064 00065 //======================================================================= 00066 00067 vcl_ostream& operator<<(vcl_ostream& os,const vimt_image_pyramid_builder& b) 00068 { 00069 os << b.is_a() << ": "; 00070 vsl_indent_inc(os); 00071 b.print_summary(os); 00072 vsl_indent_dec(os); 00073 return os; 00074 } 00075 00076 //======================================================================= 00077 00078 vcl_ostream& operator<<(vcl_ostream& os,const vimt_image_pyramid_builder* b) 00079 { 00080 if (b) 00081 return os << *b; 00082 else 00083 return os << "No vimt_image_pyramid_builder defined."; 00084 }