Public Member Functions | Static Public Member Functions
vil_file_format Class Reference

Base class for image formats. More...

#include <vil_file_format.h>

Inheritance diagram for vil_file_format:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~vil_file_format ()
virtual char const * tag () const =0
 Return a character string which uniquely identifies this format.
virtual vil_image_resource_sptr make_input_image (vil_stream *vs)=0
 Attempt to make a generic_image which will read from vil_stream vs.
virtual
vil_pyramid_image_resource_sptr 
make_input_pyramid_image (char const *)
 Read a pyramid resource from a list of image files in a directory.
virtual
vil_pyramid_image_resource_sptr 
make_pyramid_image_from_base (char const *, vil_image_resource_sptr const &, unsigned, char const *)
 Construct a pyramid image resource from a base image.
virtual vil_image_resource_sptr make_output_image (vil_stream *, unsigned, unsigned, unsigned, enum vil_pixel_format)=0
 Make a "generic_image" on which put_section may be applied.
virtual
vil_blocked_image_resource_sptr 
make_blocked_output_image (vil_stream *, unsigned, unsigned, unsigned, unsigned, unsigned, enum vil_pixel_format)
 Construct a blocked output image resource.
virtual
vil_pyramid_image_resource_sptr 
make_pyramid_output_image (char const *)

Static Public Member Functions

static vil_file_format ** all ()
static void add_file_format (vil_file_format *ff)
 The function will take ownership of ff;.

Detailed Description

Base class for image formats.

There is one derived class for each handled file format in the directory file_formats. E.g. vil/file_formats/vil_pnm.h etc

Definition at line 19 of file vil_file_format.h.


Constructor & Destructor Documentation

vil_file_format::~vil_file_format ( ) [virtual]

Definition at line 9 of file vil_file_format.cxx.


Member Function Documentation

void vil_file_format::add_file_format ( vil_file_format ff) [static]

The function will take ownership of ff;.

Definition at line 158 of file vil_file_format.cxx.

vil_file_format ** vil_file_format::all ( ) [static]

Definition at line 175 of file vil_file_format.cxx.

virtual vil_blocked_image_resource_sptr vil_file_format::make_blocked_output_image ( vil_stream ,
unsigned  ,
unsigned  ,
unsigned  ,
unsigned  ,
unsigned  ,
enum vil_pixel_format   
) [inline, virtual]

Construct a blocked output image resource.

Returns a null resource unless the format supports blocking

Reimplemented in vil_tiff_file_format.

Definition at line 68 of file vil_file_format.h.

virtual vil_image_resource_sptr vil_file_format::make_input_image ( vil_stream vs) [pure virtual]

Attempt to make a generic_image which will read from vil_stream vs.

Reads enough of vs to determine if it's this format, and if not, returns 0. If it is, returns a subclass of vil_image_resource on which get_section may be applied.

Implemented in vil_openjpeg_j2k_file_format, vil_openjpeg_jp2_file_format, vil_tiff_file_format, vil_bmp_file_format, vil_mit_file_format, vil_pyramid_image_list_format, vil_ras_file_format, vil_iris_file_format, vil_jpeg_file_format, vil_pnm_file_format, vil_viff_file_format, vil_dicom_file_format, vil_nitf2_file_format, vil_png_file_format, and vil_j2k_file_format.

virtual vil_pyramid_image_resource_sptr vil_file_format::make_input_pyramid_image ( char const *  ) [inline, virtual]

Read a pyramid resource from a list of image files in a directory.

... or from an image file_format that supports multiple images per file.

Reimplemented in vil_tiff_file_format, and vil_pyramid_image_list_format.

Definition at line 37 of file vil_file_format.h.

virtual vil_image_resource_sptr vil_file_format::make_output_image ( vil_stream ,
unsigned  ,
unsigned  ,
unsigned  ,
enum  vil_pixel_format 
) [pure virtual]

Make a "generic_image" on which put_section may be applied.

The stream vs is assumed to be open for writing, as an image header may be written to it immediately. The width/height etc are explicitly specified, so that file_format implementors know what they need to do...

Implemented in vil_tiff_file_format, vil_pyramid_image_list_format, vil_ras_file_format, vil_jpeg_file_format, vil_pnm_file_format, vil_nitf2_file_format, vil_png_file_format, and vil_j2k_file_format.

virtual vil_pyramid_image_resource_sptr vil_file_format::make_pyramid_image_from_base ( char const *  ,
vil_image_resource_sptr const &  ,
unsigned  ,
char const *   
) [inline, virtual]

Construct a pyramid image resource from a base image.

All levels are stored in the same resource file. Each level has the same scale ratio (0.5) to the preceding level. Level 0 is the original base image. The resource is returned open for reading. The temporary directory is for storing intermediate image resources during the construction of the pyramid. Files are be removed from the directory after completion. If temp_dir is 0 then the intermediate resources are created in memory.

Reimplemented in vil_tiff_file_format.

Definition at line 49 of file vil_file_format.h.

virtual vil_pyramid_image_resource_sptr vil_file_format::make_pyramid_output_image ( char const *  ) [inline, virtual]

Reimplemented in vil_tiff_file_format, and vil_pyramid_image_list_format.

Definition at line 78 of file vil_file_format.h.

virtual char const* vil_file_format::tag ( ) const [pure virtual]

The documentation for this class was generated from the following files: