casa::ImageOpener Class Reference
[Images_internal_classes]

#include <ImageOpener.h>

List of all members.


Detailed Description

Definition of image types and handlers.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Synopsis

The class contains defines the possible image types. It contains a registry containing functions to construct an image based on its type. In this way any image can be used in the image package without the need that the code must reside in the images package.

Motivation

FITS and MIRIAD needed to be moved out of the images package.

Definition at line 63 of file ImageOpener.h.

Public Types

enum  ImageTypes
 Define the possible image types. More...
typedef LatticeBaseOpenImageFunction (const String &fileName, const MaskSpecifier &)
 Define the signature of a function opening an image.

Static Public Member Functions

static ImageTypes imageType (const String &fileName)
 Return the type of an image with the given name.
static void registerOpenImageFunction (ImageTypes, OpenImageFunction *)
 Register an openImageFunction.
static LatticeBaseopenImage (const String &fileName, const MaskSpecifier &=MaskSpecifier())
 Open an image in the file/table with the given name.
static LatticeBaseopenPagedImage (const String &fileName, const MaskSpecifier &=MaskSpecifier())
 Open an AIPS++ paged image of any data type.

Static Private Member Functions

static LatticeBaseunknownImageOpen (const String &name, const MaskSpecifier &)
 The default openImage function for an unknown image type.

Static Private Attributes

static SimpleOrderedMap< ImageTypes,
OpenImageFunction * > 
theirOpenFuncMap
 Mapping of the image type to an openImage function.


Member Typedef Documentation

typedef LatticeBase* casa::ImageOpener::OpenImageFunction(const String &fileName, const MaskSpecifier &)

Define the signature of a function opening an image.

Each basic image class (like FITSImage) must have a static open function with this signature. They can be registered using registerOpenImageFunction. In this way a function like openImage can create any image object without the need that all image classes are in the images package. The LogIO object can be used for possible error reporting or logging.

Definition at line 93 of file ImageOpener.h.


Member Enumeration Documentation

enum casa::ImageOpener::ImageTypes

Define the possible image types.

Definition at line 67 of file ImageOpener.h.


Member Function Documentation

static ImageTypes casa::ImageOpener::imageType ( const String fileName  )  [static]

Return the type of an image with the given name.

Will throw an exception if file does not exist.

static void casa::ImageOpener::registerOpenImageFunction ( ImageTypes  ,
OpenImageFunction  
) [static]

Register an openImageFunction.

static LatticeBase* casa::ImageOpener::openImage ( const String fileName,
const MaskSpecifier = MaskSpecifier() 
) [static]

Open an image in the file/table with the given name.

The specified mask will be applied (default is default mask). A null pointer is returned for an unknown image type. Non-AIPS++ image types must have been registered to be known.

static LatticeBase* casa::ImageOpener::openPagedImage ( const String fileName,
const MaskSpecifier = MaskSpecifier() 
) [static]

Open an AIPS++ paged image of any data type.

static LatticeBase* casa::ImageOpener::unknownImageOpen ( const String name,
const MaskSpecifier  
) [static, private]

The default openImage function for an unknown image type.

It returns a null pointer.


Member Data Documentation

SimpleOrderedMap<ImageTypes,OpenImageFunction*> casa::ImageOpener::theirOpenFuncMap [static, private]

Mapping of the image type to an openImage function.

Definition at line 117 of file ImageOpener.h.


The documentation for this class was generated from the following file:
Generated on Thu Jul 3 22:38:22 2008 for NRAOCASA by  doxygen 1.5.1