/* pqdmpf.h Copyright (c) 1993-2022, David A. Clunie DBA PixelMed Publishing. All rights reserved. */
#ifdef CRAP

// Automatically generated from template - EDITS WILL BE LOST
//
// Generated by tpltohdr.awk with options or defaults ...
//
// 	 role=dump
// 	 prefix=PQ_
// 	 dicomfunctionname=ToDicom_Template
// 	 dumpcommonfunctionname=DumpCommon
// 	 dumpselectedimagefunctionname=DumpSelectedImage
// 	 headeroffsetprefix=PQ_Offset
// 	 headeroffsetsuffix=ptr
// 	 headerclassprefix=PQ_HeaderClass
// 	 headerdicomclassprefix=PQ_Header_BothClass
// 	 headerdumpclassprefix=PQ_Header_BothClass
// 	 headerinstanceprefix=PQ_HeaderInstance
// 	 methodnameprefix=PQ_Method
// 	 methodconstructorargsprefix=PQ_MethodConstructorArgs
// 	 headerclassparameters=

void 
PQ_Header_BothClass::DumpCommon(TextOutputStream *log)
{
}
#endif

struct PQ_Data_Dictionary_Entry {
	const char *name;
	const char *desc;
};

static struct PQ_Data_Dictionary_Entry PQ_Data_Dictionary[] = {

"AAA_DEL",	"Deleted_Flag",
"AAA_FNU",	"File_Seq_in_Study",
"AAA_GAP",	"SDR/RDB_Gap",
"AAA_MSK",	"Access_Mask",
"AAA_NXT",	"O-Disk_Study_Next_Pos",
"AAA_POS",	"O-Disk_Study_Pos_Sect",
"AAA_SEQ",	"Study_Seq_on_Tape",
"ACQTAG",	"Acquisition_Tag",
"ACQ_BAT",	"Batch_Acquisition_Set",
"AIRINTP",	"Aircal_Interpolated",
"ANATOMY",	"Anatomy",
"BEAMLIM",	"Beam_Limiter_On_Off",
"CALSRC",	"Cal Source",
"COMNT_1",	"Comments_1",
"COMNT_2",	"Comments_2",
"COMNT_3",	"Comments_3",
"COMNT_4",	"Comments_4",
"COMNT_A",	"Acquisition_Comments",
"COMNT_D",	"Display_Brief_Commnt",
"COMNT_F",	"Folder_Comments",
"COMNT_I",	"Image_Comments",
"COMNT_P",	"Patient_Comments",
"COMNT_S",	"Study_Comments",
"CONTR",	"Contrast",
"COUCH",	"Couch_Posit_1234.12",
"COUCHAQ",	"Init_Couch_Pos_1234.12",
"COUCHHT",	"Couch_Height",
"COUCHIM",	"Couch_Index_Multiplier",
"COUCHIX",	"Couch_Index",
"CREDATE",	"Create_Date_-_YYMMDD",
"CRETIME",	"Create_Time=HHMMSShh",
"DBREVL",	"Dbase_Rev_Level",
"DDREVL",	"Data_Dict._Rev_Level",
"DICOM3",	"DICOM3",
"DICONTX",	"Display_Context",
"DRGCODE",	"DRG_Code",
"FA_HLMN",	"HL_Manual_Xmit_Flg[]",
"FA_HLMN",	"Manual_Archive_Flags_Array",
"FLATSRC",	"FLATSS_Source",
"FOLDER",	"Folder_Name",
"F_ARANY",	"Is_Archivd_Somewhere",
"F_ARCH",	"Manual_Archived_Flag",
"F_ARCOK",	"Manual_Archive_OK_Fl",
"F_ARCOK",	"Manual_Tape_Retriev_Fl",
"F_AUTO",	"Image_Auto_Archvd_Fl",
"F_AUTOK",	"Image_Auto_ArchOK_Fl",
"F_A_EXB",	"Exabyte_Auto_Arch_Fl",
"F_A_OPD",	"O-Disk_Auto_Arch_Fl",
"F_CMPRS",	"Image_Compressed_Flg",
"F_COMPL",	"Image_Complete_Flag",
"F_DELOK",	"Image_Delete_OK_Flag",
"F_FILMD",	"Image_Filmed_Flag",
"F_FILOK",	"Image_Film_OK_Flag",
"F_HLANY",	"Any_Archive_Flags_Set",
"F_HLANY",	"HL_Any_Manual_Flags",
"F_HLAUT",	"Auto_Xmit_Requested",
"F_HLAUT",	"HL_Auto_Xmit_Flag",
"F_M_EXB",	"Exabyte_Manual_Arch_Fl",
"F_M_FLP",	"Floppy_Manual_Arch_Fl",
"F_M_OPD",	"Disk_Manual_Arch_Fl",
"F_N_DEL",	"Non-Deletable",
"F_REVU",	"Image_Reviewed_Flag",
"F_RPROK",	"Image_Reproc_OK_Flag",
"F_SHAPE",	"Image_Shaped_Flag",
"GNTNDET",	"#_Dets_on_Gantry",
"GTILT",	"Gantry_Tilt_-12.1",
"IMFCLAS",	"Img_File_Class_Flg",
"IMFICON",	"Img_File_Contg_Flg",
"IMFILE",	"Image_File_Name",
"IMFIOFS",	"Img_File_Hdr_Ofs_Byt",
"IMFISHP",	"Img_File_Shape_Table",
"IMFISIZ",	"Img_File_Size_Bytes",
"IMFI_X",	"Img_File_X_Width",
"IMFI_Y",	"Img_File_Y_Height",
"IMFPATH",	"Image_File_Path",
"IMFPSIZ",	"Img_Fil_PhySize_Bytes",
"IMFTYPE",	"File_Data_Type",
"IMGFLIP",	"Image_Flipped_Yes_No",
"IMNUM",	"Image_Numbr_In_Study",
"IMNUMAB",	"Image_Number_Absol.",
"IMNUMAQ",	"Image_Number_In_Acq",
"IMTYPE",	"Image_Type",
"IMTYPSY",	"Synthetic_Image_Type",
"LABBOTT",	"Bottom_Label",
"LABLEFT",	"Left_Side_Label",
"LABRGHT",	"Right_Side_Label",
"LABTOP",	"Top_Label",
"LEVEL",	"Level",
"L_ALG",	"Lng_Algorithm",
"L_BADET",	"Lng_Bad_Detectors",
"L_BANDW",	"Lng_Bandwidth",
"L_CAL",	"Lng_Calib_Overall",
"L_CENTR",	"Lng_Centering",
"L_COEFS",	"Lng_nth_Ord_Coef",
"L_GEO_C",	"Lng_Geom_Correct",
"L_HUMPV",	"Lng_Hump_Vector",
"L_LINZT",	"Lng_Linearization",
"L_LMPRF",	"Lng_Lump_Profile",
"L_LMSFT",	"Lng_Lump_Shift_Pos",
"L_OFFS",	"Lng_AirCal_Offs",
"L_PICOL",	"Pilot_Col_Alg_Length",
"L_PIROW",	"Pilot_Row_Alg_Length",
"L_PROFL",	"Lng_AirCal_Profile",
"L_REF",	"Lng_Refer._Vector",
"L_RIPPL",	"Lng_Ripple_Vector",
"L_RRIPL",	"Lng_Resolver_Ripple",
"MODAL",	"Modality",
"N_IMDIS",	"#_Images_Displayable",
"N_IMRAW",	"#_Img_Raw_Data",
"N_IMSLC",	"#_Images_Slices",
"N_IMTOT",	"#_Images_Total",
"OPERID",	"Operator_ID",
"O_1ORDC",	"Ofs_1st_Ord",
"O_2ORDC",	"Ofs_2nd_Ord",
"O_3ORDC",	"Ofs_3rd_Ord",
"O_4ORDC",	"Ofs_4th_Ord",
"O_ALG",	"Ofs_Algorithm",
"O_BADET",	"Ofs_Bad_Detectors",
"O_BANDW",	"Ofs_Bandwidth",
"O_CAL",	"Ofs_Calib_Overall",
"O_CENTR",	"Ofs_Centering",
"O_GEO_C",	"Ofs_Geom_Correct",
"O_HUMPV",	"Ofs_Hump_Vector",
"O_LINZT",	"Ofs_Linearization",
"O_LMPRF",	"Ofs_Lump_Profile",
"O_LMSFT",	"Ofs_Lump_Shift_Pos",
"O_LREF",	"Ofs_Left_Ref_Vector",
"O_OFFS",	"Ofs_AirCal_Offs",
"O_PICOL",	"Pilot_Col_Alg_Offset",
"O_PIROW",	"Pilot_Row_Alg_Offset",
"O_PROFL",	"Ofs_AirCal_Profile",
"O_RIPPL",	"Ofs_Ripple_Vector",
"O_RREF",	"Ofs_Right_Ref_Vector",
"O_RRIPL",	"Ofs_Resolver_Ripple",
"O_VIEWS",	"Ofs_Views",
"PATAGDA",	"Patient_Age_Days",
"PATAGE",	"Patient_Age (obsolete)",
"PATAGHR",	"Patient_Age_Hours",
"PATAGMO",	"Patient_Age_Months",
"PATAGTY",	"Patient_age_Units",
"PATAGYR",	"Patient_Age_Years",
"PATDOB",	"Patient_DOB_YYMMDD",
"PATFNAM",	"Patient_First_Name",
"PATID",	"Patient_ID",
"PATNAM",	"Patient_Last_Name",
"PATSEX",	"Patient_Sex",
"PICOLLG",	"Pilot_Col_Alg_Length",
"PICOLOF",	"Pilot_Col_Alg_Offset",
"PILTANG",	"Pilot_Angle",
"PILTENH",	"Pilot_Edge_Enhanced",
"PILTFLD",	"Pilot_Half/Full",
"PILTFSZ",	"Pilot_Field_Size",
"PILTHKN",	"Pilot_Scan_Thickn",
"PILTKV",	"Pilot_KV",
"PILTLNG",	"Pilot_Length_mm",
"PILTMA",	"Pilot_Ma",
"PILTMAS",	"Pilot_Mas",
"PILTORG",	"Pilot_Org_Pixels",
"PILTPPM",	"Pilot_Pixel/mm",
"PILTWID",	"Pilot_Width_mm",
"PILTYPE",	"Pilot_horz/vert/obl",
"PIROWLG",	"Pilot_Row_Alg_Length",
"PIROWOF",	"Pilot_Row_Alg_Offset",
"POSHF",	"Position_Head/Feet",
"POSPRN",	"Position_Prone/Supine",
"PROCNUM",	"Procedure_Number",
"PRTMOD",	"Protocol_Modified",
"PRTRECN",	"Recon_Protocol",
"PRTSCAN",	"Scan_Protocol",
"PVRFLAG",	"Pvr_flag",
"RCNALG",	"Recon_Algorithm",
"RCNALGD",	"Recon_Algorithm_Desc",
"RCNALGF",	"Recon_Algorithm_Filename",
"RCNAVGN",	"Recon_Averag_N_Views",
"RCNCVCT",	"Recon_Custom_Vector",
"RCNCX",	"Recon_X_Centr_-123mm",
"RCNCY",	"Recon_Y_Centr_-123mm",
"RCNDATE",	"Recon_Date_-_YYMMDD",
"RCNFILT",	"Recon_Filter",
"RCNFLD",	"Recon_Fld_Sz_mm (obsolete)",
"RCNFSIZ",	"Recon_Fld_Size_mm",
"RCNIMRT",	"Recon_Image_Rotation",
"RCNMTRX",	"Recon_Matrix_Pixels",
"RCNNVUE",	"Number_Of_Views",
"RCNNXVU",	"Recon_Next_View_Offset",
"RCNREVL",	"Recon_Rev_Level",
"RCNRIPL",	"Recon_Ripple_Float",
"RCNSQNA",	"Recon_Sequence_Name",
"RCNTIME",	"Recon_Time=HHMMSS.hh",
"RCNWGTF",	"Vol_Weighting_Filename",
"REFPHY",	"Referring_Physician",
"REFRAD",	"Referring_Radiologist",
"REVPHY",	"Reviewing_Physician",
"RPRFLAG",	"Reprocessed_Flag",
"RPRTAG",	"Reprocess_Seq_Tag",
"SCATFLG",	"Scatter_Correct_flag",
"SCNANGL",	"Scan_Angle",
"SCNANSP",	"Scan_Anode_Speed",
"SCNAQTM",	"Acq_Strt_Time=HHMMSShh",
"SCNCOLL",	"Scan_collimation",
"SCNCOMP",	"Scan_Compensator",
"SCNCSPD",	"Scan_Couch_Speed",
"SCNDATE",	"Scan_Acq_Date_-_YYMMDD",
"SCNDELT",	"Scan_Delta_Mode",
"SCNDETN",	"Scan_Offs_to_Det#",
"SCNDODG",	"Scan_Dodger=???",
"SCNDTYP",	"Scan_Data_Type/= float, int, long,...",
"SCNEXPT",	"Scan_Expose_Time",
"SCNEXRV",	"Scan_Extra_Revs",
"SCNFAN",	"Scan_Fan_#_Dets",
"SCNFILT",	"Scan_Filter",
"SCNFLD",	"Scan_Fld_[HALF|FULL]",
"SCNFLDX",	"Scan_Fld_[FULLCTR]",
"SCNFSIZ",	"Scan_Fld_Siz_mm",
"SCNGAP",	"Scan_Gap_#_Dets",
"SCNGBCN",	"Scan_Global_Centrng",
"SCNHOSP",	"Scan_Hospital_Name",
"SCNINTM",	"Scan_Integ_Period",
"SCNKV",	"Scan_KV",
"SCNLPTS",	"Scan_#_Byt_Preceedg",
"SCNMA",	"Scan_MA",
"SCNMAOF",	"Scan_Ma_Offset",
"SCNMAS",	"Scan_MAS",
"SCNNREC",	"Scan_#_Records/File",
"SCNNREF",	"Scan_#_Ref_Dets",
"SCNNREV",	"Scan_#_Revs",
"SCNOVER",	"Scan_#_Overscan_Dets",
"SCNPACK",	"Scan_Data_Packing",
"SCNPART",	"#_of_PAR_Detectors",
"SCNPITC",	"Spiral_Pitch_Factor",
"SCNRCSZ",	"Scan_Record_Size_Byte",
"SCNRESO",	"Scan_Resolution",
"SCNREVL",	"Scan_Rev_Level",
"SCNSAMP",	"Scan_Sample",
"SCNSOF",	"Start_of_Field",
"SCNSPED",	"Scan_Speed",
"SCNSPOT",	"Scan_Focal_Spot",
"SCNSRCD",	"Source_Distance",
"SCNSTIM",	"Scan_Slice_Time_Delta",
"SCNSTRT",	"Scan_Start_???_<TBD>",
"SCNTHKM",	"Scan_Thickness_Multplr",
"SCNTHKN",	"Scan_Thickness",
"SCNTIME",	"Scan_Acq_Time=HHMMSShh",
"SCNTPTS",	"Scan_#_Byt_Trailing",
"SRCE",		"Source_SCAN/TAPE/NET",
"STNUM",	"Study_Number",
"STNUM_X",	"Recip._Study_Number",
"ST_UNIQ",	"Study_Collis_Resolvr",
"S_N_CPU",	"CPU_Serial_#",
"S_N_GNT",	"Gantry_Serial_#",
"TMP_GN1",	"Gantry_Temp_1",
"TMP_GN2",	"Gantry_Temp_2",
"TMP_GN3",	"Gantry_Temp_3",
"TMP_GN4",	"Gantry_Temp_4",
"TYP_CPU",	"CPU_Type",
"TYP_GNT",	"Gantry_Type",
"TYP_TUB",	"X-Tube_Type",
"UPDDATE",	"Update_Date_-_YYMMDD",
"UPDTIME",	"Update_Time=HHMMSShh",
"USDGRP",	"User_Defined_Group",
"VOLUSED",	"Volume_Datafile_Used",
"WINDOW",	"Window",
"ZSCNINX",	"Spiral_Acq_Lngth",
0,0

};


void 
PQ_Header_BothClass::DumpCommon(TextOutputStream *log)
{
	Assert(log);

	int i;
	for (i=0; i < dbrec_nrec; ++i) {
		char *vtype_label;
		switch (db_vtype[i]) {
			case 0:	vtype_label="asc"; break;
			case 1:	vtype_label="int"; break;
			case 2:	vtype_label="dat"; break;
			case 3:	vtype_label="tim"; break;
			case 4:	vtype_label="fil"; break;
			case 5:	vtype_label="flg"; break;
			case 6:	vtype_label="flt"; break;
			default:
				vtype_label="???"; break;
		}

		struct PQ_Data_Dictionary_Entry *ptr;
		for (ptr=PQ_Data_Dictionary; ptr->name != 0 && strcmp(ptr->name,db_fieldname[i]) != 0; ++ptr);

		(*log) << "<" << db_fieldname[i] << ">"
		       << "\t (" << (ptr->name ? ptr->desc : "-- unrecognized --") << ")"
		       << "\t = " << db_offset[i]
		       << " [" << db_length[i] << "]"
		       << " [" << db_vtype[i] << "]" << " " << vtype_label
		       << "\t = <" << db_value[i] << ">" << endl;

	}
}

