Go to the documentation of this file.
28 #ifndef IMAGES_MIRIADIMAGE_H
29 #define IMAGES_MIRIADIMAGE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/images/Images/ImageInterface.h>
35 #include <casacore/images/Images/MaskSpecifier.h>
36 #include <casacore/tables/DataMan/TiledFileAccess.h>
37 #include <casacore/lattices/Lattices/TiledShape.h>
38 #include <casacore/casa/Containers/Record.h>
39 #include <casacore/casa/BasicSL/String.h>
40 #include <casacore/casa/Utilities/DataType.h>
46 template <
class T>
class Array;
47 template <
class T>
class Lattice;
52 class CoordinateSystem;
276 {
if (
isClosed_p) const_cast<MIRIADImage*>(
this)->reopen(); }
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask.
Interconvert pixel and world coordinates.
A base class for astronomical images.
Specify which elements to extract from an n-dimensional array.
TiledShape shape_p
Float scale_p; Float offset_p; Short magic_p;.
A Vector of integers, for indexing into Array<T> objects.
void setup()
Setup the object (used by constructors).
virtual Bool setUnits(const Unit &newUnits)
Function which get and set the units associated with the image pixels (i.e.
virtual String name(Bool stripPath=False) const
Returns the name of the disk file.
Lattice< Bool > * pPixelMask_p
virtual void resize(const TiledShape &newShape)
Function which changes the shape of the MIRIADImage.
virtual Bool setMiscInfo(const RecordInterface &newInfo)
Class providing native access to MIRIAD images.
Referenced counted pointer for constant data.
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
MIRIADImage & operator=(const MIRIADImage &other)
Assignment (reference semantics)
virtual void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
virtual Bool doGetSlice(Array< Float > &buffer, const Slicer &theSlice)
Do the actual get of the data.
void open()
Open the image (used by setup and reopen).
static LatticeBase * openMIRIADImage(const String &name, const MaskSpecifier &)
Function to open a MIRIAD image.
static void registerOpenFunction()
Register the open function.
An optionally strided region in a Lattice.
virtual Bool hasPixelMask() const
MIRIADimage always has a pixel mask so should return True.
virtual Bool isPersistent() const
The lattice is persistent.
void crackHeader(CoordinateSystem &cSys, IPosition &shape, ImageInfo &imageInfo, Unit &brightnessUnit, Record &miscInfo, LogIO &os)
virtual void tempClose()
Temporarily close the image.
MIRIADImage(const String &name)
Construct a MIRIADImage from the disk MIRIAD dataset name and apply mask.
ostream-like interface to creating log messages.
DataType dataType() const
Return the (internal) data type (TpFloat or TpShort).
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual Bool isMasked() const
Has the object really a mask? The MIRIADImage always has a pixel mask and never has a region mask so ...
virtual const RecordInterface & miscInfo() const
Functions which get and set the units associated with the image pixels (i.e.
void reopenIfNeeded() const
Reopen the image if needed.
virtual IPosition shape() const
return the shape of the MIRIADImage
virtual Bool ok() const
Check class invariants.
A non-templated, abstract base class for array-like objects.
Class to specify which mask to use in an image.
~MIRIADImage()
Destructor does nothing.
void getImageAttributes(CoordinateSystem &cSys, IPosition &shape, ImageInfo &info, Unit &brightnessUnit, Record &miscInfo, Bool &hasBlanks, const String &name)
Fish things out of the MIRIAD file.
virtual void doPutSlice(const Array< Float > &sourceBuffer, const IPosition &where, const IPosition &stride)
The MIRIADImage is not writable, so this throws an exception.
this file contains all the compiler specific defines
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 Bool isPaged() const
The lattice is paged to disk.
virtual void setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
CountedPtr< TiledFileAccess > pTiledFile_p
virtual const Unit & units() const
Abstract base class for Record classes.
const ImageInfo & imageInfo() const
The ImageInfo object contains some miscellaneous information about the image which unlike that stored...
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual void reopen()
Reopen a temporarily closed image.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Do the actual get of the mask data.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
virtual Bool isWritable() const
The MIRIADImage is not writable.
virtual String imageType() const
Get the image type (returns MIRIADImage).
A hierarchical collection of named fields of various types.
virtual ImageInterface< Float > * cloneII() const
Make a copy of the object with new (reference semantics).
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 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 a...
virtual const LatticeRegion * getRegionPtr() const
Get the region used.
Define the shape and tile shape.
Miscellaneous information related to an image.
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.