00001
00002 #ifndef vil_file_format_h_
00003 #define vil_file_format_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012 #include <vil/vil_fwd.h>
00013 #include <vil/vil_image_resource.h>
00014 #include <vil/vil_blocked_image_resource.h>
00015 #include <vil/vil_pyramid_image_resource.h>
00016
00017
00018
00019 class vil_file_format
00020 {
00021 public:
00022 virtual ~vil_file_format();
00023
00024
00025
00026 virtual char const* tag() const = 0;
00027
00028
00029
00030
00031
00032 virtual vil_image_resource_sptr make_input_image(vil_stream* vs) = 0;
00033
00034
00035
00036 virtual vil_pyramid_image_resource_sptr
00037 make_input_pyramid_image(char const* directory_or_file)
00038 {return 0;}
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 virtual vil_pyramid_image_resource_sptr
00049 make_pyramid_image_from_base(char const* filename,
00050 vil_image_resource_sptr const& base_image,
00051 unsigned nlevels,
00052 char const* temp_dir)
00053 {return 0;}
00054
00055
00056
00057
00058
00059
00060 virtual vil_image_resource_sptr make_output_image(vil_stream* vs,
00061 unsigned nx,
00062 unsigned ny,
00063 unsigned nplanes,
00064 enum vil_pixel_format) = 0;
00065
00066
00067 virtual vil_blocked_image_resource_sptr
00068 make_blocked_output_image(vil_stream* ,
00069 unsigned ,
00070 unsigned ,
00071 unsigned ,
00072 unsigned ,
00073 unsigned ,
00074 enum vil_pixel_format )
00075 {return 0;}
00076
00077 virtual vil_pyramid_image_resource_sptr
00078 make_pyramid_output_image(char const* file)
00079 {return 0;}
00080
00081 public:
00082 static vil_file_format** all();
00083 static void add_file_format(vil_file_format* ff);
00084 };
00085
00086 #endif // vil_file_format_h_