Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Aoflagger
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcel Loose
Aoflagger
Commits
fc3cae7a
Commit
fc3cae7a
authored
2 years ago
by
Andre Offringa
Browse files
Options
Downloads
Patches
Plain Diff
Work in progress
parent
e14ae25e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
applications/rfigui.cpp
+14
-5
14 additions, 5 deletions
applications/rfigui.cpp
util/progress/stdoutreporter.h
+13
-1
13 additions, 1 deletion
util/progress/stdoutreporter.h
with
27 additions
and
6 deletions
applications/rfigui.cpp
+
14
−
5
View file @
fc3cae7a
...
...
@@ -4,6 +4,7 @@
#include
"../rfigui/controllers/rfiguicontroller.h"
#include
"../util/logger.h"
#include
"../util/progress/stdoutreporter.h"
#include
"../imagesets/msimageset.h"
#include
"../imagesets/msoptions.h"
...
...
@@ -152,16 +153,24 @@ static void run(int argc, char* argv[]) {
if
(
imageSet
==
nullptr
)
throw
std
::
runtime_error
(
"Option -save-baseline can only be used for measurement sets.
\n
"
);
MaskedHeatMap
&
plot
=
controller
.
TFController
().
Plot
();
plot
.
SetShowOriginalMask
(
plotFlags
);
plot
.
SetShowXAxisDescription
(
true
);
plot
.
SetShowYAxisDescription
(
true
);
plot
.
SetShowZAxisDescription
(
true
);
for
(
const
SavedBaseline
&
b
:
savedBaselines
)
{
auto
index
=
imageSet
->
Index
(
b
.
a1Index
,
b
.
a2Index
,
b
.
bandIndex
,
b
.
sequenceIndex
);
if
(
!
index
)
throw
std
::
runtime_error
(
"Baseline not found!"
);
controller
.
SetImageSetIndex
(
*
index
);
StdOutReporter
reporter
;
reporter
.
SignalFinished
().
connect
([
&
](
bool
success
)
{
std
::
cout
<<
"FINISH
\n
"
;
//controller.LoadCurrentTFDataFinish(success);
});
std
::
thread
thread
(
[
&
]()
{
controller
.
LoadCurrentTFDataAsync
(
reporter
);
});
thread
.
join
();
MaskedHeatMap
&
plot
=
controller
.
TFController
().
Plot
();
plot
.
SetShowOriginalMask
(
plotFlags
);
plot
.
SetShowXAxisDescription
(
true
);
plot
.
SetShowYAxisDescription
(
true
);
plot
.
SetShowZAxisDescription
(
true
);
plot
.
SaveByExtension
(
b
.
filename
,
800
,
480
);
}
}
...
...
This diff is collapsed.
Click to expand it.
util/progress/stdoutreporter.h
+
13
−
1
View file @
fc3cae7a
...
...
@@ -7,6 +7,8 @@
#include
<string>
#include
<iostream>
#include
<sigc++/signal.h>
class
StdOutReporter
final
:
public
ProgressListener
{
public:
void
OnStartTask
(
const
std
::
string
&
description
)
override
{
...
...
@@ -21,10 +23,20 @@ class StdOutReporter final : public ProgressListener {
std
::
cout
<<
'.'
<<
std
::
flush
;
}
}
void
OnFinish
()
override
{
std
::
cout
<<
"100
\n
"
;
}
void
OnFinish
()
override
{
std
::
cout
<<
"100
\n
"
;
_signalFinished
(
true
);
}
void
OnException
(
std
::
exception
&
thrown_exception
)
override
{
std
::
cerr
<<
"ERROR! "
<<
thrown_exception
.
what
()
<<
'\n'
;
_signalError
(
thrown_exception
.
what
());
_signalFinished
(
false
);
}
sigc
::
signal
<
void
,
bool
/*errors occurred? */
>&
SignalFinished
()
{
return
_signalFinished
;
}
sigc
::
signal
<
void
,
const
std
::
string
&>&
SignalError
()
{
return
_signalError
;
}
private
:
sigc
::
signal
<
void
,
bool
>
_signalFinished
;
sigc
::
signal
<
void
,
const
std
::
string
&>
_signalError
;
};
#endif // UTIL_PROGRESS_STD_OUT_REPORTER_H_
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment