←选择平台

KaufmannRegionCommand类

总结
设置一个Kaufmann地区基于指定的点的颜色值的增强图像(KaufmannProcessedImage)。
语法
c#
VB
c++
公共KaufmannRegionCommand:RasterCommand
公共KaufmannRegionCommand继承了RasterCommand
公共ref类KaufmannRegionCommand:公共RasterCommand
讲话

这个命令是可用的文档/医疗工具包。

这个类是用来计算Kaufmann比率(大脑胼胝体的大小/尺寸的球体)。胼胝体白质结构由神经纤维连接大脑的左右半球。考夫曼地区创建之前,这个命令执行降噪等图像增强过程使用高斯模糊。然后这个命令类(使用魔杖技术)创建一个Kaufmann地区始于中指定的点的颜色值RegionStart结束指定的值RegionThreshold。放置在该地区KaufmannProcessedImage。的KaufmannProcessedImage包含的数据图像(增强使用内部加强过程)和由此产生的地区。图像本身是没有改变的。由此产生的区域的面积可用于计算Kaufmann比率。计算Kaufmann比率做以下步骤:

  1. 调用命令胼胝体周围地区,调整以下属性,使周边地区想要的区域,然后保存PixelsCount值:

    • CombineMode属性- - - - - -RasterRegionCombineMode值指定的区域添加组合。
    • KaufmannProcessedImage属性- - - - - -RasterImage包含该地区。
    • MaximumInput属性——一个整数指定值被认为是亮点。这个值是内部使用,让重点地区选择更容易。
    • MinimumInput财产——一个整数指定值被认为是阴影。这个值是在内部使用变黑的阴影使地区选择更容易。
    • 半径属性——的大小社区内部模糊过程中使用。
    • RegionStart属性——创建区域的起点。
    • RegionThreshold属性——的停止点魔杖地区扩张。如果新的像素的颜色之间的差别将包括在该地区和像素的颜色由地区指出超过的区别RegionThreshold并指出的像素的颜色RegionStart,像素将不包括在内。
    • RemoveHoles属性-值,指定是否要删除所有洞从创建的地区。
  2. 第二次调用命令使大脑周围地区范围调整后适当的属性,并保存PixelsCount价值。

  3. 现在计算比例。
  4. 这个命令不支持32位灰度图像。

关于大脑如何计算比率的更多信息请参考下面的例子。该命令支持12和16位灰度和48和64位彩色图像。支持12和16位灰度和48和64位彩色图像只在可用文档/医疗工具包。

例子

应用KaufmannRegionCommand测试通过的图像。这里我们假设图像是通过“Image3.dcm”。

c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing.Core;公共无效KaufmannRegionCommandExample (){/ /加载一个图像RasterCodecs编解码器=RasterCodecs ();编解码器。ThrowExceptionsOnInvalidImages =真正的;RasterImage图像= codecs.Load (Path.Combine (LEAD_VARS.ImagesDir,“Image3.dcm”));/ /准备命令LeadPoint曾经繁荣=LeadPoint(形象。宽/ 2),(图片。身高/ 2));/ /应用命令为了得到第一区域的像素计数。KaufmannRegionCommand KaufmannCommandInner =KaufmannRegionCommand ();KaufmannCommandInner。CombineMode=RasterRegionCombineMode.Set;KaufmannCommandInner。MaximumInput = 110;KaufmannCommandInner。MinimumInput = 54;KaufmannCommandInner。半径= 21;KaufmannCommandInner。RegionStart=曾经繁荣;KaufmannCommandInner。RegionThreshold = 13;KaufmannCommandInner。RemoveHoles =真正的;KaufmannCommandInner.Run(图片);intfirstPixelCount = KaufmannCommandInner.PixelsCount;/ /命令再次申请。KaufmannRegionCommand KaufmannCommandOuter =51 KaufmannRegionCommand(29日,229年,207年,曾经繁荣,真正的,RasterRegionCombineMode.Set);KaufmannCommandOuter.Run(图片);intsecondPixelCount = KaufmannCommandOuter.PixelsCount;/ /打印第一个和第二个地区之间的比率。结果= (firstPixelCount * 1.0 / secondPixelCount);MessageBox.Show (result.ToString ());}静态LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools.Codecs进口Leadtools.ImageProcessing.Core公共KaufmannRegionCommandExample ()昏暗的编解码器作为RasterCodecs ()编解码器。ThrowExceptionsOnInvalidImages =真正的昏暗的leadImage作为RasterImage = codecs.Load (Path.Combine (LEAD_VARS.ImagesDir“IMAGE3.dcm”))“准备的命令昏暗的曾经繁荣作为LeadPoint =LeadPoint (leadImage。宽度\ 2),(leadImage。身高\ 2))“应用命令为了得到第一区域的像素计数。昏暗的KaufmannCommandInner作为KaufmannRegionCommand =KaufmannRegionCommandKaufmannCommandInner。CombineMode=RasterRegionCombineMode.KaufmannCommandInner。MaximumInput = 110KaufmannCommandInner。MinimumInput = 54KaufmannCommandInner。半径= 21KaufmannCommandInner。RegionStart=曾经繁荣KaufmannCommandInner。RegionThreshold = 13KaufmannCommandInner。RemoveHoles =真正的KaufmannCommandInner.Run (leadImage)昏暗的firstPixelCount作为整数= KaufmannCommandInner.PixelsCount“应用命令。昏暗的KaufmannCommandOuter作为KaufmannRegionCommand =51 KaufmannRegionCommand(29日,229年,207年,曾经繁荣,真正的,RasterRegionCombineMode。)KaufmannCommandOuter.Run (leadImage)昏暗的secondPixelCount作为整数= KaufmannCommandOuter.PixelsCount“打印第一个和第二个地区之间的比率。昏暗的结果作为= (firstPixelCount * 1.0 / secondPixelCount)MessageBox.Show (result.ToString ())结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

Leadtools.ImageProcessing.Core作为sembly
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。