casa::MIRIADImage Class Reference
[Images]

#include <MIRIADImage.h>

Inheritance diagram for casa::MIRIADImage:

Inheritance graph
[legend]
Collaboration diagram for casa::MIRIADImage:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class providing native access to MIRIAD images.

Intended use:

Part of API

Review Status

Test programs:
tMIRIADImage

Prerequisite

ImageInterface FITSMask

Etymology

This class provides native access to MIRIAD images.

Synopsis

A MIRIADImage provides native access to MIRIAD images by accessing them with the TiledFileAccess class. -- or -- the native miriad I/O routines. The MIRIADImage is read only. -- really -- ??

Example

       MIRIADImage im("cube1"); 
       LogIO logger(or);
       ImageStatistics<Float> stats(im, logger);
       Bool ok = stats.display();                              // Display statistics

Motivation

This provides native access to MIRIAD images.

Definition at line 101 of file MIRIADImage.h.

Public Member Functions

 MIRIADImage (const String &name)
 Construct a MIRIADImage from the disk MIRIAD dataset name and apply mask.
 MIRIADImage (const String &name, const MaskSpecifier &)
 Construct a MIRIADImage from the disk MIRIAD file name and apply mask or not.
 MIRIADImage (const MIRIADImage &other)
 Copy constructor (reference semantics).
 ~MIRIADImage ()
 Destructor does nothing.
MIRIADImageoperator= (const MIRIADImage &other)
 Assignment (reference semantics).
virtual ImageInterface< Float > * cloneII () const
 Make a copy of the object with new (reference semantics).
virtual String imageType () const
 Get the image type (returns MIRIADImage).
virtual void resize (const TiledShape &newShape)
 Function which changes the shape of the MIRIADImage.
virtual Bool isMasked () const
 Has the object really a mask? The MIRIADImage always has a pixel mask and never has a region mask so this should always return True.
virtual Bool hasPixelMask () const
 MIRIADimage always has a pixel mask so should return True.
virtual Bool doGetMaskSlice (Array< Bool > &buffer, const Slicer &section)
 Do the actual get of the mask data.
virtual const LatticeRegiongetRegionPtr () const
 Get the region used.
virtual Bool doGetSlice (Array< Float > &buffer, const Slicer &theSlice)
 Do the actual get of the data.
virtual void doPutSlice (const Array< Float > &sourceBuffer, const IPosition &where, const IPosition &stride)
 The MIRIADImage is not writable, so this throws an exception.
virtual Bool isPaged () const
 The lattice is paged to disk.
virtual Bool isPersistent () const
 The lattice is persistent.
virtual Bool isWritable () const
 The MIRIADImage is not writable.
virtual String name (Bool stripPath=False) const
 Returns the name of the disk file.
virtual IPosition shape () const
 return the shape of the MIRIADImage
virtual uInt advisedMaxPixels () const
 Returns the maximum recommended number of pixels for a cursor.
virtual IPosition doNiceCursorShape (uInt maxPixels) const
 Help the user pick a cursor for most efficient access if they only want pixel values and don't care about the order or dimension of the cursor.
virtual void tempClose ()
 Temporarily close the image.
virtual void reopen ()
 Reopen a temporarily closed image.
virtual Bool ok () const
 Check class invariants.
DataType dataType () const
 Return the (internal) data type (TpFloat or TpShort).
virtual uInt maximumCacheSize () const
 Maximum size - not necessarily all used.
virtual void setMaximumCacheSize (uInt howManyPixels)
 Set the maximum (allowed) cache size as indicated.
virtual void setCacheSizeFromPath (const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
 Set the cache size as to "fit" the indicated path.
virtual void setCacheSizeInTiles (uInt howManyTiles)
 Set the actual cache size for this Array to be be big enough for the indicated number of tiles.
virtual void clearCache ()
 Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.
virtual void showCacheStatistics (ostream &os) const
 Report on cache success.
virtual const RecordInterfacemiscInfo () const
 Often we have miscellaneous information we want to attach to an image.
virtual Bool setMiscInfo (const RecordInterface &newInfo)
virtual const Lattice< Bool > & pixelMask () const
 Get access to the pixelmask.
virtual Lattice< Bool > & pixelMask ()

Static Public Member Functions

static LatticeBaseopenMIRIADImage (const String &name, const MaskSpecifier &)
 Function to open a MIRIAD image.
static void registerOpenFunction ()
 Register the open function.

Private Member Functions

void reopenIfNeeded () const
 Reopen the image if needed.
void setup ()
 Setup the object (used by constructors).
void open ()
 Open the image (used by setup and reopen).
void getImageAttributes (CoordinateSystem &cSys, IPosition &shape, ImageInfo &info, Unit &brightnessUnit, Record &miscInfo, Bool &hasBlanks, const String &name)
 Fish things out of the MIRIAD file.
void crackHeader (CoordinateSystem &cSys, IPosition &shape, ImageInfo &imageInfo, Unit &brightnessUnit, Record &miscInfo, LogIO &os)

Private Attributes

String name_p
Int tno_p
MaskSpecifier maskSpec_p
Unit unit_p
Record rec_p
CountedPtr< TiledFileAccesspTiledFile_p
Lattice< Bool > * pPixelMask_p
TiledShape shape_p
 Float scale_p; Float offset_p; Short magic_p;.
Bool hasBlanks_p
DataType dataType_p
Int64 fileOffset_p
Bool isClosed_p


Constructor & Destructor Documentation

casa::MIRIADImage::MIRIADImage ( const String name  )  [explicit]

Construct a MIRIADImage from the disk MIRIAD dataset name and apply mask.

casa::MIRIADImage::MIRIADImage ( const String name,
const MaskSpecifier  
)

Construct a MIRIADImage from the disk MIRIAD file name and apply mask or not.

casa::MIRIADImage::MIRIADImage ( const MIRIADImage other  ) 

Copy constructor (reference semantics).

casa::MIRIADImage::~MIRIADImage (  ) 

Destructor does nothing.


Member Function Documentation

MIRIADImage& casa::MIRIADImage::operator= ( const MIRIADImage other  ) 

Assignment (reference semantics).

static LatticeBase* casa::MIRIADImage::openMIRIADImage ( const String name,
const MaskSpecifier  
) [static]

Function to open a MIRIAD image.

static void casa::MIRIADImage::registerOpenFunction (  )  [static]

Register the open function.

virtual ImageInterface<Float>* casa::MIRIADImage::cloneII (  )  const [virtual]

Make a copy of the object with new (reference semantics).

Implements casa::ImageInterface< T >.

virtual String casa::MIRIADImage::imageType (  )  const [virtual]

Get the image type (returns MIRIADImage).

Implements casa::ImageInterface< T >.

virtual void casa::MIRIADImage::resize ( const TiledShape newShape  )  [virtual]

Function which changes the shape of the MIRIADImage.

Throws an exception as MIRIADImage is not writable.

Implements casa::ImageInterface< T >.

virtual const RecordInterface& casa::MIRIADImage::miscInfo (  )  const [virtual]

Often we have miscellaneous information we want to attach to an image.

Although MIRIADImage is not writable, you can set a new MiscInfo record, but it will not be stored with the MIRIAD file

Reimplemented from casa::ImageInterface< T >.

virtual Bool casa::MIRIADImage::setMiscInfo ( const RecordInterface newInfo  )  [virtual]

Reimplemented from casa::ImageInterface< T >.

virtual Bool casa::MIRIADImage::isMasked (  )  const [virtual]

Has the object really a mask? The MIRIADImage always has a pixel mask and never has a region mask so this should always return True.

Reimplemented from casa::MaskedLattice< T >.

virtual Bool casa::MIRIADImage::hasPixelMask (  )  const [virtual]

MIRIADimage always has a pixel mask so should return True.

Reimplemented from casa::MaskedLattice< T >.

virtual const Lattice<Bool>& casa::MIRIADImage::pixelMask (  )  const [virtual]

Get access to the pixelmask.

MIRIADImage always has a pixel mask.

Reimplemented from casa::MaskedLattice< T >.

virtual Lattice<Bool>& casa::MIRIADImage::pixelMask (  )  [virtual]

Reimplemented from casa::MaskedLattice< T >.

virtual Bool casa::MIRIADImage::doGetMaskSlice ( Array< Bool > &  buffer,
const Slicer section 
) [virtual]

Do the actual get of the mask data.

The return value is always False, thus the buffer does not reference another array.

Reimplemented from casa::MaskedLattice< T >.

virtual const LatticeRegion* casa::MIRIADImage::getRegionPtr (  )  const [virtual]

Get the region used.

There is no region. Always returns 0.

Implements casa::MaskedLattice< T >.

virtual Bool casa::MIRIADImage::doGetSlice ( Array< Float > &  buffer,
const Slicer theSlice 
) [virtual]

Do the actual get of the data.

Returns False as the data do not reference another Array

virtual void casa::MIRIADImage::doPutSlice ( const Array< Float > &  sourceBuffer,
const IPosition where,
const IPosition stride 
) [virtual]

The MIRIADImage is not writable, so this throws an exception.

virtual Bool casa::MIRIADImage::isPaged (  )  const [virtual]

The lattice is paged to disk.

Reimplemented from casa::LatticeBase.

virtual Bool casa::MIRIADImage::isPersistent (  )  const [virtual]

The lattice is persistent.

Reimplemented from casa::LatticeBase.

virtual Bool casa::MIRIADImage::isWritable (  )  const [virtual]

The MIRIADImage is not writable.

Reimplemented from casa::LatticeBase.

virtual String casa::MIRIADImage::name ( Bool  stripPath = False  )  const [virtual]

Returns the name of the disk file.

Implements casa::ImageInterface< T >.

virtual IPosition casa::MIRIADImage::shape (  )  const [virtual]

return the shape of the MIRIADImage

Implements casa::LatticeBase.

virtual uInt casa::MIRIADImage::advisedMaxPixels (  )  const [virtual]

Returns the maximum recommended number of pixels for a cursor.

This is the number of pixels in a tile.

Reimplemented from casa::Lattice< T >.

virtual IPosition casa::MIRIADImage::doNiceCursorShape ( uInt  maxPixels  )  const [virtual]

Help the user pick a cursor for most efficient access if they only want pixel values and don't care about the order or dimension of the cursor.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::tempClose (  )  [virtual]

Temporarily close the image.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::reopen (  )  [virtual]

Reopen a temporarily closed image.

Reimplemented from casa::LatticeBase.

Referenced by reopenIfNeeded().

virtual Bool casa::MIRIADImage::ok (  )  const [virtual]

Check class invariants.

Implements casa::ImageInterface< T >.

DataType casa::MIRIADImage::dataType (  )  const [inline]

Return the (internal) data type (TpFloat or TpShort).

Definition at line 230 of file MIRIADImage.h.

References dataType_p.

virtual uInt casa::MIRIADImage::maximumCacheSize (  )  const [virtual]

Maximum size - not necessarily all used.

In pixels.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::setMaximumCacheSize ( uInt  howManyPixels  )  [virtual]

Set the maximum (allowed) cache size as indicated.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::setCacheSizeFromPath ( const IPosition sliceShape,
const IPosition windowStart,
const IPosition windowLength,
const IPosition axisPath 
) [virtual]

Set the cache size as to "fit" the indicated path.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::setCacheSizeInTiles ( uInt  howManyTiles  )  [virtual]

Set the actual cache size for this Array to be be big enough for the indicated number of tiles.

This cache is not shared with PagedArrays in other rows and is always clipped to be less than the maximum value set using the setMaximumCacheSize member function. tiles. Tiles are cached using a first in first out algorithm.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::clearCache (  )  [virtual]

Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.

Reimplemented from casa::LatticeBase.

virtual void casa::MIRIADImage::showCacheStatistics ( ostream &  os  )  const [virtual]

Report on cache success.

Reimplemented from casa::LatticeBase.

void casa::MIRIADImage::reopenIfNeeded (  )  const [inline, private]

Reopen the image if needed.

Definition at line 277 of file MIRIADImage.h.

References isClosed_p, and reopen().

void casa::MIRIADImage::setup (  )  [private]

Setup the object (used by constructors).

void casa::MIRIADImage::open (  )  [private]

Open the image (used by setup and reopen).

void casa::MIRIADImage::getImageAttributes ( CoordinateSystem cSys,
IPosition shape,
ImageInfo info,
Unit brightnessUnit,
Record miscInfo,
Bool hasBlanks,
const String name 
) [private]

Fish things out of the MIRIAD file.

void casa::MIRIADImage::crackHeader ( CoordinateSystem cSys,
IPosition shape,
ImageInfo imageInfo,
Unit brightnessUnit,
Record miscInfo,
LogIO os 
) [private]


Member Data Documentation

String casa::MIRIADImage::name_p [private]

Definition at line 260 of file MIRIADImage.h.

Int casa::MIRIADImage::tno_p [private]

Definition at line 261 of file MIRIADImage.h.

MaskSpecifier casa::MIRIADImage::maskSpec_p [private]

Definition at line 262 of file MIRIADImage.h.

Unit casa::MIRIADImage::unit_p [private]

Reimplemented from casa::ImageInterface< T >.

Definition at line 263 of file MIRIADImage.h.

Record casa::MIRIADImage::rec_p [private]

Definition at line 264 of file MIRIADImage.h.

CountedPtr<TiledFileAccess> casa::MIRIADImage::pTiledFile_p [private]

Definition at line 265 of file MIRIADImage.h.

Lattice<Bool>* casa::MIRIADImage::pPixelMask_p [private]

Definition at line 266 of file MIRIADImage.h.

TiledShape casa::MIRIADImage::shape_p [private]

Float scale_p; Float offset_p; Short magic_p;.

Definition at line 270 of file MIRIADImage.h.

Bool casa::MIRIADImage::hasBlanks_p [private]

Definition at line 271 of file MIRIADImage.h.

DataType casa::MIRIADImage::dataType_p [private]

Definition at line 272 of file MIRIADImage.h.

Referenced by dataType().

Int64 casa::MIRIADImage::fileOffset_p [private]

Definition at line 273 of file MIRIADImage.h.

Bool casa::MIRIADImage::isClosed_p [private]

Definition at line 274 of file MIRIADImage.h.

Referenced by reopenIfNeeded().


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 22:35:03 2008 for NRAOCASA by  doxygen 1.5.1