Declaration
function AddTag(Group, Element: Word; DataType: TIEDicomTagType; Data: pointer; DataLen: integer; Children: TObjectList = nil): integer;
Description
Adds a new DICOM tag. You can view a list of tags at:
Dicom Tag List
Data is the pointer to data buffer (of DataLen length). You must not free this buffer.
Returns the tag position.
Note: For adding and replacing tags it is normally preferable to use
SetTagNumeric,
SetTagString or
SetTagByteBuffer
Children := TObjectList.Create();
SubTags := TIEDicomTags.Create();
SubTags.Sorted := false;
SubTags.SetTagNumeric( $4, $1400, 0, False );
SubTags.SetTagNumeric( $4, $1410, 65535, False );
SubTags.SetTagNumeric( $4, $1420, 0, False );
SubTags.SetTagString( $4, $1430, 'PATIENT', False );
SubTags.SetTagNumeric( $4, $1400, 0, False );
SubTags.SetTagNumeric( $4, $1410, 65535, False );
SubTags.SetTagNumeric( $4, $1420, 0, False );
SubTags.SetTagString( $4, $1430, 'STUDY', False );
SubTags.SetTagNumeric( $4, $1400, 0, False );
SubTags.SetTagNumeric( $4, $1410, 65535, False );
SubTags.SetTagNumeric( $4, $1420, 0, False );
SubTags.SetTagString( $4, $1430, 'SERIES', False );
SubTags.SetTagNumeric( $4, $1400, 0, False );
SubTags.SetTagNumeric( $4, $1410, 65535, False );
SubTags.SetTagNumeric( $4, $1420, 0, False );
SubTags.SetTagString( $4, $1430, 'IMAGE', False );
SubTags.SetTagString( $4, $1500, 'C:\FileName.jpg', False );
Children.Add( SubTags );
ImageEnMView1.MIO.Params[0].DICOM_Tags.AddTag( 4, $1220, dvSQ, nil, -1, Children );