// // // Definitions for METFLOW .dat file header // // Assuming the single transducer data file // // 1999/09/02 Created by Tatsuya Kawaguchi // 2020/08/01 Modified by Tatsuya Kawaguchi // #ifndef _HEADER_H_INCLUDED_ #define _HEADER_H_INCLUDED_ #include #include // // for Single Transducer data file // #pragma pack(push, 1) struct METFLOW_DATHEADER { // offset int16_t dummy0; // 0x00 Skip first 2 byte int16_t chn_dx; // 0x02 Channel distance (micro meter) int16_t p_ch_s; // 0x04 Window-start position (mm) int16_t p_ch_e; // 0x06 Window-end position (mm) int16_t c_sound; // 0x08 Sound velocity (m/s) int16_t sto_int; // 0x0A Storing interval int16_t rf_g_s; // 0x0C RF gain start int16_t rf_g_e; // 0x0E RF gain end int16_t emis_v; // 0x10 Emission voltage (V) int16_t scr_scl; // 0x12 screen scale int16_t trg_mod; // 0x14 Trigger mode int16_t aut_mod; // 0x16 Auto mode int16_t scr_typ; // 0x18 Screen type int16_t frq_bas; // 0x1A Basic frequency of ultrasound (kHz) int16_t frq_prf; // 0x1C Pulse repetition frequency, Fprf (Hz) int16_t mstime; // 0x1E measuring time (msec) PS only // int16_t dummy1; // 0x20 ???? no description in manual int16_t frq_rep; // 0x22 number of repetition( for Doppler calc) int16_t cyc_pls; // 0x24 cycles per pulse int16_t n_level; // 0x26 noise level int32_t no_block; // 0x28 No. of blocks PS only int32_t no_prof_block; // 0x2C No. of profile/block PS only int8_t dummy2[0x100-0x30+2]; char memo[0x100]; }; #pragma pack(pop) void DispHdr( const METFLOW_DATHEADER& hdr, std::ostream& ostr = std::cout ) { ostr << "-------------- header --------------------" << endl; ostr << "chn_dx =, " << hdr.chn_dx << ", um" << ",Channel Distance" << "\n"; ostr << "p_ch_s =, " << hdr.p_ch_s << ", mm" << ",Window start position" << "\n"; ostr << "p_ch_e =, " << hdr.p_ch_e << ", mm" << ",Window end Position" << "\n"; ostr << "c_sound =, " << hdr.c_sound << ", m/s" << ",Sound velocity" << "\n"; ostr << "sto_int =, " << hdr.sto_int << ",,Storing interval" << "\n"; ostr << "rf_g_s =, " << hdr.rf_g_s << ",,RF gain start" << "\n"; ostr << "rf_g_e =, " << hdr.rf_g_e << ",,RF gain end" << "\n"; ostr << "emis_v =, " << hdr.emis_v << ", V" << ",Emission voltage" << "\n"; ostr << "scr_scl =, " << hdr.scr_scl << ",,Screen scale" << "\n"; ostr << "trg_mod =, " << hdr.trg_mod << ",,Trigger mode 0=off 1=Man 3=Pos 5=Neg" << "\n"; ostr << "aut_mod =, " << hdr.aut_mod << ",,Auto record mode 0=off 1=HD 2=FD" << "\n"; ostr << "scr_typ =, " << hdr.scr_typ << ",,Display type 0=Normal 1=Pos 2=Pos double 3=Neg 4=Neg double" << "\n"; ostr << "frq_bas =, " << hdr.frq_bas << ", kHz" << ", Basic frequency of ultrsdound" << "\n"; ostr << "frq_prf =, " << hdr.frq_prf << ", Hz" << ",Pulse repetition frequency f_prf" << "\n"; ostr << "mstime =, " << hdr.mstime << ", ms" << ",Measuring time" << "\n"; ostr << "frq_rep =, " << hdr.frq_rep << ",, number of repetition for Doppler calculation" << "\n"; ostr << "cyc_pls =, " << hdr.cyc_pls << ",, Cycles per pulse" << "\n"; ostr << "n_level =, " << hdr.n_level << ",,Noise level" << "\n"; ostr << "no_block =, " << hdr.no_block << "," << "\n"; ostr << "no_prof_block =, " << hdr.no_prof_block << "," << "\n"; ostr << "memo =, [" << hdr.memo << "]" << "," << "\n"; ostr << "-----------------------------------------" << endl; ostr << "\n\n"; } #endif