ConformanceStatus Example for Delphi
procedure TForm1.LEADDicomDS1ConformanceStatus (ASender: TObject;
nFlags: Smallint);
var
msg: String;
nRet: Integer;
strTag: String;
strTagL: String;
strTagR: String;
nLen: Integer;
x: Integer;
begin
//display info about non-standard element
Case (nFlags) of
CALLBACK_ERROR_UNKNOWN_CLASS:
msg:= 'Unknown Class' + Chr(13);
CALLBACK_ERROR_UNKNOWN_TAG:
msg:= 'Unknown Tag' + Chr(13);
CALLBACK_ERROR_UNKNOWN_VR:
msg:= 'Unknown VR' + Chr(13);
CALLBACK_ERROR_WRONG_VR:
msg:= 'Error in VR' + Chr(13);
CALLBACK_ERROR_MIN_VM:
msg:= 'Error in MinVM' + Chr(13);
CALLBACK_ERROR_MAX_VM:
msg:= 'Error in MaxVM' + Chr(13);
CALLBACK_ERROR_DIVIDE_VM:
msg:= 'Error in DivideVM' + Chr(13);
CALLBACK_ERROR_IMAGE:
msg:= 'Error in Image' + Chr(13);
else
Exit;
end;
strTag:= IntToStr(LEADDicomDS1.DefaultInterface.Get_CurrentElement ().Tag);
nLen:= Length(strTag);
strTagR:= RightStr(strTag, 4);
strTagL:= '';
for x:= nLen to 7 do
strTagL:= strTagL + IntToStr(0);
strTagL:= strTagL + LeftStr(strTag, nLen - 4);
strTag:= strTagL + ':' + strTagR;
msg:= msg + 'Tag: ' + strTag;
nRet:= Application.MessageBox(PChar(msg), 'Non-Standard Element', MB_OKCANCEL);
if(nRet = IDCANCEL)then
LEADDicomDS1.EnableConformanceStatus:= False;
end;