OnConformanceStatus Example for C++Builder
void __fastcall TForm1::Conformance1Click(TObject *Sender)
{
LEADDicom1->EnableConformanceStatus = true;
LEADDicom1->ConformanceTestDS();
}
void __fastcall TForm1::LEADDicom1ConformanceStatus(TObject *Sender, int nFlags)
{
AnsiString sTag, sTagL, sTagR, msg;
int nRet;
/* display info about non-standard element */
switch(nFlags)
{
case CALLBACK_ERROR_UNKNOWN_CLASS:
msg = "Unknown Class";
break;
case CALLBACK_ERROR_UNKNOWN_TAG:
msg = "Unknown Tag";
break;
case CALLBACK_ERROR_UNKNOWN_VR:
msg = "Unknown VR";
break;
case CALLBACK_ERROR_WRONG_VR:
msg = "Error in VR";
break;
case CALLBACK_ERROR_MIN_VM:
msg = "Error in MinVM";
break;
case CALLBACK_ERROR_MAX_VM:
msg = "Error in MaxVM";
break;
case CALLBACK_ERROR_DIVIDE_VM:
msg = "Error in DivideVM";
break;
case CALLBACK_ERROR_IMAGE:
msg = "Error in Image";
break;
default:
return;
}
sTag = AnsiString::IntToHex(LEADDicom1->CurrentElement->Tag, 8);
sTagR = sTag.SubString(5, 4);
sTagL = sTag.SubString(1, 4);
msg = msg +"\nTag: " + sTagL + ":" + sTagR;
nRet = Application->MessageBox(msg.c_str(), "Non-Standard Element", MB_OKCANCEL);
if(nRet == IDCANCEL)
LEADDicom1->EnableConformanceStatus = false;
}