找回密码
 立即注册

QQ登录

只需一步,快速开始

byrd

注册会员

1

主题

2

帖子

23

积分

注册会员

积分
23
  • 21

    金币

  • 主题

  • 帖子

最新发帖
byrd
注册会员   /  发表于:2016-9-27 17:27  /   查看:3562  /  回复:4
请问如何 在Medical3DControl.ObjectsContainer.Objects 添加多对象? 实现下图的效果?

本帖子中包含更多资源

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

x

4 个回复

倒序浏览
gw0506
超级版主   /  发表于:2016-9-27 18:01:15
沙发
问题已经收到,我们调查验证后回复您。
回复 使用道具 举报
gw0506
超级版主   /  发表于:2016-9-28 10:19:25
板凳
跟厂商确认,目前LeadTools不能实现上图效果。
回复 使用道具 举报
byrd
注册会员   /  发表于:2016-9-28 12:53:32
地板
啊,卖这么贵,居然这么简单的功能也不提供。。。太遗憾了!
回复 使用道具 举报
gw0506
超级版主   /  发表于:2016-9-28 14:33:47
5#
也许我对你的需求理解有误,你可以再描述的详细一点。有关ObjectsContainer的例子可以参考下面代码。
  1. using Leadtools;
  2. using Leadtools.Codecs;
  3. using Leadtools.MedicalViewer;
  4. using Leadtools.Medical3D;

  5. [TestMethod]
  6. public void Medical3DControlExample()
  7. {
  8.     Medical3DLoadDICOMSeriesExamples LoadObject = new Medical3DLoadDICOMSeriesExamples();
  9.     MedicalViewerSeriesManager output = LoadObject.LoadJamesHead();
  10.     MainForm1 form = new MainForm1(output);
  11.     form.ShowDialog();
  12. }

  13. // MainForm1 will be the owner of the medical viewer control.
  14. class MainForm1 : Form
  15. {
  16.     private Medical3DControl _medical3DControl;

  17.     public MainForm1(MedicalViewerSeriesManager output)
  18.     {
  19.         RasterCodecs _codecs = new RasterCodecs();
  20.         RasterImage _image;

  21.         CodecsImageInfo codecsInformation;

  22.         _medical3DControl = new Medical3DControl();
  23.         this.SizeChanged += new EventHandler(MainForm1_SizeChanged);
  24.         this.FormClosing += new FormClosingEventHandler(MainForm1_FormClosing);


  25.         _medical3DControl.ObjectsContainer.Objects.Add(new Medical3DObject());

  26.         int index;

  27.         codecsInformation = _codecs.GetInformation((string)output.Stacks[0].Items[0].Data, true);


  28.         int width = codecsInformation.Width;
  29.         int height = codecsInformation.Height;
  30.         int depth = 256;

  31.         _medical3DControl.ObjectsContainer.Objects[0].MemoryEfficientInit(depth);

  32.         for (index = 0; index < depth; index++)
  33.         {
  34.             _image = _codecs.Load((string)output.Stacks[0].Items[index].Data, 0, CodecsLoadByteOrder.BgrOrGrayOrRomm, 1, 1);
  35.             _medical3DControl.ObjectsContainer.Objects[0].MemoryEfficientSetFrame(_image, index, output.Stacks[0].Items[index].ImagePosition, true);
  36.         }

  37.         string spearator = ("\");
  38.         string[] test = output.Stacks[0].Items[0].ImageOrientation.Split(spearator.ToCharArray());
  39.         float[] orientation = new float[6];
  40.         // Random Orientation
  41.         orientation[0] = 1;
  42.         orientation[1] = 0;
  43.         orientation[2] = 0;
  44.         orientation[3] = 0;
  45.         orientation[4] = 0;
  46.         orientation[5] = 1;

  47.         Point3D P1 = new Point3D(0, 0, 0);
  48.         Point3D P2 = new Point3D(1, 0, 0);

  49.         Point2D PixelSpacing = new Point2D(0.5f, 0.5f);

  50.         _medical3DControl.ObjectsContainer.Objects[0].MemoryEfficientEnd(orientation,PixelSpacing);

  51.         int i;
  52.         for (i = 0; i < 6; i++)
  53.         {
  54.             orientation[i] = (float)Convert.ToDouble(test[i]);
  55.         }

  56.         _medical3DControl.ObjectsContainer.Objects[0].ImageOrientation = orientation ;

  57.         _medical3DControl.ObjectsContainer.Objects[0].PixelSpacing = output.Stacks[0].PixelSpacing ;

  58.         Controls.Add(_medical3DControl);
  59.     }

  60.     void MainForm1_FormClosing(object sender, FormClosingEventArgs e)
  61.     {
  62.         _medical3DControl.Dispose();
  63.     }


  64.     void MainForm1_SizeChanged(object sender, EventArgs e)
  65.     {
  66.         if (_medical3DControl != null)
  67.             _medical3DControl.Size = new Size(this.ClientRectangle.Right, this.ClientRectangle.Bottom);
  68.     }
  69. }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部