找回密码
 立即注册

QQ登录

只需一步,快速开始

iceman

社区贡献组

270

主题

1万

帖子

1万

积分

社区贡献组

积分
19311

活字格认证微信认证勋章元老葡萄

iceman
社区贡献组   /  发表于:2014-10-20 19:58  /   查看:7589  /  回复:9
我们现在所遇到的问题有4个:
1、Dicom图像进行3D重建后能否显示注释的问题
详细描述:我有一组Dicom图像,医生对该图像的每一层上都标记了癌部区域的轮廓,当对这组图像进行3D重建的时候,能否把标记的癌部区域轮廓也重建到该3D图像中,以便医生查看。
我自己当时弄了一种变通的方法,不知道该方法是否合适,代码如下:
第一步:在Cell中通过LoadAnnotations方法加载了该图像的注释信息
  1. string annFile = @"C:\Users\Public\Documents\DICOM Store\L18_WS_SERVER64\999-12-9795\Study0\Series0\Ann1_1.2.840.113619.2.1.1.2703222953.509.953036679.194.ann";
  2. cell.LoadAnnotations(annFile );
复制代码

第二步:给3Dobject加载对象的时候修改原图,把Annotation转换为相应形状的区域,然后利用FillCommand填充区域的颜色
  1. created = control3D.ObjectsContainer.Objects[0].MemoryEfficientInit(count);
  2. DicomDataSet ds = new DicomDataSet();
  3. for (index = 0; index < count; index++)
  4. {
  5. ds.Load(data.FileNames[index], DicomDataSetLoadFlags.None);
  6. image = ds.GetImage(null, data.FrameIndex - 1, 0, RasterByteOrder.Romm, DicomGetImageFlags.AutoApplyVoiLut | DicomGetImageFlags.AutoApplyModalityLut | DicomGetImageFlags.AllowRangeExpansion);
  7. LeadRect rc;
  8. if (cell.SubCells[index].AnnotationContainer.Objects.Count > 0)
  9. {
  10. switch (cell.SubCells[index].AnnotationContainer.Objects[0].GetType().Name)
  11. {
  12. case "AnnEllipseObject":
  13. Leadtools.Annotations.AnnEllipseObject eObj = cell.SubCells[index].AnnotationContainer.Objects[0] as Leadtools.Annotations.AnnEllipseObject;
  14. rc = new LeadRect(Convert.ToInt32(eObj.Bounds.Left), Convert.ToInt32(eObj.Bounds.Top), Convert.ToInt32(eObj.Bounds.Width), Convert.ToInt32(eObj.Bounds.Height));
  15. image.AddEllipseToRegion(null, rc, RasterRegionCombineMode.Set);
  16. break;
  17. default:
  18. Leadtools.Annotations.AnnRectangleObject rObj = cell.SubCells[index].AnnotationContainer.Objects[0] as Leadtools.Annotations.AnnRectangleObject;
  19. rc = new LeadRect(Convert.ToInt32(rObj.Bounds.Left), Convert.ToInt32(rObj.Bounds.Top), Convert.ToInt32(rObj.Bounds.Width), Convert.ToInt32(rObj.Bounds.Height));
  20. image.AddEllipseToRegion(null, rc, RasterRegionCombineMode.Set);
  21. break;
  22. }
  23. }
  24. FillCommand command = new FillCommand();
  25. command.Color = RasterColor.FromKnownColor(RasterKnownColor.Red);
  26. command.Run(image);
  27. control3D.ObjectsContainer.Objects[0].MemoryEfficientSetFrame(image, index, data.ImagePositions[index], false);
  28. image.Dispose();
  29. image = null;
  30. }
  31. ds.Dispose();
  32. }

  33. control3D.ObjectsContainer.Objects[0].MemoryEfficientEnd(cell.ImageOrientation, cell.PixelSpacing);
复制代码


出来的结果是,图像里面确实把癌部轮廓的3D显示出来了,但不是彩色的,是灰度图像。不知道该做法是否正确,正确的方法是什么?

2、Dicom图像中对注释剥离后进行3D重建的问题
详细描述:我有一组Dicom图像,医生对该图像的每一层上都标记了癌部区域的轮廓,当对这组图像进行3D重建的时候,能否只是把标记的癌部区域轮廓重建到该3D图像中,以便医生查看。
如果是我自己做,思路就是按照每个图的大小生成一张新的Image,然后用上面第一个问题的解决方法只在新Image中放Region,然后3D重建,出来的图像就只有标记注释的区域。
后来我又换了一种方法,就是利用RasterImage的GetOverlayImage方法得到新建的OverlayImage,对该图进行3D重建,结果也能得到,但还是不是彩色的,具体做法如下:
第一步:在Cell中通过LoadAnnotations方法加载了该图像的注释信息
  1. string annFile = @"C:\Users\Public\Documents\DICOM Store\L18_WS_SERVER64\999-12-9795\Study0\Series0\Ann1_1.2.840.113619.2.1.1.2703222953.509.953036679.194.ann";
  2. cell.LoadAnnotations(annFile );
复制代码
第二步:给3Dobject加载对象的时候修改原图,把Annotation转换为相应形状的区域,然后利用RasterImage的CreateMaskFromRegion创建覆盖,然后把区域改变为新图层,对该图层进行填色,最后用GetOverlayImage得到的图像进行3D重建
  1. created = control3D.ObjectsContainer.Objects[0].MemoryEfficientInit(count);
  2. DicomDataSet ds = new DicomDataSet();
  3. for (index = 0; index < count; index++)
  4. {
  5. ds.Load(data.FileNames[index], DicomDataSetLoadFlags.None);
  6. image = ds.GetImage(null, data.FrameIndex - 1, 0, RasterByteOrder.Romm, DicomGetImageFlags.AutoApplyVoiLut | DicomGetImageFlags.AutoApplyModalityLut | DicomGetImageFlags.AllowRangeExpansion);
  7. LeadRect rc;
  8. if (cell.SubCells[index].AnnotationContainer.Objects.Count > 0)
  9. {
  10. switch (cell.SubCells[index].AnnotationContainer.Objects[0].GetType().Name)
  11. {
  12. case "AnnEllipseObject":
  13. Leadtools.Annotations.AnnEllipseObject eObj = cell.SubCells[index].AnnotationContainer.Objects[0] as Leadtools.Annotations.AnnEllipseObject;
  14. rc = new LeadRect(Convert.ToInt32(eObj.Bounds.Left), Convert.ToInt32(eObj.Bounds.Top), Convert.ToInt32(eObj.Bounds.Width), Convert.ToInt32(eObj.Bounds.Height));
  15. image.AddEllipseToRegion(null, rc, RasterRegionCombineMode.Set);
  16. break;
  17. default:
  18. Leadtools.Annotations.AnnRectangleObject rObj = cell.SubCells[index].AnnotationContainer.Objects[0] as Leadtools.Annotations.AnnRectangleObject;
  19. rc = new LeadRect(Convert.ToInt32(rObj.Bounds.Left), Convert.ToInt32(rObj.Bounds.Top), Convert.ToInt32(rObj.Bounds.Width), Convert.ToInt32(rObj.Bounds.Height));
  20. image.AddEllipseToRegion(null, rc, RasterRegionCombineMode.Set);
  21. break;
  22. }
  23. }
  24. if (image.HasRegion)
  25. {
  26. RasterImage mask = image.CreateMaskFromRegion();
  27. image.MakeRegionEmpty();
  28. image.SetOverlayImage(1, mask, RasterGetSetOverlayImageMode.Copy);

  29. RasterOverlayAttributes attributes;
  30. attributes = image.GetOverlayAttributes(1, RasterGetSetOverlayAttributesFlags.Flags | RasterGetSetOverlayAttributesFlags.Color | RasterGetSetOverlayAttributesFlags.Origin);
  31. attributes.Color = new RasterColor(255, 0, 0);
  32. attributes.AutoPaint = true;
  33. attributes.Origin = new LeadPoint(0, 0);
  34. attributes.AutoProcess = true;
  35. image.UpdateOverlayAttributes(1, attributes, RasterGetSetOverlayAttributesFlags.Flags | RasterGetSetOverlayAttributesFlags.Color | RasterGetSetOverlayAttributesFlags.Origin);
  36. }

  37. control3D.ObjectsContainer.Objects[0].MemoryEfficientSetFrame(image.GetOverlayImage(1, RasterGetSetOverlayImageMode.Copy), index, data.ImagePositions[index], false);
  38. image.Dispose();
  39. image = null;
  40. }
  41. ds.Dispose();
  42. }
复制代码

出来的结果是,图像里面确实把癌部轮廓的3D显示出来了,但不是彩色的,是灰度图像。不知道该做法是否正确,正确的方法是什么?

3、我的图像是彩色的,3D重建后在MedicalViewer中呈现时能不能以彩色的方式显示3D图像,如果可以,应该如何去做。
4、切片的问题
这个问题很难描述,回头传代码,直接看实例再整.

9 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2014-10-20 20:02:00
沙发
回复 1楼iceman的帖子

问题已经查收。
由于问题比较复杂,我们需要一定的时间调查和沟通,进一步结果后反馈给您,谢谢
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-10-22 15:45:00
板凳
回复 1楼iceman的帖子

之前我们讨论您会在安装 Demo 基础上加上您当前的实现方法来协助调查您现在的问题,请问是否制作完成呢?
回复 使用道具 举报
zhaoyg
银牌会员   /  发表于:2014-10-23 12:58:00
地板
你们的邮箱貌似不能发送带附件的邮件,从昨天晚上发到现在,每份都退回来了
回复 使用道具 举报
zhaoyg
银牌会员   /  发表于:2014-10-23 13:01:00
5#


Demo请查收附件,该测试程序是在Leadtools的Medical3dDemo的基础上写的,路径是C:\LEADTOOLS 18\Examples\DotNet\CS\Main3DDemo,使用的DicomDir是Leadtools演示医疗影像 Head MRI Study with scout 中的 Series 4

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-10-23 16:14:00
6#
回复 5楼zhaoyg的帖子

好的,Demo已经查收,有进一步调查结果会及时反馈给您。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-10-27 11:17:00
7#
回复 5楼zhaoyg的帖子

问题已经得到反馈,该功能会在 LeadTools V19 中发布,接口名称为:
- Medical3DObject.ColorMap property of type Medical3DColorMapping {set}
- Medical3DObject.Palette property of type byte {get\set}

目前V18中还无法支持。
回复 使用道具 举报
zhaoyg
银牌会员   /  发表于:2014-10-27 14:01:00
8#
:~ V19发布时间定了没?
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-10-27 17:23:00
9#
回复 8楼zhaoyg的帖子

目前正在和厂商确认,有进一步结果反馈给你。谢谢
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-10-28 10:48:00
10#
回复 8楼zhaoyg的帖子

V19 具体发布时间没有确定,大概在今年年底发布。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部