Analyze Header Field to DICOM Field Mapping

analyzeHdr.hist.descrip Series Description (0008,103E)
analyzeHdr.hist.originator Referring Physician (0008,0090)
analyzeHdr.hist.scannum Study ID (0010,0020)
analyzeHdr.hist.patient_id Patient Name (0010,0010)
analyzeHdr.hist.exp_date Study Date (0008,0020)
analyzeHdr.hist.exp_time Image Time (0008,0033)
analyzeHdr.hist.orient Patient Orientation (0020,0032)
analyzeHdr.dime.dim[0] 4
analyzeHdr.dime.dim[1] Image Columns (0028,0010)
analyzeHdr.dime.dim[2] Image Rows (0028,0011)
analyzeHdr.dime.dim[3] slices
analyzeHdr.dime.dim[4] oformat == analyze3D ? 1 : ndyn
analyzeHdr.dime.datatype Bits Allocated == 16 ? DT_SIGNED_SHORT : DT_UNSIGNED_CHAR;
analyzeHdr.dime.bitpix Bits Allocated (0028,0100)
analyzeHdr.dime.pixdim[1] Pixel Spacing (0028, 0030)
analyzeHdr.dime.pixdim[2] Pixel Spacing (0028, 0030)
analyzeHdr.dime.pixdim[3] Slice Spacing (0018,0088)
analyzeHdr.dime.pixdim[4] Repetition Time (0018,0080)
analyzeHdr.dime.glmax Bits Allocated == 8  ? 255 : max of all image data
analyzeHdr.dime.glmin Bits Allocated == 8  ? 0 : min of all image data

The variables slices and ndyn are determined by count images files.


Concatenated DICOM Header File Format

4 byte integer length of following header
DICOM header for slice 1, dynamic 1

4 byte integer length of following header
DICOM header for slice 2, dynamic 1

4 byte integer length of following header
DICOM header for slice 3, dynamic 1
.
.
.
4 byte integer length of following header
DICOM header for slice n dynamic 1

4 byte integer length of following header
DICOM header for slice 1, dynamic 2

4 byte integer length of following header
DICOM header for slice 2, dynamic 2

4 byte integer length of following header
DICOM header for slice 3, dynamic 2
.
.
.
4 byte integer length of following header
DICOM header for slice n dynamic 2

4 byte integer length of following header
DICOM header for slice 1, dynamic 3
.
.
.
4 byte integer length of following header
DICOM header for slice n, dynamic m