core/vil/vil_load.h
Go to the documentation of this file.
00001 // This is core/vil/vil_load.h
00002 #ifndef vil_load_h_
00003 #define vil_load_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief read an image from a file
00010 //
00011 // vil_load returns a pointer to the base class of a vil_image_view object.
00012 // You can then cast, or assign it to the appropriate type. You must not forget to
00013 // delete the created view.
00014 //
00015 // vil_load_image_resource() returns a smart pointer to vil_image_resource which
00016 // will "read an image from a file". In practice
00017 // it may or may not read the image on creation, but a disk read will take place at
00018 // some point before get_view() returns.
00019 //
00020 // \author awf@robots.ox.ac.uk
00021 //
00022 // \verbatim
00023 //  Modifications
00024 //     011002 Peter Vanroose - vil_load now respects top-is-first; vil_load_raw not
00025 //     24 Sep 2002 Ian Scott - converted to vil
00026 //\endverbatim
00027 
00028 #include <vil/vil_fwd.h>
00029 #include <vil/vil_image_resource.h>
00030 #include <vil/vil_pyramid_image_resource.h>
00031 #include <vxl_config.h>
00032 
00033 //: Load an image resource object from a file.
00034 // \relatesalso vil_image_resource
00035 vil_image_resource_sptr vil_load_image_resource(char const* filename,
00036                                                 bool verbose = true);
00037 
00038 //: Load from a stream.
00039 // Won't use plugins.
00040 // \relatesalso vil_image_resource
00041 vil_image_resource_sptr vil_load_image_resource_raw(vil_stream *,
00042                                                     bool verbose = true);
00043 
00044 //: Load an image resource object from a file.
00045 // Won't use plugins.
00046 // \relatesalso vil_image_resource
00047 vil_image_resource_sptr vil_load_image_resource_raw(char const*,
00048                                                     bool verbose = true);
00049 
00050 //: Load from a filename with a plugin.
00051 // \relatesalso vil_image_resource
00052 vil_image_resource_sptr vil_load_image_resource_plugin(char const*);
00053 
00054 
00055 //: Load a pyramid image resource object from a file or directory.
00056 // \relatesalso vil_pyramid_image_resource
00057 vil_pyramid_image_resource_sptr
00058 vil_load_pyramid_resource(char const* directory_or_file, bool verbose = true);
00059 
00060 //: Convenience function for loading an image into an image view.
00061 // \relatesalso vil_image_view
00062 vil_image_view_base_sptr vil_load(const char *, bool verbose = true);
00063 
00064 
00065 #if defined(VCL_WIN32) && VXL_USE_WIN_WCHAR_T
00066 //: Load an image resource object from a file.
00067 // \relatesalso vil_image_resource
00068 vil_image_resource_sptr vil_load_image_resource(wchar_t const* filename, bool verbose = true);
00069 
00070 //: Load an image resource object from a file.
00071 // Won't use plugins.
00072 vil_image_resource_sptr vil_load_image_resource_raw(wchar_t const*, bool verbose = true);
00073 
00074 //: Convenience function for loading an image into an image view.
00075 // \relatesalso vil_image_view
00076 vil_image_view_base_sptr vil_load(const wchar_t *, bool verbose = true);
00077 #endif //defined(VCL_WIN32) && VXL_USE_WIN_WCHAR_T
00078 
00079 
00080 #endif // vil_load_h_