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

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

创建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");
      }
    }

1 标准布局

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

2 自定义布局

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

3 图像自由添加

 4 DICOM打印机参数设置

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

 

 5 图像信息显示

  6 胶片预览

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

可执行程序下载:

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

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值