Source
1
1
#ifndef IMAGEANALYSIS_IMAGEHISTORY_H
2
2
#define IMAGEANALYSIS_IMAGEHISTORY_H
3
3
4
4
#include <imageanalysis/ImageTypedefs.h>
5
5
6
6
#include <casa/namespace.h>
7
7
8
+
namespace casac {
9
+
10
+
class variant;
11
+
12
+
}
13
+
8
14
namespace casa {
9
15
10
16
template <class T> class ImageHistory {
11
17
// <summary>
12
18
// Top level interface accessing image history data.
13
19
// </summary>
14
20
15
21
// <reviewed reviewer="" date="" tests="" demos="">
16
22
// </reviewed>
17
23
22
28
// Image History access
23
29
// </etymology>
24
30
25
31
// <synopsis>
26
32
// Top level interface for accessing image history.
27
33
// </synopsis>
28
34
29
35
public:
30
36
31
37
ImageHistory() = delete;
38
+
32
39
ImageHistory(const SPIIT image);
33
40
34
41
// destructor
35
42
~ImageHistory() {}
36
43
37
44
// add a line to the history
38
45
void addHistory(
39
46
const casacore::String& origin, const casacore::String& history
40
47
);
41
48
54
61
);
55
62
56
63
void addHistory(
57
64
const casacore::String& origin, const std::vector<string>& history
58
65
);
59
66
60
67
void addHistory(
61
68
const std::vector<std::pair<casacore::LogOrigin, casacore::String> >& history
62
69
);
63
70
71
+
void addHistory(
72
+
const std::vector<std::pair<casacore::String, casacore::String>>& history
73
+
);
74
+
64
75
// erase all messages. Cannot be undone!
65
76
void clear();
66
77
67
78
std::vector<casacore::String> get(casacore::Bool list) const;
68
79
std::vector<string> getAsStdStrings(casacore::Bool list) const;
69
80
81
+
// return a vector<String> containing a formatted application
82
+
// summary. Nothing is written to them image that is useful for
83
+
// history writing.
84
+
static std::vector<std::pair<casacore::String, casacore::String>>
85
+
getApplicationHistory(
86
+
const casacore::LogOrigin& origin, const casacore::String& taskname,
87
+
const vector<casacore::String>& paramNames,
88
+
const vector<casac::variant>& paramValues,
89
+
const casacore::String& imageName
90
+
);
91
+
70
92
// <group>
71
93
//Append the specified image's history to this image's history
72
94
template <class U> void append(SPCIIU image);
73
95
74
96
template <class U> void append(SPIIU image);
75
97
// </group>
76
98
77
99
casacore::String getClass() const { const static casacore::String s = "ImageHistory"; return s; }
78
100
79
101
casacore::LogIO& getLogSink();