FindModuleIOD Example for C++Builder
AnsiString sPrompt;
LEADDicom1->EnableMethodErrors = true;
try
{
/* Find a Module */
LEADDicom1->FindModuleIOD(DICOM_CLASS_CR_IMAGE_STORAGE, DICOM_MODULE_OVERLAY_PLANE);
ShowMessage(LEADDicom1->CurrentIOD->Name);
LEADDicom1->SetIODName("New IOD Name #1");
LEADDicom1->SetIODDescription("New IOD Description #1");
sPrompt = "Name: " + LEADDicom1->CurrentIOD->Name + "\n";
sPrompt = sPrompt + "Desc: " + LEADDicom1->CurrentIOD->Description;
ShowMessage(sPrompt);
/* Find a Class */
LEADDicom1->FindClassIOD(DICOM_CLASS_PRINT_QUEUE);
ShowMessage(LEADDicom1->CurrentIOD->Name);
LEADDicom1->SetIODName("New IOD Name #2");
LEADDicom1->SetIODDescription("New IOD Description #2");
sPrompt = "Name: " + LEADDicom1->CurrentIOD->Name + "\n";
sPrompt = sPrompt + "Desc: " + LEADDicom1->CurrentIOD->Description;
ShowMessage(sPrompt);
}
catch(ELEADDicomError *e)
{
ShowMessage("Error Number: " + IntToStr(LEADDicom1->Error));
}