[med-svn] [SCM] aghermann branch, master, updated. c0bd21ca8eb529ade7e0c7aad22951a308a8dc8f
Andrei Zavada
johnhommer at gmail.com
Wed May 1 00:09:28 UTC 2013
The following commit has been merged in the master branch:
commit 61a2f27252d1c0ec065738397d901a89f1161c5c
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Wed Apr 24 01:04:19 2013 +0300
deal with (>'z'-'a') channels
and use using to shorten lines
diff --git a/src/ui/sf/channel.cc b/src/ui/sf/channel.cc
index 914d578..f669e53 100644
--- a/src/ui/sf/channel.cc
+++ b/src/ui/sf/channel.cc
@@ -25,11 +25,13 @@ pattern::SPatternPPack<TFloat>
aghui::SScoringFacility::SChannel::pattern_params =
{.25, 0., 1.5, 1, .1, .5, 3};
+using confval::SValidator;
+
aghui::SScoringFacility::SChannel::
-SChannel( agh::CRecording& r,
+SChannel (agh::CRecording& r,
SScoringFacility& parent,
size_t y0,
- char seq)
+ int seq)
: name (r.channel()),
type (r.signal_type()),
crecording (r),
@@ -66,35 +68,35 @@ SChannel( agh::CRecording& r,
draw_phasic_eyeblink (true),
apply_reconstituted (false),
config_keys_b ({
- confval::SValidator<bool>( string(1, seq) + ".hidden", &hidden),
- confval::SValidator<bool>( string(1, seq) + ".draw_zeroline", &draw_zeroline),
- confval::SValidator<bool>( string(1, seq) + ".draw_original_signal", &draw_original_signal),
- confval::SValidator<bool>( string(1, seq) + ".draw_filtered_signal", &draw_filtered_signal),
- confval::SValidator<bool>( string(1, seq) + ".draw_emg", &draw_emg),
- confval::SValidator<bool>( string(1, seq) + ".draw_psd", &draw_psd),
- confval::SValidator<bool>( string(1, seq) + ".draw_swu", &draw_swu),
- confval::SValidator<bool>( string(1, seq) + ".draw_psd_bands", &draw_psd_bands),
- confval::SValidator<bool>( string(1, seq) + ".draw_spectrum", &draw_spectrum),
- confval::SValidator<bool>( string(1, seq) + ".draw_mc", &draw_mc),
- confval::SValidator<bool>( string(1, seq) + ".draw_phasic_spindle", &draw_phasic_spindle),
- confval::SValidator<bool>( string(1, seq) + ".draw_phasic_Kcomplex", &draw_phasic_Kcomplex),
- confval::SValidator<bool>( string(1, seq) + ".draw_phasic_eyeblink", &draw_phasic_eyeblink),
- confval::SValidator<bool>( string(1, seq) + ".autoscale_profile", &autoscale_profile),
- confval::SValidator<bool>( string(1, seq) + ".resample_signal", &resample_signal),
- confval::SValidator<bool>( string(1, seq) + ".resample_power", &resample_power),
- confval::SValidator<bool>( string(1, seq) + ".draw_selection_course", &draw_selection_course),
- confval::SValidator<bool>( string(1, seq) + ".draw_selection_envelope", &draw_selection_envelope),
- confval::SValidator<bool>( string(1, seq) + ".draw_selection_dzcdf", &draw_selection_dzcdf),
+ SValidator<bool>( string("h")+to_string(seq) + ".hidden", &hidden),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_zeroline", &draw_zeroline),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_original_signal", &draw_original_signal),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_filtered_signal", &draw_filtered_signal),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_emg", &draw_emg),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_psd", &draw_psd),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_swu", &draw_swu),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_psd_bands", &draw_psd_bands),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_spectrum", &draw_spectrum),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_mc", &draw_mc),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_phasic_spindle", &draw_phasic_spindle),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_phasic_Kcomplex", &draw_phasic_Kcomplex),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_phasic_eyeblink", &draw_phasic_eyeblink),
+ SValidator<bool>( string("h")+to_string(seq) + ".autoscale_profile", &autoscale_profile),
+ SValidator<bool>( string("h")+to_string(seq) + ".resample_signal", &resample_signal),
+ SValidator<bool>( string("h")+to_string(seq) + ".resample_power", &resample_power),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_selection_course", &draw_selection_course),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_selection_envelope", &draw_selection_envelope),
+ SValidator<bool>( string("h")+to_string(seq) + ".draw_selection_dzcdf", &draw_selection_dzcdf),
}),
config_keys_g ({
- confval::SValidator<double>( string(1, seq) + ".zeroy", &zeroy, confval::SValidator<double>::SVFRangeIn (-100., 4000.)),
- confval::SValidator<double>( string(1, seq) + ".selection_start_time", &selection_start_time),
- confval::SValidator<double>( string(1, seq) + ".selection_end_time", &selection_end_time),
- confval::SValidator<double>( string(1, seq) + ".signal_display_scale", &signal_display_scale, confval::SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
- confval::SValidator<double>( string(1, seq) + ".psd_display_scale", &psd.display_scale, confval::SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
- confval::SValidator<double>( string(1, seq) + ".swu_display_scale", &swu.display_scale, confval::SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
- confval::SValidator<double>( string(1, seq) + ".mc_display_scale", &mc.display_scale, confval::SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
- confval::SValidator<double>( string(1, seq) + ".emg_display_scale", &emg_display_scale, confval::SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
+ SValidator<double>( string("h")+to_string(seq) + ".zeroy", &zeroy, SValidator<double>::SVFRangeIn (-100., 4000.)),
+ SValidator<double>( string("h")+to_string(seq) + ".selection_start_time", &selection_start_time),
+ SValidator<double>( string("h")+to_string(seq) + ".selection_end_time", &selection_end_time),
+ SValidator<double>( string("h")+to_string(seq) + ".signal_display_scale", &signal_display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
+ SValidator<double>( string("h")+to_string(seq) + ".psd_display_scale", &psd.display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
+ SValidator<double>( string("h")+to_string(seq) + ".swu_display_scale", &swu.display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
+ SValidator<double>( string("h")+to_string(seq) + ".mc_display_scale", &mc.display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
+ SValidator<double>( string("h")+to_string(seq) + ".emg_display_scale", &emg_display_scale, SValidator<double>::SVFRangeIn (DBL_MIN, INFINITY)),
}),
marquee_start (0.),
marquee_end (0.),
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index 941330d..a74d29c 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -100,7 +100,7 @@ SScoringFacility (agh::CSubject& J,
// add channels, EEGs first, then EOG, EMG, then the rest
{
size_t y = interchannel_gap / 2.;
- char seq = 'a';
+ int seq = 1;
for ( auto &H : _sepisode.recordings )
if ( H.second.signal_type() == sigfile::SChannel::TType::eeg ) {
snprintf_buf( "Reading and processing EEG channel %s ...", H.first.c_str());
diff --git a/src/ui/sf/sf.hh b/src/ui/sf/sf.hh
index a7880ba..d334981 100644
--- a/src/ui/sf/sf.hh
+++ b/src/ui/sf/sf.hh
@@ -203,7 +203,7 @@ class SScoringFacility
void mark_region_as_pattern();
// ctor, dtor
- SChannel( agh::CRecording& r, SScoringFacility&, size_t y, char seq);
+ SChannel( agh::CRecording& r, SScoringFacility&, size_t y, int seq);
int h() const
{
--
Sleep experiment manager
More information about the debian-med-commit
mailing list