28 #ifndef IMAGES_IMAGEUTILITIES_H
29 #define IMAGES_IMAGEUTILITIES_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/scimath/Mathematics/GaussianBeam.h>
34 #include <casacore/lattices/Lattices/TiledShape.h>
35 #include <casacore/casa/Arrays/ArrayFwd.h>
36 #include <casacore/casa/Utilities/PtrHolder.h>
37 #include <casacore/casa/Utilities/CountedPtr.h>
42 template <
class T>
class ImageInterface;
43 template <
class T>
class Quantum;
45 class CoordinateSystem;
51 class ImageAttrHandler;
107 template <
typename T,
typename U>
113 template <
typename T,
typename U>
126 template <
typename T>
145 template <
typename T>
165 const Int& pixelAxis,
205 #ifndef CASACORE_NO_AUTO_TEMPLATES
206 #include <casacore/images/Images/ImageUtilities2.tcc>
static String shortAxisName(const String &axisName)
Convert long axis names "Right Ascension", "Declination", "Frequency" and "Velocity" to "RA",...
static void openImage(ImageInterface< T > *&image, const String &fileName)
static Bool pixToWorld(Vector< String > &sWorld, const CoordinateSystem &cSys, const Int &pixelAxis, const Vector< Int > &cursorAxes, const IPosition &blc, const IPosition &trc, const Vector< Double > &pixels, const Int &prec, const Bool usePrecForMixed=False)
This function converts pixel coordinates to world coordinates.
static void addDegenerateAxes(LogIO &os, PtrHolder< ImageInterface< T > > &outImage, const ImageInterface< T > &inImage, const String &outFile, Bool direction, Bool spectral, const String &stokes, Bool linear, Bool tabular, Bool overwrite, Bool silent=False)
Add one degenerate axis for each of the specified coordinate types.
static void copyMask(ImageInterface< T > &out, const ImageInterface< U > &in, const String &maskOut, const String &maskIn, AxesSpecifier axesSpecifier)
Copy a mask from one image to another.
static void getUnitAndDoppler(String &xUnit, String &doppler, const uInt axis, const CoordinateSystem &csys)
static void openImage(PtrHolder< ImageInterface< T > > &image, const String &fileName)
Open disk image (can be any registered image).
static void writeImage(const TiledShape &mapShape, const CoordinateSystem &coordinateInfo, const String &imageName, const Array< Float > &pixels, LogIO &log, const Array< Bool > &pixelMask=Array< Bool >())
write the specified image and add the specified pixels to it.
static void copyAttributes(ImageAttrHandler &out, ImageAttrHandler &in)
Copy the attributes from one image to another.
static void bin(MaskedArray< T > &out, Coordinate &coordOut, const MaskedArray< T > &in, const Coordinate &coordIn, uInt axis, uInt bin)
Function to bin up (average data) one axis of an N-D MaskedArray.
static void copyMiscellaneous(ImageInterface< T > &out, const ImageInterface< U > &in, Bool copyImageInfo=True)
Copy MiscInfo, ImageInfo, brightness unit and logger (history) from in to out.
static GaussianBeam makeFakeBeam(LogIO &logIO, const CoordinateSystem &csys, Bool suppressWarnings=False)
static std::shared_ptr< ImageInterface< T > > openImage(const String &fileName)
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
LatticeExprNode log(const LatticeExprNode &expr)
bool Bool
Define the standard types used by Casacore.
PtrHolder(const PtrHolder< T > &other)