28 #ifndef IMAGEANALYSIS_IMAGEFACTORY_H
29 #define IMAGEANALYSIS_IMAGEFACTORY_H
50 template <
class T>
class Vector;
90 const std::vector<std::pair<casacore::LogOrigin, casacore::String> > *
const &msgs
117 std::pair<casacore::LogOrigin, casacore::String>
118 > *
const &msgs=
nullptr
127 std::pair<casacore::LogOrigin, casacore::String>
128 > *
const &msgs=
nullptr
137 std::pair<casacore::LogOrigin, casacore::String>
138 > *
const &msgs=
nullptr
146 std::pair<casacore::LogOrigin, casacore::String>
147 > *
const &msgs=
nullptr
164 std::pair<casacore::LogOrigin, casacore::String>
165 > *
const &msgs=
nullptr
181 std::pair<casacore::LogOrigin, casacore::String>
182 > *
const &msgs=
nullptr
198 static std::shared_ptr<casacore::TempImage<std::complex<T>>>
makeComplexImage(
206 static std::shared_ptr<casacore::ImageInterface<std::complex<T>>>
makeComplex(
300 std::unique_ptr<casacore::LatticeBase>& latt
309 casacore::DataType dataType
322 #ifndef AIPS_NO_TEMPLATE_SRC
323 #include <imageanalysis/ImageAnalysis/ImageFactory.tcc>
A Vector of integers, for indexing into Array<T> objects.
A 1-D Specialization of the Array class.
static SPIIT imageFromArray(const casacore::String &outfile, const casacore::Array< T > &pixels, const casacore::Record &csys, casacore::Bool linear=false, casacore::Bool overwrite=false, casacore::Bool verbose=true, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs=nullptr)
LatticeExprNode log(const LatticeExprNode &expr)
static void _checkOutfile(const casacore::String &outfile, casacore::Bool overwrite)
static SPIIT fromShape(const casacore::String &outfile, const casacore::Vector< casacore::Int > &shape, const casacore::Record &csys, casacore::Bool linear=false, casacore::Bool overwrite=false, casacore::Bool verbose=false, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs=nullptr)
Temporary astronomical images.
static SPIIF testImage(const casacore::String &outfile, const casacore::Bool overwrite, const casacore::String &imagetype="2d")
open a canonical image
std::complex< Float > Complex
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
static void toFITS(SPCIIF image, const casacore::String &outfile, casacore::Bool velocity, casacore::Bool optical, casacore::Int bitpix, casacore::Double minpix, casacore::Double maxpix, const casacore::Record ®ion, const casacore::String &mask, casacore::Bool overwrite=false, casacore::Bool dropdeg=false, casacore::Bool deglast=false, casacore::Bool dropstokes=false, casacore::Bool stokeslast=false, casacore::Bool wavelength=false, casacore::Bool airWavelength=false, const casacore::String &origin="", casacore::Bool stretch=false, casacore::Bool history=true)
static std::shared_ptr< casacore::ImageInterface< std::complex< T > > > makeComplex(SPCIIT realPart, SPCIIT imagPart, const casacore::String &outfile, const casacore::Record ®ion, casacore::Bool overwrite=false)
Create a complex-valued image from two real-valued images.
std::tuple< SPIIF, SPIIC, SPIID, SPIIDC > ITUPLE
static SPIIF floatImageFromShape(const casacore::String &outfile, const casacore::Vector< casacore::Int > &shape, const casacore::Record &csys, casacore::Bool linear=true, casacore::Bool overwrite=false, casacore::Bool verbose=true, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs=nullptr)
create an image with the specified shape and specified coordinate system.
static SPIIC complexImageFromShape(const casacore::String &outfile, const casacore::Vector< casacore::Int > &shape, const casacore::Record &csys, casacore::Bool linear=true, casacore::Bool overwrite=false, casacore::Bool verbose=true, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs=nullptr)
static SPIIF fromFITS(const casacore::String &outfile, const casacore::String &fitsfile, const casacore::Int whichrep, const casacore::Int whichhdu, const casacore::Bool zeroBlanks, const casacore::Bool overwrite)
static ITUPLE _rename(SPIIT &image, const casacore::String &name, const casacore::Bool overwrite)
if successful, image will point to the newly named image upone return
static std::shared_ptr< casacore::TempImage< T > > floatFromComplex(std::shared_ptr< const casacore::ImageInterface< std::complex< T >> > complexImage, ComplexToFloatFunction func)
Create a float-valued image from a complex-valued image.
static std::shared_ptr< ComponentListImage > createComponentListImage(const casacore::String &outfile, const casacore::Record &cl, const casacore::Vector< casacore::Int > &shape, const casacore::Record &csys, casacore::Bool overwrite, casacore::Bool log, casacore::Bool cache)
create a ComponentListImage
std::shared_ptr< casacore::ImageInterface< casacore::Complex > > SPIIC
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
static void rename(SPIIF &image, const casacore::String &name, const casacore::Bool overwrite)
if successful, image will be reset to point to new image upon return
static void _centerRefPix(casacore::CoordinateSystem &csys, const casacore::IPosition &shape)
std::shared_ptr< casacore::ImageInterface< casacore::DComplex > > SPIIDC
static ITUPLE fromImage(const casacore::String &outfile, const casacore::String &infile, const casacore::Record ®ion, const casacore::String &mask, casacore::Bool dropdeg=false, casacore::Bool overwrite=false)
only the pointer of the correct data type will be valid, the other will be null.
static ITUPLE fromFile(const casacore::String &filename, casacore::Bool cache=casacore::True)
exactly one of the pointers will not be null, indicating the pixel data type.
static std::pair< SPIIF, SPIIC > fromRecord(const casacore::RecordInterface &rec, const casacore::String &imagename="")
A base class for astronomical images.
static ITUPLE _fromLatticeBase(std::unique_ptr< casacore::LatticeBase > &latt)
static casacore::String _imageCreationMessage(const casacore::String &outfile, const ITUPLE &imagePtrs)
std::complex< Double > DComplex
ComplexToFloatFunction
Static methods for creating images.
std::shared_ptr< const casacore::ImageInterface< casacore::Float > > SPCIIF
std::shared_ptr< casacore::ImageInterface< casacore::Double > > SPIID
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
static void toASCII(SPCIIF image, const casacore::String &outfile, casacore::Record ®ion, const casacore::String &mask, const casacore::String &sep=" ", const casacore::String &format="%e", casacore::Double maskvalue=-999, casacore::Bool overwrite=false, casacore::Bool extendMask=false)
static SPIIT createImage(const casacore::String &outfile, const casacore::CoordinateSystem &cSys, const casacore::IPosition &shape, casacore::Bool log, casacore::Bool overwrite, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs)
Create a casacore::TempImage if outfile is empty, otherwise a PagedImage.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
template <class T, class U> class vector;
virtual Origin origin() const =0
ABSTRACT METHODS //.
static casacore::String className()
static SPIIT _fromRecord(const casacore::RecordInterface &rec, const casacore::String &name)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > SPIIF
static SPIID doubleImageFromShape(const casacore::String &outfile, const casacore::Vector< casacore::Int > &shape, const casacore::Record &csys, casacore::Bool linear=true, casacore::Bool overwrite=false, casacore::Bool verbose=true, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs=nullptr)
static void _checkInfile(const casacore::String &infile)
static casacore::CoordinateSystem * _makeCoordinateSystem(const casacore::Record &cSys, const casacore::IPosition &shape)
Convert a casacore::Record to a CoordinateSystem.
static SPIIF fromASCII(const casacore::String &outfile, const casacore::String &infile, const casacore::IPosition &shape, const casacore::String &sep, const casacore::Record &csys, const casacore::Bool linear, const casacore::Bool overwrite)
String: the storage and methods of handling collections of characters.
static std::shared_ptr< casacore::TempImage< std::complex< T > > > makeComplexImage(SPCIIT realPart, SPCIIT imagPart)
Create a complex-valued image from two real valued images.
Abstract base class for Record classes.
static SPIIDC complexDoubleImageFromShape(const casacore::String &outfile, const casacore::Vector< casacore::Int > &shape, const casacore::Record &csys, casacore::Bool linear=true, casacore::Bool overwrite=false, casacore::Bool verbose=true, const std::vector< std::pair< casacore::LogOrigin, casacore::String > > *const &msgs=nullptr)
Interconvert pixel and world coordinates.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.