[med-svn] [SCM] aghermann branch, master, updated. 551e213a23b59b71cba6a9c3a282d1b60e21b854
Andrei Zavada
johnhommer at gmail.com
Sun Apr 21 23:18:12 UTC 2013
The following commit has been merged in the master branch:
commit 2af8324558798dc0c5292e59352d3b18ab8cf8fc
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Fri Apr 19 18:51:47 2013 +0300
ICM
diff --git a/src/libsigfile/edf.cc b/src/libsigfile/edf.cc
index 11b2fdb..9136e17 100644
--- a/src/libsigfile/edf.cc
+++ b/src/libsigfile/edf.cc
@@ -450,7 +450,7 @@ write_ancillary_files()
} else
if ( unlink( make_fname_artifacts( I.label).c_str()) ) {}
- if ( I.annotations.size() ) {
+ if ( not I.annotations.empty() ) {
ofstream thomas (make_fname_annotations( I.label), ios_base::trunc);
for ( auto &A : I.annotations )
thomas << (int)A.type << ' ' << A.span.a << ' ' << A.span.z << ' ' << A.label << EOA << endl;
@@ -799,7 +799,7 @@ _parse_header()
if ( not H.label.follows_system1020() ) { // in case there are duplicate labels, rewrite
DEF_UNIQUE_CHARP (_);
- if ( asprintf( &_, "%zu:<%s>", i, H.label.c_str()) ) {}
+ ASPRINTF( &_, "%zu:<%s>", i, H.label.c_str());
H.label.assign( _);
_status |= non1020_channel;
}
diff --git a/src/ui/sf/montage.cc b/src/ui/sf/montage.cc
index 7410d11..4218c8b 100644
--- a/src/ui/sf/montage.cc
+++ b/src/ui/sf/montage.cc
@@ -718,9 +718,25 @@ draw_montage( cairo_t* cr)
size_t half_pad = da_wd * true_frac/2,
ef = da_wd * (1. - true_frac); // w + 10% = d
- // background, is now common to all channels
using namespace sigfile;
- if ( mode == TMode::scoring ) {
+ switch ( mode ) {
+ case TMode::showing_ics:
+ if ( ica_components.size() == 0 ) {
+ aghui::cairo_put_banner(
+ cr, da_wd, da_ht,
+ "Now set up ICA parameters, then press [Compute ICs]");
+ } else
+ _draw_matrix_to_montage( cr, ica_components);
+ // draw ignoring channels' zeroy
+ break;
+ case TMode::separating:
+ aghui::cairo_put_banner(
+ cr, da_wd, da_ht,
+ "Separating...");
+ break;
+ case TMode::scoring:
+ // background, is now common to all channels
+ {
double ppart = (double)pagesize()/vpagesize();
int cp = cur_page();
for ( int pp = cp-1; ; ++pp ) {
@@ -742,24 +758,7 @@ draw_montage( cairo_t* cr)
cairo_stroke( cr);
}
}
-
- switch ( mode ) {
- case TMode::showing_ics:
- if ( ica_components.size() == 0 ) {
- aghui::cairo_put_banner(
- cr, da_wd, da_ht,
- "Now set up ICA parameters, then press [Compute ICs]");
- } else
- _draw_matrix_to_montage( cr, ica_components);
- // draw ignoring channels' zeroy
- break;
- case TMode::separating:
- aghui::cairo_put_banner(
- cr, da_wd, da_ht,
- "Separating...");
- break;
case TMode::showing_remixed:
- case TMode::scoring:
default:
// draw individual signal pages (let SChannel::draw_page_static draw the appropriate signal)
for ( auto &H : channels )
--
Sleep experiment manager
More information about the debian-med-commit
mailing list