• 胶片打印、排版、自助打印


    DICOM打印示例代码(来自DCMTK):

    创建PrintManagementCapabilitiesSequence:

    1. // write PrintManagementCapabilitiesSequence
    2. dseq = new DcmSequenceOfItems(DCM_RETIRED_PrintManagementCapabilitiesSequence);
    3. if (dseq)
    4. {
    5. if (EC_Normal == result) result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicFilmSessionSOPClass);
    6. if (EC_Normal == result) result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicFilmBoxSOPClass);
    7. if (EC_Normal == result) result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicGrayscaleImageBoxSOPClass);
    8. if (EC_Normal == result) result = imageBoxContentList.addImageSOPClasses(*dseq, (size_t)writeImageBoxes);
    9. if ((result == EC_Normal)&&(presentationLUTList.size() > 0))
    10. {
    11. result = DVPSHelper::addReferencedUIDItem(*dseq, UID_PresentationLUTSOPClass);
    12. }
    13. if ((result == EC_Normal)&&(annotationContentList.size() > 0))
    14. {
    15. result = DVPSHelper::addReferencedUIDItem(*dseq, UID_BasicAnnotationBoxSOPClass);
    16. }
    17. if (result==EC_Normal) dset.insert(dseq, OFTrue /*replaceOld*/); else delete dseq;
    18. } else result = EC_MemoryExhausted;

     创建FilmBoxContentSequence:

    1. if (EC_Normal == dset.search(DCM_RETIRED_FilmBoxContentSequence, stack, ESM_fromHere, OFFalse))
    2. {
    3. seq=(DcmSequenceOfItems *)stack.top();
    4. if (seq->card() ==1)
    5. {
    6. item = seq->getItem(0);
    7. stack.clear();
    8. READ_FROM_DATASET2(DcmShortText, imageDisplayFormat)
    9. READ_FROM_DATASET2(DcmCodeString, annotationDisplayFormatID)
    10. if (result==EC_TagNotFound) result = EC_Normal;
    11. READ_FROM_DATASET2(DcmCodeString, filmOrientation)
    12. READ_FROM_DATASET2(DcmCodeString, filmSizeID)
    13. READ_FROM_DATASET2(DcmCodeString, magnificationType)
    14. READ_FROM_DATASET2(DcmCodeString, smoothingType)
    15. if (result==EC_TagNotFound) result = EC_Normal;
    16. READ_FROM_DATASET2(DcmCodeString, borderDensity)
    17. if (result==EC_TagNotFound) result = EC_Normal;
    18. READ_FROM_DATASET2(DcmCodeString, emptyImageDensity)
    19. if (result==EC_TagNotFound) result = EC_Normal;
    20. READ_FROM_DATASET2(DcmUnsignedShort, minDensity)
    21. if (result==EC_TagNotFound) result = EC_Normal;
    22. READ_FROM_DATASET2(DcmUnsignedShort, maxDensity)
    23. READ_FROM_DATASET2(DcmCodeString, trim)
    24. READ_FROM_DATASET2(DcmShortText, configurationInformation)
    25. READ_FROM_DATASET2(DcmUnsignedShort, illumination)
    26. if (result==EC_TagNotFound) result = EC_Normal;
    27. READ_FROM_DATASET2(DcmUnsignedShort, reflectedAmbientLight)
    28. if (result==EC_TagNotFound) result = EC_Normal;
    29. READ_FROM_DATASET2(DcmCodeString, requestedResolutionID)
    30. if (result==EC_TagNotFound) result = EC_Normal;
    31. // check referenced presentation LUT sequence
    32. // if there is any reference, it must refer to one of the presentation LUTs we are managing.
    33. stack.clear();
    34. if (EC_Normal == item->search(DCM_ReferencedPresentationLUTSequence, stack, ESM_fromHere, OFFalse))
    35. {
    36. seq=(DcmSequenceOfItems *)stack.top();
    37. if (seq->card() ==1)
    38. {
    39. item = seq->getItem(0);
    40. stack.clear();
    41. READ_FROM_DATASET2(DcmUniqueIdentifier, referencedPresentationLUTInstanceUID)
    42. if (referencedPresentationLUTInstanceUID.getLength() > 0)
    43. {
    44. referencedPresentationLUTInstanceUID.getOFString(aString,0);
    45. if (NULL == presentationLUTList.findPresentationLUT(aString.c_str()))
    46. {
    47. result=EC_IllegalCall;
    48. DCMPSTAT_WARN("FilmBoxContentSequence presentation LUT reference cannot be resolved");
    49. }
    50. }
    51. } else {
    52. result=EC_TagNotFound;
    53. DCMPSTAT_WARN("found FilmBoxContentSequence in Stored Print with ReferencedPresentationLUTSequence number of items != 1");
    54. }
    55. }
    56. } else {
    57. result=EC_TagNotFound;
    58. DCMPSTAT_WARN("found FilmBoxContentSequence in Stored Print with number of items != 1");
    59. }
    60. }

    1 标准布局

    支持多种常规胶片布局,用户可按需选择,并填充图像至选中区域。

    2 自定义布局

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

    3 图像自由添加

     4 DICOM打印机参数设置

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

     

     5 图像信息显示

      6 胶片预览

     7 支持自定义排版和多种类型胶片打印机。

    可执行程序下载:

    https://download.csdn.net/download/genispan/87108631

  • 相关阅读:
    0830(042天 集合框架06 总结二)
    健效达海豚妈妈儿保项目推介会盛大启幕,聚焦互联网+精准医疗
    VR购物丨抢占电商流量新阵地
    C++模板元编程详细教程(之一)
    数据挖掘可视化+机器学习初探
    IEDA使用maven搭建ssh框架步骤详解
    安卓kotlin面试题 91-100
    B端系统:导航机制设计,用户体验提升的法宝
    文字的力量
    【Python】《Python编程:从入门到实践 (第2版) 》笔记-Chapter2-变量和简单数据类型
  • 原文地址:https://blog.csdn.net/genispan/article/details/127969657