Main Content

modifyHeader

EDF または EDF+ ファイルのヘッダー詳細の変更

R2021a 以降

    説明

    edfw = modifyHeader(edfw,hdr) は、構造体 hdr で指定されるヘッダーを使用して、edfw のヘッダー フィールドを変更します。

    すべて折りたたむ

    EDF ファイルのヘッダー レコードを作成して患者識別、記録情報および開始時間を指定します。

    hdr = edfheader("EDF");
    hdr.Patient = "001 M 2020";
    hdr.Recording = "This is the original header record";
    hdr.StartTime = "00.00.01"
    hdr = struct with fields:
                   Patient: "001 M 2020"
                 Recording: "This is the original header record"
                 StartDate: "07.03.24"
                 StartTime: "00.00.01"
                  Reserved: ""
            NumDataRecords: -1
        DataRecordDuration: 1 sec
                NumSignals: []
              SignalLabels: [0x0 string]
           TransducerTypes: [0x0 string]
        PhysicalDimensions: [0x0 string]
               PhysicalMin: []
               PhysicalMax: []
                DigitalMin: []
                DigitalMax: []
                 Prefilter: [0x0 string]
            SignalReserved: [0x0 string]
    
    

    ヘッダー レコードとランダムな 10 サンプルの信号を含む新しい EDF ファイルを作成します。hdr で、信号の数および信号の物理的最小値と最大値を指定します。入力サンプル タイプを physical として設定します。

    sig = randn(10,1);
    hdr.NumSignals = 1;
    hdr.PhysicalMin = min(sig);
    hdr.PhysicalMax = max(sig);
    edfw = edfwrite("file.edf",hdr,sig,"InputSampleType","physical");

    変更後の患者情報、記録情報および開始時間を使用して新しいヘッダー構造体を作成します。

    newhdr.Patient = "002 F 2020";
    newhdr.Recording = "This is a test";
    newhdr.StartTime = "11.11.10";

    newhdr の新しい情報に基づき、file の元のヘッダー レコードを変更します。ファイルのプロパティを表示します。

    edfw = modifyHeader(edfw,newhdr);
    edfinfo("file.edf")
    ans = 
      edfinfo with properties:
    
                  Filename: "file.edf"
               FileModDate: "07-Mar-2024 15:12:57"
                  FileSize: 532
                   Version: "0"
                   Patient: "002 F 2020"
                 Recording: "This is a test"
                 StartDate: "07.03.24"
                 StartTime: "11.11.10"
               HeaderBytes: 512
                  Reserved: ""
            NumDataRecords: -1
        DataRecordDuration: 1 sec
                NumSignals: 1
              SignalLabels: "Signal_1"
           TransducerTypes: ""
        PhysicalDimensions: ""
               PhysicalMin: -2.2588
               PhysicalMax: 3.5784
                DigitalMin: 0
                DigitalMax: 0
                 Prefilter: ""
                NumSamples: 10
            SignalReserved: ""
               Annotations: [0x2 timetable]
    
    

    入力引数

    すべて折りたたむ

    EDF または EDF+ ファイル。edfwrite オブジェクトとして指定します。

    ヘッダー。構造体として指定します。hdr には、次のフィールドを 1 つ以上含めることができます。

    • Patient

    • Recording

    • StartDate

    • StartTime

    • SignalLabels

    • TransducerTypes

    • PhysicalDimensions

    • PhysicalMin

    • PhysicalMax

    • DigitalMin

    • DigitalMax

    • Prefilter

    • SignalReserved

    ヘッダー構造体に含めることができるフィールドの詳細については、edfheaderを参照してください。

    データ型: struct

    出力引数

    すべて折りたたむ

    EDF または EDF+ ファイル。edfwrite オブジェクトとして返されます。

    参照

    [1] Kemp, Bob, Alpo Värri, Agostinho C. Rosa, Kim D. Nielsen, and John Gade. “A Simple Format for Exchange of Digitized Polygraphic Recordings.” Electroencephalography and Clinical Neurophysiology 82, no. 5 (May 1992): 391–93. https://doi.org/10.1016/0013-4694(92)90009-7.

    [2] Kemp, Bob, and Jesus Olivan. "European Data Format 'plus' (EDF+), an EDF Alike Standard Format for the Exchange of Physiological Data." Clinical Neurophysiology 114, no. 9 (2003): 1755–1761. https://doi.org/10.1016/S1388-2457(03)00123-8.

    バージョン履歴

    R2021a で導入

    参考

    アプリ

    オブジェクト

    関数

    外部の Web サイト