33 #define H5_USE_18_API_DEFAULT 1
46 #include <drain/Log.h>
49 #include <drain/image/Image.h>
50 #include <drain/util/FileInfo.h>
51 #include <drain/util/TreeOrdered.h>
53 #include "data/ODIMPath.h"
82 return (image.isEmpty() && attributes.empty());
114 typedef drain::OrderedTree<hi5::NodeHi5, false, rack::ODIMPath> Hi5Tree;
127 void handleStatus(herr_t status,
const std::string & message,
drain::Logger &mout,
int lineNo=0);
129 template <
int L,
class T>
132 void handleStatus(
drain::Logger &mout, herr_t status,
const std::string & message,
const T & arg,
int lineNo=0){
137 mout.
start<L>() << message <<
": " << arg;
139 mout <<
", line=" << lineNo;
140 mout <<
", status=" << status << mout.endl;
160 hid_t getH5StringVariableLength();
170 void linkPalette(
const Hi5Tree & palette, Hi5Tree & dst);
175 void writeText(
const Hi5Tree &src,
const std::list<typename Hi5Tree::path_t> & paths, std::ostream & ostr = std::cout);
179 void writeText(
const Hi5Tree &src, std::ostream & ostr = std::cout){
180 std::list<typename Hi5Tree::path_t> paths;
191 void readText(Hi5Tree &src, std::istream & istr = std::cin);
208 void parsePath(
const std::string & line, Hi5Tree::path_t & path, std::string & attrKey, std::string & attrValue);
217 void readTextLine(Hi5Tree &src,
const std::string & line);
242 std::ostream & operator<<(std::ostream &ostr,
const hi5::NodeHi5 &n);
245 std::ostream & operator<<(std::ostream &ostr,
const Hi5Tree & tree);
Definition: FileInfo.h:48
Handler for notifications sent by a Logger.
Definition: Log.h:147
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition: Log.h:308
Logger & start(const TT &... args)
General.
Definition: Log.h:364
void importMap(const std::map< std::string, S > &m)
Assign values from a map, overriding existing entries.
Definition: SmartMap.h:252
static void getPaths(const TR &tree, S &container)
Returns a list of the node names matching a pattern. The trailing '/' is NOT appended ie....
Definition: TreeUtils.h:98
A map of Variables.
Definition: VariableMap.h:61
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition: Image.h:184
Base class for Reader and Writer, essentially just wrapping some utilities.
Definition: Hi5.h:122
static void writeText(const Hi5Tree &src, const std::list< typename Hi5Tree::path_t > &paths, std::ostream &ostr=std::cout)
Dumps the H5 structure, attributes and data properties.
Definition: Hi5.cpp:302
static hid_t getH5StandardType(const std::type_info &type)
Give a native C++ type, returns a standard(?) HDF5 data type.
Definition: Hi5.cpp:128
static drain::image::Image & getPalette(Hi5Tree &dst)
Creates a 256-element RGB palette to be referenced with linkPalette().
Definition: Hi5.cpp:259
static void deleteExcluded(Hi5Tree &src)
Traverse subtree setting exclude=true .
Definition: Hi5.cpp:448
static void parsePath(const std::string &line, Hi5Tree::path_t &path, std::string &attrKey, std::string &attrValue)
Split full path string to path object and attribute key.
Definition: Hi5.cpp:433
static hid_t getH5NativeDataType()
Given a native C++ type, returns a native HDF5 data type.
Definition: Hi5.h:155
static void writeText(const Hi5Tree &src, std::ostream &ostr=std::cout)
Dumps the H5 structure, attributes and data properties. (Calls writeText(src, src....
Definition: Hi5.h:179
static void assignAttribute(Hi5Tree &dst, const std::string &assignment)
Definition: Hi5.cpp:353
static void linkPalette(const Hi5Tree &palette, Hi5Tree &dst)
Links the palette that has been (or will be) created with createPalette().
Definition: Hi5.cpp:294
static void readText(Hi5Tree &src, std::istream &istr=std::cin)
Constructs a tree from formatted text. See writeText().
Definition: Hi5.cpp:311
static void readTextLine(Hi5Tree &src, const std::string &line)
Assign a value with optional type specification.
Definition: Hi5.cpp:332
Rack's hi5 structure that uses Rack classes (Tree, Data, Image).
Definition: Hi5.h:74
bool exclude
Experimental.
Definition: Hi5.h:106
void writeText(std::ostream &ostr=std::cout, const rack::ODIMPath &prefix=rack::ODIMPath()) const
Definition: Hi5.cpp:58