28 #ifndef IMAGES_FITSIMAGE_H 29 #define IMAGES_FITSIMAGE_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/fits/FITS/fits.h> 39 #include <casacore/casa/BasicSL/String.h> 40 #include <casacore/casa/Utilities/DataType.h> 42 #ifndef WCSLIB_GETWCSTAB 43 #define WCSLIB_GETWCSTAB 49 template <
class T>
class Array;
50 template <
class T>
class Lattice;
55 class CoordinateSystem;
306 template <
typename T>
314 template <
typename T>
328 #ifndef CASACORE_NO_AUTO_TEMPLATES 329 #include <casacore/images/Images/FITS2Image.tcc> 330 #endif //# CASACORE_NO_AUTO_TEMPLATES A Vector of integers, for indexing into Array<T> objects.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
const ImageInfo & imageInfo() const
The ImageInfo object contains some miscellaneous information about the image which unlike that stored...
virtual IPosition shape() const
return the shape of the FITSImage
void setMaskZero(Bool filterZero)
Set the masking of values 0.0.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
virtual const LatticeRegion * getRegionPtr() const
Get the region used.
static LatticeBase * openFITSImage(const String &name, const MaskSpecifier &)
Function to open a FITS image (new parser)
virtual void reopen()
Reopen a temporarily closed image.
DataType internalDataType() const
Return the (internal) data type.
void setup()
Setup the object (used by constructors).
virtual Bool isMasked() const
Has the object really a mask? The FITSImage always has a pixel mask and never has a region mask so th...
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).
virtual void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
A non-templated, abstract base class for array-like objects.
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...
ostream-like interface to creating log messages.
FITSImage & operator=(const FITSImage &other)
Assignment (reference semantics)
ValueType
FITS I/O Error message types.
virtual String imageType() const
Get the image type (returns FITSImage).
void crackHeader(CoordinateSystem &cSys, IPosition &shape, ImageInfo &imageInfo, Unit &brightnessUnit, RecordInterface &miscInfo, Float &scale, Float &offset, uChar &magicUChar, Short &magicShort, Int &magicLong, Bool &hasBlanks, LogIO &os, FitsInput &infile, uInt whichRep)
Crack a primary header.
FITSImage(const String &name, uInt whichRep=0, uInt whichHDU=0)
Construct a FITSImage from the disk FITS file name and extension and apply mask.
virtual ~FITSImage()
Destructor does nothing.
virtual Bool hasPixelMask() const
FITSimage always has a pixel mask so returns True.
Define the shape and tile shape.
static void registerOpenFunction()
Register the open function.
Referenced counted pointer for constant data.
A base class for astronomical images.
Lattice< Bool > * pPixelMask_p
Class to specify which mask to use in an image.
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
virtual Bool ok() const
Check class invariants.
virtual void resize(const TiledShape &newShape)
Function which changes the shape of the FITSImage.
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.
virtual Bool doGetSlice(Array< Float > &buffer, const Slicer &theSlice)
Do the actual get of the data.
virtual DataType dataType() const
Return the data type (TpFloat).
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual Bool isPersistent() const
The lattice is persistent.
bool Bool
Define the standard types used by Casacore.
static String get_fitsname(const String &fullname)
Separate any extension specification and return the pure fitsname.
static uInt get_hdunum(const String &fullname)
Get the extension index for any extension specification given in the full name.
virtual void doPutSlice(const Array< Float > &sourceBuffer, const IPosition &where, const IPosition &stride)
The FITSImage is not writable, so this throws an exception.
void crackExtHeader(CoordinateSystem &cSys, IPosition &shape, ImageInfo &imageInfo, Unit &brightnessUnit, RecordInterface &miscInfo, Float &scale, Float &offset, uChar &uCharMagic, Short &magicShort, Int &magicLong, Bool &hasBlanks, LogIO &os, FitsInput &infile, uInt whichRep)
Crack an image extension header.
Class providing native access to FITS images.
virtual Bool isPaged() const
The lattice is paged to disk.
void getImageAttributes(CoordinateSystem &cSys, IPosition &shape, ImageInfo &info, Unit &brightnessUnit, RecordInterface &miscInfo, Int &recsize, Int &recno, FITS::ValueType &dataType, Float &scale, Float &offset, uChar &uCharMagic, Short &shortMagic, Int &longMagic, Bool &hasBlanks, const String &name, uInt whichRep, uInt whichHDU)
Fish things out of the FITS file.
Specify which elements to extract from an n-dimensional array.
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.
const TableRecord & miscInfo() const
Often we have miscellaneous information we want to attach to an image.
virtual Bool isWritable() const
The FITSImage is not writable.
uInt whichHDU() const
Return the HDU number.
void reopenIfNeeded() const
Reopen the image if needed.
String: the storage and methods of handling collections of characters.
An optionally strided region in a Lattice.
Abstract base class for Record classes.
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask.
Miscellaneous information related to an image.
CountedPtr< TiledFileAccess > pTiledFile_p
this file contains all the compiler specific defines
Interconvert pixel and world coordinates.
virtual String name(Bool stripPath=False) const
Returns the name of the disk file.
virtual void tempClose()
Temporarily close the image.
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 setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Do the actual get of the mask data.