pub struct EDFHeader { /* private fields */ }Implementations§
Source§impl EDFHeader
impl EDFHeader
pub fn new() -> Self
pub fn with_version(&mut self, version: String) -> &mut Self
pub fn with_patient_id(&mut self, patient_id: PatientId) -> &mut Self
pub fn with_recording_id(&mut self, recording_id: RecordingId) -> &mut Self
pub fn with_start_date(&mut self, start_date: NaiveDate) -> &mut Self
pub fn with_start_time(&mut self, start_time: NaiveTime) -> &mut Self
pub fn with_specification( &mut self, specification: EDFSpecifications, ) -> &mut Self
pub fn with_is_continuous(&mut self, is_continuous: bool) -> &mut Self
pub fn with_record_count(&mut self, record_count: usize) -> &mut Self
pub fn with_record_duration(&mut self, record_duration: f64) -> &mut Self
pub fn get_version(&self) -> &String
pub fn get_patient_id(&self) -> &PatientId
pub fn get_recording_id(&self) -> &RecordingId
pub fn get_start_date(&self) -> NaiveDate
pub fn get_start_time(&self) -> NaiveTime
pub fn get_header_bytes(&self) -> usize
pub fn get_specification(&self) -> EDFSpecifications
pub fn is_continuous(&self) -> bool
pub fn get_record_count(&self) -> Option<usize>
pub fn get_record_duration(&self) -> f64
pub fn get_signals(&self) -> &Vec<SignalHeader>
pub fn calculate_header_bytes(&self) -> usize
pub fn data_record_bytes(&self) -> usize
pub fn get_signal_sample_frequency(&self, signal_index: usize) -> Option<f64>
pub fn create_record(&self) -> Record
pub fn serialize(&self) -> Result<String, EDFError>
pub fn deserialize<R: BufRead + Seek>(reader: &mut R) -> Result<Self, EDFError>
Sourcepub fn get_sha256(&self) -> Result<String, EDFError>
pub fn get_sha256(&self) -> Result<String, EDFError>
Serializes the header of the EDF file and calculates a SHA256 hash and returns the result
pub fn is_recording(&self) -> bool
Sourcepub fn start_date(&self) -> NaiveDate
pub fn start_date(&self) -> NaiveDate
Returns the start date of the recording by returning the start date specified in recording_id or
if it is not specified, using the old start-date value. Note that the old start date only supports the
year range 1985 - 2084, a year outside this range will return the year 2100. This means if the start date
is not specified within the recording_id, you might get an invalid date.
Sourcepub fn parse_old_start_date(date: &str) -> Result<NaiveDate, EDFError>
pub fn parse_old_start_date(date: &str) -> Result<NaiveDate, EDFError>
Returns the parsed old style date with clipping year 1985. When the year is later than 2084, the expected input year is the string ‘yy’ and this will return the NativeDate with year 2100. Input format has to be dd.mm.yy
Sourcepub fn serialize_old_start_date(date: &NaiveDate) -> String
pub fn serialize_old_start_date(date: &NaiveDate) -> String
Returns the serialized old style date with clipping year 1985. When the year is later than 2084, the expected output year is the string ‘yy’. The output format will be dd.mm.yy