28 #ifndef IMAGES_FITSIMAGE_H
29 #define IMAGES_FITSIMAGE_H
42 #ifndef WCSLIB_GETWCSTAB
43 #define WCSLIB_GETWCSTAB
49 template <
class T>
class Array;
50 template <
class T>
class Lattice;
55 class CoordinateSystem;
310 template <
typename T>
318 template <
typename T>
332 #ifndef CASACORE_NO_AUTO_TEMPLATES
333 #include <casacore/images/Images/FITS2Image.tcc>
334 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual Bool hasPixelMask() const
FITSimage always has a pixel mask so returns True.
static String className()
returns "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 ImageInterface< Float > * cloneII() const
Make a copy of the object with new (reference semantics).
static LatticeBase * openFITSImage(const String &name, const MaskSpecifier &)
Function to open a FITS image (new parser)
virtual void reopen()
Reopen a temporarily closed image.
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.
void setup()
Setup the object (used by constructors).
virtual Bool ok() const
Check class invariants.
void open()
Open the image (used by setup and reopen).
virtual IPosition shape() const
return the shape of the FITSImage
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.
ostream-like interface to creating log messages.
FITSImage & operator=(const FITSImage &other)
Assignment (reference semantics)
ValueType
FITS I/O Error message types.
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...
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.
void reopenIfNeeded() const
Reopen the image if needed.
DataType internalDataType() const
Return the (internal) data type.
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 resize(const TiledShape &newShape)
Function which changes the shape of the FITSImage.
virtual Bool isPersistent() const
The lattice is persistent.
virtual String name(Bool stripPath=False) const
Returns the name of the disk file.
virtual Bool doGetSlice(Array< Float > &buffer, const Slicer &theSlice)
Do the actual get of the data.
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.
uInt whichHDU() const
Return the HDU number.
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.
const ImageInfo & imageInfo() const
The ImageInfo object contains some miscellaneous information about the image which unlike that stored...
Class providing native access to FITS images.
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.
const TableRecord & miscInfo() const
Often we have miscellaneous information we want to attach to an image.
virtual const LatticeRegion * getRegionPtr() const
Get the region used.
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.
virtual String imageType() const
Get the image type (returns FITSImage).
virtual Bool isPaged() const
The lattice is paged to disk.
String: the storage and methods of handling collections of characters.
An optionally strided region in a Lattice.
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...
Abstract base class for Record classes.
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
Miscellaneous information related to an image.
CountedPtr< TiledFileAccess > pTiledFile_p
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
Interconvert pixel and world coordinates.
virtual Bool isWritable() const
The FITSImage is not writable.
virtual DataType dataType() const
Return the data type (TpFloat).
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.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Do the actual get of the mask data.