casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageExprCalculator.h
Go to the documentation of this file.
1 #ifndef IMAGEANALYSIS_IMAGEEXPRCALCULATOR_H
2 #define IMAGEANALYSIS_IMAGEEXPRCALCULATOR_H
3 
4 #include <casa/namespace.h>
5 
6 namespace casacore{
7 
8 class String;
9 }
10 
11 namespace casa {
12 
13 
14 template <class T> class ImageExprCalculator {
15  // <summary>
16  // Top level interface for computing the results of an image expression
17  // </summary>
18 
19  // <reviewed reviewer="" date="" tests="" demos="">
20  // </reviewed>
21 
22  // <prerequisite>
23  // </prerequisite>
24 
25  // <etymology>
26  // </etymology>
27 
28  // <synopsis>
29  // </synopsis>
30 
31 public:
32 
33  ImageExprCalculator() = delete;
34 
35  // expression is the lattice expression to compute
37  const casacore::String& expression, const casacore::String& outname, casacore::Bool overwrite
38  );
39 
41 
42  // the image from which to copy metadata, including the coordinate system,
43  // imageInfo() and miscInfo()
45 
46  casacore::String getClass() const { const static casacore::String s = "ImageExprCalculator"; return s; }
47 
48  // Compute the expression and return the image.
49  SPIIT compute() const;
50 
51 
52  // modify image in place
53  static void compute2(SPIIT image, const casacore::String& expr, casacore::Bool verbose);
54 
55 private:
59 
62  const casacore::CoordinateSystem& csys, const casacore::LELImageCoord* const imCoord
63  ) const;
64 
65  static void _makeRegionBlock(
67  const casacore::Record& Regions
68  );
69 
70  void _checkImages() const;
71 
72  static void _calc(SPIIT image, const casacore::LatticeExprNode& node);
73 };
74 }
75 
76 #ifndef AIPS_NO_TEMPLATE_SRC
77 #include <imageanalysis/ImageAnalysis/ImageExprCalculator.tcc>
78 #endif
79 
80 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
void setCopyMetaDataFromImage(const casacore::String &name)
the image from which to copy metadata, including the coordinate system, imageInfo() and miscInfo() ...
void _checkImages() const
ostream-like interface to creating log messages.
Definition: LogIO.h:167
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 _calc(SPIIT image, const casacore::LatticeExprNode &node)
casacore::String _copyMetaDataFromImage
#define SPIIT
Definition: ImageTypedefs.h:34
static void compute2(SPIIT image, const casacore::String &expr, casacore::Bool verbose)
modify image in place
The letter class for image coordinates.
Definition: LELImageCoord.h:77
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::String getClass() const
SPIIT compute() const
Compute the expression and return the image.
A drop-in replacement for Block&lt;T*&gt;.
Definition: WProjectFT.h:54
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1944
ImageExprCalculator()=delete
Top level interface for computing the results of an image expression.
Bridging class to allow C++ expressions involving lattices.
static void _makeRegionBlock(casacore::PtrBlock< const casacore::ImageRegion * > &regions, const casacore::Record &Regions)
SPIIT _imagecalc(const casacore::LatticeExprNode &node, const casacore::IPosition &shape, const casacore::CoordinateSystem &csys, const casacore::LELImageCoord *const imCoord) const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Interconvert pixel and world coordinates.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42