29 #ifndef IMAGES_IMAGEINFO_H
30 #define IMAGES_IMAGEINFO_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Utilities/RecordTransformable.h>
35 #include <casacore/casa/Arrays/Vector.h>
36 #include <casacore/casa/Quanta/Quantum.h>
37 #include <casacore/casa/BasicSL/String.h>
39 #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
41 #include <casacore/images/Images/ImageBeamSet.h>
44 #include <casacore/casa/iosfwd.h>
280 const String& imageName)
const;
uInt nstokes() const
Get the number of stokes in the beam array.
Bool hasMultiBeam() const
Does this beam set contain multiple beams?
Bool empty() const
Is the beam set empty?
uInt nchan() const
Get the number of channels in the beam array.
Bool hasSingleBeam() const
void removeRestoringBeam()
Remove all beams (global or per plane) associated with this object.
void concatPolBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Int npolThis, Int npolThat, Bool relax, LogIO &os) const
Concatenate the beam sets along the stokes axis.
Bool hasSingleBeam() const
does this object contain a single beam
virtual Bool toRecord(String &error, RecordInterface &outRecord) const
Functions to interconvert between an ImageInfo and a record.
static ImageInfo::ImageTypes imageTypeFromFITS(Int fitsValue)
This function takes an unofficial fitsValue found on the Stokes axis and returns the appropriate Imag...
void concatFreqBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Int nchanThis, Int nchanThat, Bool relax, LogIO &os) const
Concatenate the beam sets along the frequency axis.
void _setRestoringBeam(const Record &inRecord)
Set the restoring beam from the record.
void setAllBeams(const uInt nChannels, const uInt nStokes, const GaussianBeam &beam)
Initialize all per-plane beams to the same value.
static ImageTypes defaultImageType()
In some circumstances it might be useful to know what the defaults for the various values are so you ...
ImageInfo(const ImageInfo &other)
Copy constructor (copy semantics)
ImageInfo()
Default constructor.
Bool hasMultipleBeams() const
does this object contain multiple beams?
ImageInfo & operator=(const ImageInfo &other)
Assignment (copy semantics)
void setBeam(Int channel, Int stokes, const Quantity &major, const Quantity &minor, const Quantity &pa)
Set the beam for a specific plane.
static String imageType(ImageInfo::ImageTypes type)
GaussianBeam restoringBeam(Int channel=-1, Int stokes=-1) const
Set and get the beam.
Bool toFITS(String &error, RecordInterface &outRecord) const
Functions to interconvert between an ImageInfo and FITS keywords (converted to a Record).
void _checkBeamShape(uInt &nchan, uInt &npol, const IPosition &shape, const CoordinateSystem &csys) const
Check if the beam shape matches the coordinates.
static void logMessage(Bool &warn, LogIO &os, Bool relax, const String &msg1, const String msg2=String())
If relax=True, give a warning message if warn=True and set to False.
void copy_other(const ImageInfo &other)
Common copy ctor/assignment operator code.
void setBeams(const ImageBeamSet &beams)
Set the per plane beams array directly.
const ImageBeamSet & getBeamSet() const
Get the beam set associated with this object.
uInt setInfoSplitBeamSet(uInt ndone, const ImageInfo &concatInfo, const IPosition &shape, const CoordinateSystem &csys, Int concatAxis)
Reset the info and beamset of this image with the appropriate part of the beam set of the concat imag...
ImageInfo & setImageType(ImageTypes type)
virtual Bool fromRecord(String &error, const RecordInterface &inRecord)
Initialise the class from a Record representation.
static String defaultObjectName()
ImageTypes
This enum defines the actual quantity being held in an image It's really only used for descriptive in...
void setBeam(Int channel, Int stokes, const GaussianBeam &beam)
static ImageInfo::ImageTypes MiriadImageType(const String &type)
Convert the Miriad 'btype' strings to the ImageType.
Bool getRestoringBeam(LoggerHolder &logger)
This method is not meant for common use.
uInt nChannels() const
Number of channels and stokes in per hyper-plane beam array.
ImageInfo::ImageTypes imageType() const
Set and get the Image Type.
void setRestoringBeam(const GaussianBeam &beam)
Set the single global restoring beam.
static ImageInfo::ImageTypes imageType(String type)
void setRestoringBeam(const Quantum< Double > &major, const Quantum< Double > &minor, const Quantum< Double > &pa)
void appendBeams(ImageInfo &infoThat, Int axis, Bool relax, LogIO &os, const CoordinateSystem &csysThis, const CoordinateSystem &csysThat, const IPosition &shapeThis, const IPosition &shapeThat)
Append the other beamset to this one.
ImageInfo & setObjectName(const String &object)
Bool fromFITS(Vector< String > &error, const RecordInterface &inRecord)
void mergeBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Bool relax, LogIO &os) const
Merge the beam sets and check if they match.
String objectName() const
Set and get the Image object name.
static Vector< String > keywordNamesFITS()
It might be useful to know what FITS keyword names are used in to/from FITS so we can remove them so ...
void checkBeamSet(const CoordinateSystem &coords, const IPosition &shape, const String &imageName) const
Check if the beam set matches the coordinate axes sizes.
static Double getBeamAreaInPixels(const GaussianBeam &beam, const DirectionCoordinate &dc)
Double getBeamAreaInPixels(Int channel, Int stokes, const DirectionCoordinate &) const
Get the beam area in terms of pixel size of the specified DirectionCoordinate.
Record beamToRecord(Int channel, Int stokes) const
Convert the given beam to a Record.
static GaussianBeam defaultRestoringBeam()
void combineBeams(const ImageInfo &infoThat, const IPosition &shapeThis, const IPosition &shapeThat, const CoordinateSystem &csysThis, const CoordinateSystem &csysThat, Int axis, Bool relax, LogIO &os)
Combine beam sets for the concatenation of images and replace the beamset in this object by the resul...
Bool hasBeam() const
Does this object contain one or more beams?
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.