33 #ifndef RACK_RESOURCES_H_
34 #define RACK_RESOURCES_H_
38 #include <drain/RegExp.h>
39 #include <drain/image/Image.h>
40 #include <drain/imageops/ImageModifierPack.h>
41 #include <drain/imageops/PaletteOp.h>
42 #include <drain/prog/CommandBankUtils.h>
43 #include <drain/util/Rectangle.h>
44 #include <drain/util/StatusFlags.h>
45 #include <drain/util/TreeOrdered.h>
49 #include "hi5/Hi5Read.h"
50 #include "data/DataSelector.h"
51 #include "data/PolarODIM.h"
52 #include "data/ProductConf.h"
53 #include "data/VariableFormatterODIM.h"
54 #include "radar/Composite.h"
55 #include "radar/RadarAccumulator.h"
57 #include "resources-base.h"
122 bool guessDatasetGroup(
const Hi5Tree & src,
ODIMPathElem & pathElem)
const;
125 Hi5Tree & src =
getHi5(CURRENT);
126 return guessDatasetGroup(src, pathElem);
144 template <
typename T,
typename ...TT>
145 Hi5Tree &
getHi5(
const T &filter,
const TT &... filters){
148 Hi5Tree & dst = getHi5Full(f);
152 return getHi5(filters...);
157 Hi5Tree & getHi5Full(h5_role::ivalue_t & filter);
178 ODIMPath findImage(
const DataSelector & imageSelector);
181 ODIMPath findImage();
215 const VariableFormatterODIM<drain::Variable> variableFormatter;
218 const VariableFormatterODIM<drain::FlexibleVariable> flexVariableFormatter;
234 return drain::Static::get<RackContext>();
Definition: Context.h:204
A tool for expanding variables embedded in a std::string to literals.
Definition: StringMapper.h:275
Adds class-specific convenience functions.
Definition: Context.h:318
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition: Image.h:184
Definition: resources-base.h:153
Cartesian composite (mosaic) of data from several radars.
Definition: Composite.h:105
Definition: resources-base.h:173
Definition: resources-base.h:53
Definition: ODIMPath.h:82
Shared properties for meteorological products and Cartesian products (composites and single-radar ima...
Definition: ProductConf.h:63
Resources provided separately for each thread.
Definition: resources.h:67
static const drain::StringMapper variableMapper
Definition: resources.h:93
drain::image::Image & getModifiableImage()
Return current image, if modifiable. Else, copy (convert).
Definition: resources.cpp:410
const drain::image::Image & getCurrentGrayImage()
Light and lazy.
Definition: resources.cpp:177
Composite composite
TODO: inherit from ProductBase.
Definition: resources.h:119
RackContext()
Initializes data and image pointers to default targets or NULL.
Definition: resources.cpp:42
const drain::image::Image & getCurrentImage()
Light and lazy.
Definition: resources.cpp:195
Hi5Tree & getHi5(const T &filter, const TT &... filters)
Definition: resources.h:145
std::string inputPrefix
Path prefix for input files. Move to resources?
Definition: resources.h:104
virtual void updateStatus() const final
Definition: resources.cpp:492
void convertGrayImage(const drain::image::Image &srcImage)
Definition: resources.cpp:374
const drain::image::Image & updateCurrentImage()
Ensures current image.
Definition: resources.cpp:314
Composite & getComposite(h5_role::ivalue_t filter)
Definition: resources.cpp:139
std::string outputPrefix
Path prefix for output files. Move to resources?
Definition: resources.h:107
A container for shared resources applied by RackLets.
Definition: resources.h:250
Data array for creating composites and accumulated polar products (Surface rain fall or cluttermaps)
Definition: RadarAccumulator.h:61
Definition: DataSelector.cpp:44
RackResources & getResources()
Default instance.
Definition: resources.cpp:545