26#ifndef IMAGES_MIRIADIMAGE_H
27#define IMAGES_MIRIADIMAGE_H
31#include <casacore/casa/aips.h>
32#include <casacore/images/Images/ImageInterface.h>
33#include <casacore/images/Images/MaskSpecifier.h>
34#include <casacore/tables/DataMan/TiledFileAccess.h>
35#include <casacore/lattices/Lattices/TiledShape.h>
36#include <casacore/casa/Arrays/ArrayFwd.h>
37#include <casacore/casa/Containers/Record.h>
38#include <casacore/casa/BasicSL/String.h>
39#include <casacore/casa/Utilities/DataType.h>
45template <
class T>
class Lattice;
50class CoordinateSystem;
virtual Bool setUnits(const Unit &newUnits)
Function which get and set the units associated with the image pixels (i.e.
virtual const Unit & units() const
const ImageInfo & imageInfo() const
The ImageInfo object contains some miscellaneous information about the image which unlike that stored...
virtual Bool isWritable() const
The MIRIADImage is not writable.
virtual void reopen()
Reopen a temporarily closed image.
virtual Bool setMiscInfo(const RecordInterface &newInfo)
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 void setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
virtual void doPutSlice(const Array< Float > &sourceBuffer, const IPosition &where, const IPosition &stride)
The MIRIADImage is not writable, so this throws an exception.
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 Bool hasPixelMask() const
MIRIADimage always has a pixel mask so should return True.
MIRIADImage & operator=(const MIRIADImage &other)
Assignment (reference semantics)
virtual void resize(const TiledShape &newShape)
Function which changes the shape of the MIRIADImage.
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
DataType dataType() const
Return the (internal) data type (TpFloat or TpShort).
virtual String name(Bool stripPath=False) const
Returns the name of the disk file.
Lattice< Bool > * pPixelMask_p
virtual void tempClose()
Temporarily close the image.
MIRIADImage(const MIRIADImage &other)
Copy constructor (reference semantics)
virtual Lattice< Bool > & pixelMask()
virtual Bool isPaged() const
The lattice is paged to disk.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Do the actual get of the mask data.
void getImageAttributes(CoordinateSystem &cSys, IPosition &shape, ImageInfo &info, Unit &brightnessUnit, Record &miscInfo, Bool &hasBlanks, const String &name)
Fish things out of the MIRIAD file.
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.
virtual const RecordInterface & miscInfo() const
Functions which get and set the units associated with the image pixels (i.e.
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask.
virtual Bool isMasked() const
Has the object really a mask? The MIRIADImage always has a pixel mask and never has a region mask so ...
TiledShape shape_p
Float scale_p; Float offset_p; Short magic_p;.
virtual Bool isPersistent() const
The lattice is persistent.
virtual IPosition shape() const
return the shape of the MIRIADImage
static LatticeBase * openMIRIADImage(const String &name, const MaskSpecifier &)
Function to open a MIRIAD image.
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.
void reopenIfNeeded() const
Reopen the image if needed.
void open()
Open the image (used by setup and reopen).
virtual ImageInterface< Float > * cloneII() const
Make a copy of the object with new (reference semantics).
static void registerOpenFunction()
Register the open function.
virtual const LatticeRegion * getRegionPtr() const
Get the region used.
void setup()
Setup the object (used by constructors).
virtual Bool ok() const
Check class invariants.
std::shared_ptr< TiledFileAccess > pTiledFile_p
~MIRIADImage()
Destructor does nothing.
void crackHeader(CoordinateSystem &cSys, IPosition &shape, ImageInfo &imageInfo, Unit &brightnessUnit, Record &miscInfo, LogIO &os)
virtual Bool doGetSlice(Array< Float > &buffer, const Slicer &theSlice)
Do the actual get of the data.
virtual String imageType() const
Get the image type (returns MIRIADImage).
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 showCacheStatistics(ostream &os) const
Report on cache success.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.