casacore::MIRIADImage Class Reference

Class providing native access to MIRIAD images. More...

#include <MIRIADImage.h>

Inheritance diagram for casacore::MIRIADImage:
casacore::ImageInterface< Float > casacore::MaskedLattice< Float > casacore::Lattice< Float > casacore::LatticeBase

List of all members.

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 const RecordInterfacemiscInfo () const
 Functions which get and set the units associated with the image pixels (i.e.
virtual Bool setMiscInfo (const RecordInterface &newInfo)
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 const Lattice< Bool > & pixelMask () const
 Get access to the pixelmask.
virtual Lattice< Bool > & pixelMask ()
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.

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

Detailed Description

Class providing native access to MIRIAD images.

Intended use:

Public interface

Review Status

Test programs:
tMIRIADImage

Prerequisite

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 99 of file MIRIADImage.h.


Constructor & Destructor Documentation

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

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

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

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

casacore::MIRIADImage::MIRIADImage ( const MIRIADImage other  ) 

Copy constructor (reference semantics).

casacore::MIRIADImage::~MIRIADImage (  ) 

Destructor does nothing.


Member Function Documentation

virtual uInt casacore::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 casacore::Lattice< Float >.

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

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

Reimplemented from casacore::LatticeBase.

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

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

Implements casacore::ImageInterface< Float >.

void casacore::MIRIADImage::crackHeader ( CoordinateSystem cSys,
IPosition shape,
ImageInfo imageInfo,
Unit brightnessUnit,
Record miscInfo,
LogIO os 
) [private]
DataType casacore::MIRIADImage::dataType (  )  const [inline, virtual]

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

Reimplemented from casacore::Lattice< Float >.

Definition at line 228 of file MIRIADImage.h.

References dataType_p.

virtual Bool casacore::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 casacore::MaskedLattice< Float >.

virtual Bool casacore::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

Implements casacore::Lattice< Float >.

virtual IPosition casacore::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 casacore::LatticeBase.

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

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

Implements casacore::Lattice< Float >.

void casacore::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.

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

Get the region used.

There is no region. Always returns 0.

Implements casacore::MaskedLattice< Float >.

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

MIRIADimage always has a pixel mask so should return True.

Reimplemented from casacore::MaskedLattice< Float >.

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

Get the image type (returns MIRIADImage).

Implements casacore::ImageInterface< Float >.

virtual Bool casacore::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 casacore::MaskedLattice< Float >.

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

The lattice is paged to disk.

Reimplemented from casacore::LatticeBase.

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

The lattice is persistent.

Reimplemented from casacore::LatticeBase.

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

The MIRIADImage is not writable.

Reimplemented from casacore::LatticeBase.

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

Maximum size - not necessarily all used.

In pixels.

Reimplemented from casacore::LatticeBase.

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

Functions which get and set the units associated with the image pixels (i.e.

the "brightness" unit). Initially the unit is empty. Although the MIRIADimage is not writable, you can change the unit in the MIRIADImage object, but it will not be changed in the MIRIAD disk file. 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 casacore::ImageInterface< Float >.

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

Returns the name of the disk file.

Implements casacore::ImageInterface< Float >.

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

Check class invariants.

Implements casacore::ImageInterface< Float >.

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

Open the image (used by setup and reopen).

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

Function to open a MIRIAD image.

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

Assignment (reference semantics).

Reimplemented from casacore::LatticeBase.

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

Reimplemented from casacore::MaskedLattice< Float >.

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

Get access to the pixelmask.

MIRIADImage always has a pixel mask.

Reimplemented from casacore::MaskedLattice< Float >.

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

Register the open function.

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

Reopen a temporarily closed image.

Reimplemented from casacore::LatticeBase.

Referenced by reopenIfNeeded().

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

Reopen the image if needed.

Definition at line 275 of file MIRIADImage.h.

References isClosed_p, and reopen().

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

Function which changes the shape of the MIRIADImage.

Throws an exception as MIRIADImage is not writable.

Implements casacore::ImageInterface< Float >.

virtual void casacore::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 casacore::LatticeBase.

virtual void casacore::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 casacore::LatticeBase.

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

Set the maximum (allowed) cache size as indicated.

Reimplemented from casacore::LatticeBase.

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

Reimplemented from casacore::ImageInterface< Float >.

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

Setup the object (used by constructors).

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

return the shape of the MIRIADImage

Implements casacore::LatticeBase.

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

Report on cache success.

Reimplemented from casacore::LatticeBase.

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

Temporarily close the image.

Reimplemented from casacore::LatticeBase.


Member Data Documentation

Definition at line 270 of file MIRIADImage.h.

Referenced by dataType().

Definition at line 271 of file MIRIADImage.h.

Definition at line 269 of file MIRIADImage.h.

Definition at line 272 of file MIRIADImage.h.

Referenced by reopenIfNeeded().

Definition at line 260 of file MIRIADImage.h.

Definition at line 258 of file MIRIADImage.h.

Definition at line 264 of file MIRIADImage.h.

Definition at line 263 of file MIRIADImage.h.

Definition at line 262 of file MIRIADImage.h.

Float scale_p; Float offset_p; Short magic_p;.

Definition at line 268 of file MIRIADImage.h.

Definition at line 259 of file MIRIADImage.h.

Reimplemented from casacore::ImageInterface< Float >.

Definition at line 261 of file MIRIADImage.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1