30 #ifndef IMAGES_IMAGEFITSCONVERTER_H
31 #define IMAGES_IMAGEFITSCONVERTER_H
41 #ifndef WCSLIB_GETWCSTAB
42 #define WCSLIB_GETWCSTAB
47 template<
class T>
class PagedImage;
48 template<
class T>
class ImageInterface;
49 template<
class T>
class Vector;
53 class CoordinateSystem;
54 class RecordInterface;
59 class ConstFitsKeywordList;
205 uInt memoryInMB = 64,
246 uInt memoryInMB = 64,
315 const DataType
type);
355 Bool opticalVelocity,
359 Bool preferWavelength,
374 const Bool &allowOverwrite);
399 const String &newImageName,
402 const String& fitsFilename,
403 const DataType dataType,
404 const uInt memoryInMB = 64,
411 #ifndef CASACORE_NO_AUTO_TEMPLATES
412 #include <casacore/images/Images/ImageFITSConverter.tcc>
413 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
A 1-D Specialization of the Array class.
std::vector< double > Vector
static void _writeBeamsTable(FitsOutput *const &outfile, const ImageInfo &info)
static Bool extractMiscInfo(RecordInterface &miscInfo, const RecordInterface &header)
Parse header record and set MiscInfo.
static void readBeamsTable(ImageInfo &info, const String &filename, const DataType type)
Read the BEAMS table if present and add the restoring beams to info.
Interconvert between Casacore Images and FITS files.
This class is an internal class for ImageFITSConverter.
static Bool openFitsOutput(String &error, FitsOutput *(&openFitsOutput), const String &fitsName, const Bool &allowOverwrite)
Create an open FITS file with the name given.
virtual casacore::String type() const
Implements RegionShape::type.
ostream-like interface to creating log messages.
static const String CASAMBM
static Bool FITSToImage(ImageInterface< Float > *&newImage, String &error, const String &imageName, const String &fitsName, uInt whichRep=0, Int whichHDU=0, uInt memoryInMB=64, Bool allowOverwrite=False, Bool zeroBlanks=False)
Convert a FITS file to a Casacore image.
static Bool removeFile(String &error, const File &outFile, const String &outName, Bool allowOverwrite)
If existing, remove the file, symlink, or directory given by outFile.
static ImageInfo getImageInfo(RecordInterface &header)
Recover ImageInfo from header.
Referenced counted pointer for constant data.
static Unit getBrightnessUnit(RecordInterface &header, LogIO &os)
Recover brightness unit from header.
static Bool QualImgToFITSOut(String &error, LogIO &os, ImageInterface< Float > &image, FitsOutput *outfile, uInt memoryInMB, Bool preferVelocity, Bool opticalVelocity, Int BITPIX, Float minPix, Float maxPix, Bool degenerateLast, Bool verbose, Bool stokesLast, Bool preferWavelength, Bool airWavelength, const String &origin, Bool history)
Put a CASA image with quality coordinate to an opened FITS file Parameters as in "ImageToFITS".
static Bool ImageToFITS(String &error, ImageInterface< Float > &image, const String &fitsName, uInt memoryInMB=64, Bool preferVelocity=True, Bool opticalVelocity=True, Int BITPIX=-32, Float minPix=1.0, Float maxPix=-1.0, Bool allowOverwrite=False, Bool degenerateLast=False, Bool verbose=True, Bool stokesLast=False, Bool preferWavelength=False, Bool airWavelength=False, const String &origin=String(), Bool history=True)
Convert a Casacore image to a FITS file.
Class to get file information and a base for other file classes.
bool Bool
Define the standard types used by Casacore.
list of read-only FITS keywords
static CoordinateSystem getCoordinateSystem(Int &imageType, RecordInterface &headerRec, const Vector< String > &header, LogIO &os, uInt whichRep, IPosition &shape, Bool dropStokes)
Recover CoordinateSystem from header.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
virtual Origin origin() const =0
ABSTRACT METHODS //.
static Bool ImageToFITSOut(String &error, LogIO &os, const ImageInterface< Float > &image, FitsOutput *output, uInt memoryInMB=64, Bool preferVelocity=True, Bool opticalVelocity=True, Int BITPIX=-32, Float minPix=1.0, Float maxPix=-1.0, Bool degenerateLast=False, Bool verbose=True, Bool stokesLast=False, Bool preferWavelength=False, Bool airWavelength=False, Bool primHead=True, Bool allowAppend=False, const String &origin=String(), Bool history=True)
Put a CASA image to an opened FITS image Parameters as in "ImageToFITS".
fixed-length sequential blocked FITS output
linked list of FITS keywords
static Bool ImageHeaderToFITS(String &error, ImageFITSHeaderInfo &fhi, const ImageInterface< Float > &image, Bool preferVelocity=True, Bool opticalVelocity=True, Int BITPIX=-32, Float minPix=1.0, Float maxPix=-1.0, Bool degenerateLast=False, Bool verbose=True, Bool stokesLast=False, Bool preferWavelength=False, Bool airWavelength=False, Bool primHead=True, Bool allowAppend=True, const String &origin=String(), Bool history=True)
String: the storage and methods of handling collections of characters.
Abstract base class for Record classes.
Class holding a hierarchy of loggers.
static void FITSToImage(ImageInterface< Float > *&newImage, String &error, const String &newImageName, const uInt whichRep, HDUType &fitsImage, const String &fitsFilename, const DataType dataType, const uInt memoryInMB=64, const Bool zeroBlanks=False)
static void restoreHistory(LoggerHolder &logger, ConstFitsKeywordList &kw)
Recover history from FITS file keyword list into logger.
Miscellaneous information related to an image.
static IPosition copyCursorShape(String &report, const IPosition &shape, uInt imagePixelSize, uInt fitsPixelSize, uInt memoryInMB)
Helper function - used to calculate a cursor appropriate for the desired memory use.
Interconvert pixel and world coordinates.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.