创建PrintManagementCapabilitiesSequence:
- // write PrintManagementCapabilitiesSequence
- dseq = new DcmSequenceOfItems(DCM_RETIRED_PrintManagementCapabilitiesSequence);
- if (dseq)
- {
- if (EC_Normal == result) result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicFilmSessionSOPClass);
- if (EC_Normal == result) result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicFilmBoxSOPClass);
-
- if (EC_Normal == result) result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicGrayscaleImageBoxSOPClass);
-
- if (EC_Normal == result) result = imageBoxContentList.addImageSOPClasses(*dseq, (size_t)writeImageBoxes);
- if ((result == EC_Normal)&&(presentationLUTList.size() > 0))
- {
- result = DVPSHelper::addReferencedUIDItem(*dseq, UID_PresentationLUTSOPClass);
- }
- if ((result == EC_Normal)&&(annotationContentList.size() > 0))
- {
- result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicAnnotationBoxSOPClass);
- }
-
- if (result==EC_Normal) dset.insert(dseq, OFTrue /*replaceOld*/); else delete dseq;
- } else result = EC_MemoryExhausted;
创建FilmBoxContentSequence:
- if (EC_Normal == dset.search(DCM_RETIRED_FilmBoxContentSequence, stack, ESM_fromHere, OFFalse))
- {
- seq=(DcmSequenceOfItems *)stack.top();
- if (seq->card() ==1)
- {
- item = seq->getItem(0);
- stack.clear();
-
- READ_FROM_DATASET2(DcmShortText, imageDisplayFormat)
- READ_FROM_DATASET2(DcmCodeString, annotationDisplayFormatID)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmCodeString, filmOrientation)
- READ_FROM_DATASET2(DcmCodeString, filmSizeID)
- READ_FROM_DATASET2(DcmCodeString, magnificationType)
- READ_FROM_DATASET2(DcmCodeString, smoothingType)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmCodeString, borderDensity)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmCodeString, emptyImageDensity)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmUnsignedShort, minDensity)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmUnsignedShort, maxDensity)
- READ_FROM_DATASET2(DcmCodeString, trim)
- READ_FROM_DATASET2(DcmShortText, configurationInformation)
- READ_FROM_DATASET2(DcmUnsignedShort, illumination)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmUnsignedShort, reflectedAmbientLight)
- if (result==EC_TagNotFound) result = EC_Normal;
- READ_FROM_DATASET2(DcmCodeString, requestedResolutionID)
- if (result==EC_TagNotFound) result = EC_Normal;
- // check referenced presentation LUT sequence
- // if there is any reference, it must refer to one of the presentation LUTs we are managing.
- stack.clear();
- if (EC_Normal == item->search(DCM_ReferencedPresentationLUTSequence, stack, ESM_fromHere, OFFalse))
- {
- seq=(DcmSequenceOfItems *)stack.top();
- if (seq->card() ==1)
- {
- item = seq->getItem(0);
- stack.clear();
- READ_FROM_DATASET2(DcmUniqueIdentifier, referencedPresentationLUTInstanceUID)
- if (referencedPresentationLUTInstanceUID.getLength() > 0)
- {
- referencedPresentationLUTInstanceUID.getOFString(aString,0);
- if (NULL == presentationLUTList.findPresentationLUT(aString.c_str()))
- {
- result=EC_IllegalCall;
- DCMPSTAT_WARN("FilmBoxContentSequence presentation LUT reference cannot be resolved");
- }
- }
- } else {
- result=EC_TagNotFound;
- DCMPSTAT_WARN("found FilmBoxContentSequence in Stored Print with ReferencedPresentationLUTSequence number of items != 1");
- }
- }
- } else {
- result=EC_TagNotFound;
- DCMPSTAT_WARN("found FilmBoxContentSequence in Stored Print with number of items != 1");
- }
- }
支持多种常规胶片布局,用户可按需选择,并填充图像至选中区域。


支持用户自定义胶片布局,用户可按需选择,并填充图像至选中区域。

配置DICOM打印机连接参数,以实现图像的胶片打印。



可执行程序下载: