Automatic lung segmentation
肺部CT图像分割方法研究

第27卷第6期CT理论与应用研究Vol.27,No.6 2018年12月(683-691)CT Theory and Applications Dec.,2018周茂,曾凯,杨奎,等.肺部CT图像分割方法研究[J].CT理论与应用研究,2018,27(6):683-691.doi:10. 15953/j.1004-4140.2018.27.06.01.Zhou M,Zeng K,Yang K,et al.Research of Lung Segmentation Based on CT Image[J].CT Theory and Applications,2018, 27(6):683-691.doi:10.15953/j.1004-4140.2018.27.06.01.(in Chinese).肺部CT图像分割方法研究周茂1,2,曾凯2,杨奎2,于涛2,冯鹏1,3,魏彪11.重庆大学光电技术及系统教育部重点实验室,重庆4000442.深圳安科高技术股份有限公司南京分公司,南京2100033.重庆大学工业CT无损检测教育部工程中心,重庆400044摘要:医学CT图像中,肺实质区域的准确分割乃是肺结节检测的基础,其对于临床肺部疾病诊断具有重要意义。
本文首先综述基于医学CT图像的肺实质分割算法,然后详细阐明肺实质分割的主要步骤,探讨几种典型算法的分割效果,包括肺实质与肺气管的比较分析。
最后以此为基础,综合几种常用的分割算法与改进,提出一种实用性强、鲁棒性较好的肺实质分割算法。
关键词:肺部分割;肺实质;气管;边界修补doi:10.15953/j.1004-4140.2018.27.06.01中图分类号:TP391;R814.42文献标志码:A随着医学CT技术的不断发展和医疗CT设备的应用,利用医学CT影像辅助医生进行肺部疾病诊断,已成为临床肺部疾病诊疗的普遍共识。
然而,作为肺部医学CT图像处理的基本步骤,肺部区域的精确分割,将直接关系到后期肺部疾病的准确诊断,因而格外重要。
ct后处理技术与x线评估气胸及液气胸患者肺压缩比结果比较

CT后处理技术与X线评估气胸及液气胸患者肺压缩比结果比较孟庆良ꎬ赵建娜ꎬ张晓明ꎬ梁文娇中国人民解放军联勤保障部队第982医院ꎬ河北唐山063000㊀㊀摘要:目的㊀探讨MSCT后处理技术评估气胸㊁液气胸患者肺压缩比的价值ꎮ方法㊀回顾性选取885例气胸㊁液气胸患者ꎬ先后行常规X线胸片及胸部CT扫描ꎮ将患者胸部CT图像导入飞利浦EBW4.05工作站ꎬ利用组织分割(TissueSegmentation)技术及肺密度(LungDensity)技术分别测定胸腔内气体(G)㊁液体(E)及同侧胸腔体积(L)ꎬ利用公式G/L或G+E/Lꎬ准确计算出肺压缩比ꎮ结果㊀CT后处理对小量㊁大量气胸患者测得的肺压缩比均高于X线(P<0.001)ꎮX线法㊁CT法对小量气胸患者肺压缩比的相关性为0.908(P=0.0007)ꎬ对大量气胸的相关性为0.922(P=0.0003)ꎮ结论㊀利用MSCT后处理技术能够精确快捷地计算出肺压缩比ꎬ可以有效指导临床选择治疗方案及疗效评估ꎮ㊀㊀关键词:气胸ꎻ液气胸ꎻCT检查ꎻX线平片ꎻ后处理技术ꎻ肺压缩比㊀㊀doi:10.3969/j.issn.1002 ̄266X.2020.05.015㊀㊀中图分类号:R445.3㊀㊀文献标志码:A㊀㊀文章编号:1002 ̄266X(2020)05 ̄0060 ̄03通信作者:梁文娇(E ̄mail:815126050@qq.com)㊀㊀气胸㊁液气胸是临床中的常见病ꎬ治疗方案选择主要取决于肺压缩的程度及患者临床症状的轻重ꎮ因此ꎬ在气胸㊁液气胸临床诊疗中ꎬ准确评估肺组织的压缩程度具有重要意义ꎮ以往临床主要通过X线胸片来诊断气胸并进行少量及大量分度ꎬ其评估结果误差较大ꎮ胸部CT检查在显示微少量气胸方面明显优于X线平片ꎬ可在MSCT图像上测量不同平面的各种径线ꎬ从而预计肺压缩比ꎬ但因测算公式过于复杂㊁主观因素大㊁误差率高ꎬ临床一直未广泛采用ꎮ近年来ꎬMSCT后处理技术飞速发展ꎬ有助于简单准确地测量出胸腔内气体㊁液体及同侧胸腔体积ꎬ精确计算出被压缩肺体积比ꎬ更加有效指导临床ꎬ从而选择最佳治疗方案ꎮ1 资料与方法1.1㊀临床资料㊀选取2016年1月~2018年6月在我院先后行常规X线胸片及胸部CT扫描的气胸及液气胸首诊患者885例为研究对象ꎬ其中男568例㊁女217例ꎬ年龄5~87(46.0ʃ3.7)岁ꎮ气胸284例㊁液气胸601例ꎻ右侧者567例ꎬ左侧者318例ꎮ纳入标准:①单侧气胸㊁液气胸ꎻ②为首次诊断ꎬ未经干预ꎻ③无其他病变引起的肺部炎症及肺不张ꎮ排除标准:①存在明显胸膜黏连ꎻ②存在肺气肿及较大肺大泡ꎻ③外伤后胸廓明显变形及肺挫裂伤与胸腔积液分解不清ꎮ1.2㊀X线胸片拍摄1.2.1㊀拍摄方法㊀采用飞利浦DRꎬ患者取站位ꎬ后前位拍摄ꎬ范围包括肺尖至膈肌双侧整个肺野ꎬ于深吸气后屏气曝光ꎮ参数:管电压102kVꎬ电荷总量8.17mAsꎬ曝光时间11.92msꎬ管球距离1.5mꎮ1.2.2㊀X线胸片估算气胸及液气胸肺压缩比及其标准㊀由于气胸容量近似肺直径立方与单侧胸腔直径立方的比率ꎬ即(单侧胸腔直径3-肺直径3)/单侧胸腔直径3ꎬ当侧胸壁至肺边缘的距离约为1cm时ꎬ气胸约占该侧胸腔容量的25%左右ꎬ2cm时约占50%ꎮ故以侧胸壁与肺边缘距离ȡ2cm为大量气胸(ȡ50%)ꎬ<2cm为小量气胸(<50%)ꎮ如从肺尖气胸线至胸腔顶部估计气胸大小ꎬ距离ȡ3cm为大量气胸(ȡ50%)ꎬ<3cm为小量气胸(<50%)[1]ꎮ计算患者例数ꎮ1.3㊀胸部CT扫描1.3.1㊀胸部CT扫描方法㊀患者取仰卧位㊁双臂上举ꎬ头先进ꎬ于平静呼吸下吸气末屏气扫描ꎬ扫描范围自肺尖至肺底ꎮ使用飞利浦64排CTꎬ扫描参数:管电压120kVꎬ电流290mAꎬ矩阵512ˑ512ꎬ重建层厚0.625mmꎮ重建算法使用标准法和高分辨法ꎬ肺窗为(窗宽1500HUꎬ窗位-650HU)ꎬ纵隔窗为(窗宽350HUꎬ窗位50HU)ꎮ1.3.2㊀CT图像测量㊁肺压缩比计算及其标准㊀将患者薄层重建CT图像上传至GEAW4.5工作站ꎬ由两名均有5年以上工作经验的CT诊断医师分别06山东医药2020年第60卷第5期利用TissueSegmentation功能ꎬ在Volume模式下ꎬ将胸腔内气体气体㊁液体分别逐层染色填充ꎬ在TissueManagement窗进一步处理ꎬ用不同颜色显示游离气体㊁液体ꎬ显示出具体的气体体积(G)㊁液体体积(E)ꎬ在LungDensity下快速精确测得同侧胸腔体积(L)ꎬ气胸患者利用公式G/Lꎬ液气胸患者利用公式G+E/Lꎬ计算肺压缩比(如图1a ̄2f)ꎮ当两名医师测量及计算结果不统一㊁差异>5%时ꎬ进行讨论ꎬ最后协商决定最后结果ꎮ气胸的分度:ɤ25%为Ⅰ度ꎬ>25%~50%为Ⅱ度ꎬȡ50%为Ⅲ[1]ꎮ在本研究中ꎬ为了与X线分割法进行比较ꎬ以50%为分界线ꎬ<50%(将Ⅰ度及Ⅱ度进行合并)为少量气胸ꎬȡ50%为大量气胸ꎬ计算患者例数ꎮ见图1㊁2ꎮ㊀㊀注:1a为原始图像ꎬ1b为胸腔内游离气体染色后图像ꎬ1c为胸腔内气体体积G=1375.4mLꎬ1d为LungDensity下快速测量双侧胸腔体积ꎬ图中显示右侧胸腔体积L=4274.8mLꎬ则右侧气胸压缩比=1375.4/4274.8=32.2%ꎮ图1㊀1例气胸患者胸部CT重建图像1.4㊀统计学方法㊀应用SPSS19.0统计软件ꎮ对X线法和CT法所算得的肺压缩百分比分度差异进行t检验ꎬ相关性分析采用线性相关分析ꎮP<0.05为差异有统计学意义ꎮ2㊀结果2.1㊀X线与CT计算肺压缩体积㊀在X线平片上评估肺压缩的体积ꎬ少量者676例ꎬ大量者209例ꎮCT法评估少量者630例ꎬ大量者255例(其中肺压缩比ɤ25%者135例㊁>25%~50%者495例)ꎮ2.2㊀X线法与CT法对气胸量的评价效果比较㊀CT后处理对小量㊁大量气胸患者测得的肺压缩比均高于X线(P<0.001)ꎮX线法㊁CT法对小量气胸患者肺压缩比的相关性为0.908(P=0.0007)ꎬ对大量气胸的相关性为0.922(P=0.0003)ꎮ㊀㊀注:2a为原始图像ꎬ2b为胸腔内游离气体染色后图像ꎬ2c为胸腔内积液染色后图像ꎬ2d为胸腔内气体体积G=789.5ccꎬ2e为胸腔内积液体积175.7mLꎬ2f为LungDensity下快速测量双侧胸腔体积ꎬ图中显示右侧胸腔体积L=2835.1mLꎬ则右侧液气胸压缩比=(789.5+175.7)/2835.1ˑ100%=34.0%图2㊀1例液气胸患者胸部CT重建图像3㊀讨论㊀㊀胸膜腔为左右各一的密闭的潜在腔隙ꎬ由脏层胸膜和壁层胸膜构成ꎬ任何原因导致的胸膜破损使空气进入胸膜腔则称其为气胸ꎬ同时伴有出血或渗出为液气胸[2]ꎮ临床上常见的原因有自发性㊁外伤性㊁医源性及肿瘤所致的气胸等ꎮ由于胸廓的形态不规则ꎬ使得两侧的胸膜腔形态不一ꎬ且存在个体差异ꎬ要想用具体的数学计算方法来获得精确的肺体积ꎬ则需要通过大量的测量和计算ꎬ工作量大ꎬ不符合实际临床工作需要ꎮ发生气胸或液气胸时ꎬ由于气体及液体的理化特性不同ꎬ随着患者检查时体位的不同ꎬ游离气体向上移动ꎬ液体向下移动ꎬ导致常规测量存在误差ꎬ给临床工作带来不便及误导ꎮ㊀㊀发生气胸㊁液气胸时ꎬ精确的肺压缩比是临床选择保守治疗㊁胸腔闭式引流或者开放手术的重要依据之一[3]ꎮ如何简单㊁准确地测定肺压缩比是临床工作中尚待解决的问题ꎮ临床目前多采用X线胸片对气胸进行分度ꎬ它是目前诊断气胸最经济㊁可靠的方法ꎮ气胸在胸片上大多可以看到外凸的气胸线ꎬ为胸腔内游离气体与被压缩肺组织的交界线ꎬ线外为无肺纹理的透光区ꎬ内为被压缩的肺组织ꎮ以往常规的临床测量方法主要通过X线胸片粗略估测气胸时肺压缩百分比ꎬ薛城敬[4]及魏仁国等[5]介绍了多种X线胸片测量气胸压缩比的方法ꎬ测量方法各异ꎬ主要有目测法㊁面积法[6]㊁切割法[7]㊁三线法[8ꎬ9]等ꎬ评定原理各不相同ꎬ测量结果相差较大ꎮX线胸片的各种方法均是大致估算ꎬ尤其是临近分16山东医药2020年第60卷第5期界值ꎬ常因个人测量习惯及经验不同ꎬ存在较大分歧ꎮ㊀㊀近年来ꎬ临床工作中试图用各种方法在胸部CT上对气胸进行定量分析ꎬ夏文骞等[10]通过手工勾画每一个断层的气体或气液体ꎬ进行体积累加计算得出肺压缩比ꎬ但操作繁琐㊁工作量大ꎮ陈永权等[11]㊁梁树生等[12]㊁邓承等[13]通过对游离气胸时不同平面各种径线的测量得到肺压缩比的线性回归方程ꎬ其本质与X线胸片测量气胸径线原理类似ꎮ由于胸膜腔的形态不规则ꎬ患者体位变化及液气胸的理化性质的不同及是否存在胸膜黏连等ꎬ不能反映出肺的三维立体形态ꎬ且以上各种测量方法不仅公式复杂ꎬ且只针对单纯气胸患者ꎬ不适用于液气胸的肺压缩比的测量ꎬ尤其是有胸廓畸形㊁肺不张等病变的患者ꎬ故临床适用面窄ꎬ难以得到推广ꎮ㊀㊀MSCT具备良好的空间及密度分辨率ꎬ并具有进行三维立体结构测量的优势[14]ꎮ不同的器官组织㊁病变的影像之间无相互重叠ꎬ可以任意断面成像ꎬ提供受检者任意切面组织㊁器官和病灶等的详细解剖细节ꎬ使患者可以得到相应的治疗[15]ꎮ在进行胸部CT检查的同时ꎬ不仅可以简单㊁准确测量出气胸㊁液气胸的体积ꎬ在精确计算出肺压缩比ꎬ还可以详细了解患者的肺部详细情况ꎬ如是否存在肺挫裂伤等病变ꎬ可以了解是单纯气胸还是发生了液气胸ꎬ是单侧还是双侧ꎬ是自发性气胸还是同时合并了肺部的其它疾患ꎬ在不增加患者经济负担的前提下给临床提供了更加详细㊁准确的影像资料ꎬ帮助临床选择最佳的治疗方案ꎬ对临床诊断与治疗均起到积极的作用ꎮ尤其也适用于液气胸患者ꎬ且不受胸廓畸形等因素的限制ꎮ同时ꎬ从法医学的角度来讲ꎬ当今社会各种原因引起的气胸㊁液气胸相关的伤情鉴定越来越多ꎬ能够简单㊁准确得出精确的肺压缩比已成为法医鉴定界的迫切需求[16]ꎮMSCT的TissueSeg ̄mentation及LungDensity技术恰恰能够解决这一难题ꎬ其操作方法简便ꎬ不存在人为的经验差别ꎬ且计算公式简便ꎮMSCT后处理技术是通过对游离气体㊁积液体积㊁同侧胸腔体积的准确测量得出数值ꎬ人为因素造成的误差基本可以排除ꎬ故可以得出精确的肺压缩比值ꎬ无论是微量气胸还是大量气胸ꎬ为临床工作中的及时治疗㊁治疗方案的选择提供了准确的依据ꎮ㊀㊀综上所述ꎬMSCT后处理技术能够简单㊁准确地测量出气胸㊁液气胸时胸腔内气体㊁液体及同侧胸腔体积ꎬ为精确计算气胸㊁液气胸中计算肺压缩比率提供了简单㊁准确的方法ꎬ明显优于传统的X线胸片ꎬ能够更好地为临床治疗方案的选择和法医学的相关伤情鉴定提供可靠的依据ꎮ参考文献:[1]陆再英ꎬ等.内科学[M].北京:人民卫生出版社ꎬ2013:118. [2]白人驹ꎬ等.医学影像诊断学[M].北京:人民卫生出版社ꎬ2014:255.[3]FarooqUꎬRazaWꎬZiaNꎬetal.Classificationandmanagementofchesttrauma[J].CollPhysiciansSurgPakꎬ2006ꎬ16:101 ̄103. [4]薛城敬.气胸患者肺压缩率的评估方法及应用此方法的体会[J].医学综述ꎬ2011ꎬ9(9):68.[5]魏仁国ꎬ谭利华.肺压缩容积影像学测量方法[J].医学综述ꎬ2011ꎬ17(23):3639 ̄3641.[6]KircherLTJrꎬSwartzelRL.spontaneouspneumothoraxanditstreatment[J].JAmMedAssocꎬ1954ꎬ155(1):24 ̄29. [7]KellyAMꎬWeldonDꎬTsangAYꎬetal.ComparisonbetweentwometalsforestimatingpneumothoraxsizefromchestX ̄ravs[J].Re ̄spirMedꎬ2006ꎬ100(8):1356 ̄1359.[8]CollinsCDꎬLopezAꎬMallieAꎬetal.Quantificalionofpneumo ̄thoraxsizeonchestradiographsusinginterpleuraldistancesregres ̄sionanalysisbasedonvolumemeasurementsfromhelicalCT[J].AJRꎬ1995ꎬ165(5):127 ̄1130.[9]王蕾ꎬ李庆云ꎬ等.三线法在计算气胸肺压缩程度中的应用[J].诊断学理论与实践ꎬ2007ꎬ6(4):347 ̄349.[10]夏文骞ꎬ鹿梅.CT评价气胸后肺组织压缩体积(百分比)准确性的研究[J].实用放射学杂志ꎬ2001ꎬ17(12):99 ̄103. [11]陈永权ꎬ陈莉ꎬ吕发金.游离气胸的多层螺旋CT定量研究[J].中国医学影像学杂志ꎬ2016ꎬ24(10):750 ̄754. [12]梁树生ꎬ周国永ꎬ郑华英ꎬ等.气胸肺压缩比的CT测量研究[J].临床放射学杂志.2017ꎬ36(1):60 ̄63.[13]邓承ꎬ苏云彬ꎬ向述天.气胸容积CT快速量化测定研究[J].临床放射学杂志ꎬ2017ꎬ36(8):1116 ̄1120.[14]陈颖ꎬ蔡恩明ꎬ申敏ꎬ等.MDCT扫描精确评估气胸压缩比[J].中国医学影像学技术ꎬ2018ꎬ34(9):1356 ̄1359. [15]王秀波ꎬ赵建明ꎬ杨军舰ꎬ等.DR与螺旋CT诊断急诊胸度部创伤中的临床应用价值分析[J].中国CT和MR1杂志ꎬ2017ꎬ15(3):72 ̄74.[16]杨裴ꎬ胡海平ꎬ许小兰ꎬ等.MDCTTissueSegmentation技术测定气胸㊁液气胸中肺压缩比率方法研究[J].医学影像学杂志ꎬ2016ꎬ26(9):1602 ̄1605.(收稿日期:2019 ̄08 ̄30)26山东医药2020年第60卷第5期。
基于Transformer的肺肿瘤三维CT图像分割

第14卷㊀第3期Vol.14No.3㊀㊀智㊀能㊀计㊀算㊀机㊀与㊀应㊀用IntelligentComputerandApplications㊀㊀2024年3月㊀Mar.2024㊀㊀㊀㊀㊀㊀文章编号:2095-2163(2024)03-0076-05中图分类号:TP391文献标志码:A基于Transformer的肺肿瘤三维CT图像分割王伟桐1,玄㊀萍1,2(1黑龙江大学计算机科学技术学院,哈尔滨150080;2汕头大学工学院,广东汕头515063)摘㊀要:基于信息学技术自动分割病人的肺部CT图像,有助于医生对于肺癌患者的早期诊断,提取和整合图像区域间的空间关联,对于提升肺肿瘤分割性能是十分重要的㊂本文提出了一个新的基于Transformer的分割模型,用于肺肿瘤三维CT图像分割㊁学习和整合此类关联㊂本文分别设计了带有混合多头图像区域节点注意力的Transformer模块和类别注意力模块,学习并融合了肺部CT图像的空间层面和通道层面的信息㊂将新的基于Transformer的分割模型同其他较为先进的模型进行了对比实验,实验结果表明新的模型在骰子系数㊁交并比和豪斯多夫距离等方面优于其他模型㊂关键词:肺部CT图像;图像区域节点注意力;Transformer;类别注意力Transformer-basedsegmentationofCTimagesofpatientswithlungtumorsWANGWeitong1,XUANPing1,2(1CollegeofComputerScienceandTechnology,HeilongjiangUniversity,Harbin150080,China;2CollegeofEngineering,ShantouUniversity,Shantou515063,Guangdong,China)Abstract:AutomaticsegmentationofCTimagesofpatientswithlungtumorsbasedoninformaticstechnologyishelpfulforpromotingtheearlydiagnosisoflungcancerpatients.Extractingandintegratingthespatialcorrelationamongimageregionsisveryimportantforimprovingthesegmentationperformanceoflungtumors.ThepaperdesignsaTransformermoduleandacategoryattentionmodulewithahybridmulti-headimageregionnodeattention,respectively,whichlearnedandfusedthespatialandchannel-levelinformationofthelungCTimage.Thepaperdesignstheimageregionnodeattentionmechanismandthecategoryattentionmechanismtolearnandfusetheinformationofspatiallevelandthatofchannellevel.Theproposedmethodiscomparedwithseveralsegmentationmethodsforsegmentinglungtumors.TheexperimentalresultsshowthattheproposedsegmentationmodelissuperiortothecomparedsegmentationmodelsinDice,IoUandHDdistance.Keywords:CTimageofthelungs;imagearea-wisenodeattention;Transformer;categoryattention基金项目:国家自然科学基金(61972135);黑龙江省自然科学基金项目(LH2019F049);中国博士后科学基金(2019M650069);黑龙江省博士后科研启动基金(BHLQ18104)㊂作者简介:王伟桐(1996-),男,硕士研究生,主要研究方向:计算机视觉㊂通讯作者:玄㊀萍(1979-),女,博士,教授,主要研究方向:医学图像处理与分析㊁深度学习㊂Email:xuanping@hlju.edu.cn收稿日期:2023-03-050㊀引㊀言在过去几年里,肺癌是全世界癌症相关死亡的主要原因,占全部因癌症死亡人数的四分之一以上[1]㊂随着计算机视觉技术的不断发展,使用计算机辅助分割肺肿瘤的模型逐渐丰富,准确率也不断提高[2]㊂尽管如此,目前肺肿瘤的自动分割仍然是一项具有挑战性的任务,原因之一是肺部组织与肺肿瘤的语义和纹理特征相似度较高;另一个原因是不同病人的肿瘤在位置㊁形状上具有较大的差别㊂由于肺肿瘤和肺部其他组织的位置之间存在很强的联系,有效的建模肺部CT图像各区域间的相关性有助于肺肿瘤的检测和分割㊂随着卷积神经网络(CNN)的出现,其衍生出的模型在自动化的医学图像分析任务中展现出了不错的性能,该类模型具备高表示能力㊁快速推理以及卷积核共享的特性,全卷积网络和U-Net就是该类模型的代表[3-4]㊂尽管这些模型具有较好的肺肿瘤分割能力,但当肿瘤的形状和大小等方面出现较大差异时,这些模型更多地依赖于多级级联CNN的方法[5]㊂这些模型固定了滤波器的大小,所以难以捕捉远程节点间的关系,进而导致在肿瘤大小不断变化的情况下很难实现精准分割,这也是目前卷积神经网络在图像处理方面的局限性[6]㊂为了克服卷积神经网络的这一局限性,已有研究提出基于CNN特征建立自注意机制[7]㊂在深度学习领域的其他方向,完全依赖于注意力机制的Transformer已经出现,这类模型应用于包括计算机视觉在内的其他方向,并取得了不错的效果[8-9]㊂与以往基于CNN的方法相比,Transformer更擅长学习图像区域的全局上下文,被广泛地应用于视频处理以及其他场景的图像分割,均得到了相对较好的预测结果[10-12]㊂因为不同患者的肿瘤大小不同㊁形状差异大㊁边界特点各异,所以从CT中自动分割肺肿瘤是一个具有挑战性的问题[13]㊂为此,Kim等学者[14]提出了一种可用于肺肿瘤分割的从粗略到精细的神经结构分割模型,仍然使用卷积块来作为分割模型的构成元件,因此无法避免卷积的局限性㊂Oktay等学者[15]提出了一种通过门控注意力来整合空间信息的AttentionU-Unet分割模型,在多次竞赛中取得了不错的成绩㊂Fabian等学者[16]建立了nnU-Net模型,并且优化了数据的预处理㊁网络结构㊁模型训练和分割结果的后处理㊂nnU-Net模型在2018年的MedicalSegmentationDecathlonChallenge比赛中排名第一,并在后续的其他比赛中也取得了不错的成绩[17]㊂然而,肺肿瘤三维CT图像的特点是左右2个区域的肺组织和肺肿瘤具有相似的纹理特征,上述模型均忽略了长距离对象间的空间依赖㊂1㊀肺肿瘤三维CT图像分割模型为了实现肺肿瘤的分割,本文提出了基于Transformer的肺肿瘤三维CT图像分割模型㊂首先,通过分割主干模块来学习上下文表示,以达到抓取图像的纹理和语义特征的目的;针对分割编码器提取到的特征,设计了一种带有混合多头自注意力的Transformer模块,该模块中的注意力结构带有独立的空间分支和通道分支,用来学习全局层面的内容表示;最后,为了自适应融合不同分支学习到的空间表示和通道表示,设计了类别注意力模块,并最终实现分割输出㊂1.1㊀分割主干模块本文选用3DnnU-Net作为分割主干模块来提取上下文表示,编码器和解码器分别由6个编码层和6个解码层构成㊂3ˑ3ˑ3的卷积块是所有编码层的重要组成部分,InstanceNormalization和LeakyRelu是激活函数㊂在每个下采样阶段,使用跨步卷积代替池化层,获得更具代表性的上下文表示㊂建立每一个解码层时,选用转置卷积的方式来进行上采样㊂为了集成更多的细节特征,从编码层到解码层的跨层连接㊂用ZɪRHˑWˑDˑC表示最后一个编码层的输出特征,H㊁W㊁D分别表示高度㊁宽度和深度,通道数用C来表示,Z是输入图像的上下文表示㊂1.2㊀带有混合多头图像区域节点注意力的Transformer模块带有混合多头图像区域节点注意力(如图1所示)的Transformer模块将主干网络最后一个编码层的输出特征ZɪRHˑWˑDˑC进行通道层面的分割(Split),分别得到X1ɪRNˑc4㊁X2ɪRNˑc4㊁X3ɪRNˑc2作为由上至下的3个分支的输入㊂Y1和Y2经过通道和空间的学习得到的特征可分别表示为:Y1=W2W1X1+B1[]+B2(1)Y2=DWConv(FC(X2))(2)㊀㊀其中,B1和B2是偏差向量,W1和W2是可学习的权重矩阵㊂M L PM H S AS p l i t L i n e a r D W C o n v F u s i o n 图1㊀混合多头图像区域节点注意力Fig.1㊀Mixermulti-headimageregionnodeattention77第3期王伟桐,等:基于Transformer的肺肿瘤三维CT图像分割㊀㊀此外,给定分割出的特征图X3,该模块将其重塑为XɪRNˑC,X中的第j个位置XjɪR1ˑC对应输入图像的特定区域,其中N=HˑW是图像区域节点的个数㊂随后将X与可学习的矩阵相乘,生成新的特征图{Q㊁K}ɪRNˑC,对此可表示为:Q=WqX(3)K=WkX(4)㊀㊀其中,Wq㊁Wk是权重矩阵㊂在Q和K的转置之间执行矩阵乘法,目的是得到相似性矩阵AɪRNˑN,见式(5):A=QKT(5)㊀㊀2个节点的特征越相似表示2个节点的语义之间的相关性越强㊂将特征X与另一个权重矩阵Wv相乘,生成特征投影V,可由式(6)进行描述:V=WvX(6)㊀㊀将相似性矩阵A经过softmax激活后的结果与V之间执行矩阵乘法,计算公式具体如下:Y3j=expaij㊀dkæèçöø÷ðNi=1expaij㊀dkæèçöø÷Vi(7)㊀㊀其中,dk是每个区域节点的特征数,aij表示图像区域节点i与j的相似性,iɪ(1 N)㊁jɪ(1 N)分别表示矩阵A的行和列㊂从式(7)可以推断第j个位置的结果特征Y3j是所有位置的原始特征的加权和㊂因此,该特征具有全局上下文视图,并根据区域节点的相似性矩阵选择性地聚合上下文㊂为了避免学习过程中的偏差,本文将上述图像区域节点注意力推广为多头图像区域节点注意力㊂1.2.1㊀类别注意力模块因为混合多头图像区域节点注意力模块中不同分支学习到的多个信息对于肺肿瘤分割任务具有不同的重要性,所以本文建立了一个新的类别注意力模块(Fusion),以得到增强后的特征,通过对注意力得分的自适应加权,实现对来自不同分支的信息进行自适应融合㊂第h个分支的信息分数为Sh的定义公式可写为:shi=tanhWtxhi+bt()[]TSt(8)㊀㊀其中,Wt是可学习的权重矩阵;bt是偏差向量;St用于捕获不同类别信息特征的上下文㊂归一化注意力权重αi的定义公式如下:αhi=expshi()ðHh=1expshi()(9)㊀㊀注意力增强后的节点特征向量Yi,其计算见式(10):Yi=ðHh=1Yhi αhi(10)㊀㊀其中, 表示元素级乘积运算符㊂最终,该模块将特征矩阵X1和原始信息Yi进行通道维度的拼接,并通过全连接层将其维度重新降回到原始的通道数量,得到输出特征Y㊂1.2.2㊀混合多头图像区域节点注意力模块混合多头图像区域节点注意力模块在Transformer中的位置如图2所示,带有混合多头图像区域节点注意力的Transformer模块的编码层中包含M层的混合多头图像区域节点注意力模块以及前馈层(FFD),因此第m层的编码图像表示Pm的运算需要用到:Pm=FFDLNPᶄm()()+Pᶄm(11)Pᶄm=MixerMHSALNPm-1()()+Pm-1(12)㊀㊀其中,LN表示层归一化运算符㊂L -N o r mL -N o r m F F NM i x e rM H S A图2㊀混合多头图像区域节点注意力模块在Transformer中的位置Fig.2㊀PositionofMixerMHSAinTransformer㊀㊀经过混合多头自注意力的计算后,将P重塑成ZɪRHˑWˑDˑC㊂2㊀实验2.1㊀相关数据集本文使用MedicalSegmentationDecathlonChallenge比赛中的LungTumorsdataset数据集来评估模型的性能,将其中64例患者的肺部CT图像分为训练集和测试集两个部分,该数据集中每位患者的CT图像对应的真实标签仅有一项肺肿瘤标记,数据采自不同医院的多台扫描仪,各个病例的体素大小并不完全相同㊂本文将所有CT图像的体素重采样为87智㊀能㊀计㊀算㊀机㊀与㊀应㊀用㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀第14卷㊀1.24ˑ1.24ˑ0.78大小,并使用水平和垂直翻转㊁随机旋转㊁亮度和伽马噪声增强以及随即缩放等数据增强方法来扩充现有的数据集㊂64个案例被随机选择20%作为测试集,将其余的56个案例随机划分10份,随机选择其中的9份作为训练集,1份用于验证㊂2.2㊀评价指标使用衡量空间体积关系的骰子系数(Dice)[18]和交并比(IoU)[19],以及形状相似度方面的豪斯多夫距离(HD)[20],来评估肺肿瘤的分割性能㊂肿瘤的骰子系数Dicetum在0和1范围内,值越大表示分割结果越好㊂可由式(13)来计算:Dicetum=2|PtumɘGtum||Ptum|+|Gtum|(13)㊀㊀其中,Ptum和Gtum分别表示分割结果和真实标签㊂肿瘤的IoUtum,可由式(14)来求值:IoUtum=|PtumɘGtum||PtumɣGtum|(14)㊀㊀真实标签(GroundTruth)的边界与分割的肿瘤边界之间的HD定义见式(15):HDtumPtum,Gtum()=maxhPtum,Gtum(),hGtum,Ptum(){}(15)㊀㊀其中,h(Ptum,Gtum)表示Ptum与Gtum之间的距离,见式(16):hPtum,Gtum()=maxpɪPtummingɪGtump-g(16)㊀㊀其中,p和g分别来自Ptum和Gtum㊂研究可知,HDtum值越小,分割效果越好㊂2.3㊀与其他方法的比较为了进一步评估模型的性能,将本文的模型与其他先进的肺肿瘤分割模型SCANS㊁3DU-Net㊁AttentionU-Net㊁3DnnU-Net㊁3DResNet进行了对比实验,实验结果见表1㊂本文的模型在骰子系数和豪斯多夫距离等方面取得了领先于其他网络的分割效果,在肿瘤分割方面,本文模型的骰子系数达到了最高水平㊁为0.778,比SCANS高1.21%,比AttentionU-Net提升了2.25%,比3DU-net高4.43%,比3DnnU-Net以及3DResNet分别提高了3.5%和2.5%;在交并比方面,模型的最佳交并比为0.6551,比AttentionU-Net㊁3DU-net㊁3DnnU-Net和3DResNet分别高出3.39%㊁5.35%㊁3.57%和2.96%㊂此外,本文的模型得到了最低的豪斯多夫距离值63.6417mm,分别比其他方法优化了30.3553mm㊁2.8571mm㊁45.7316mm㊁和40.3872mm㊂表1㊀本文的模型和其他先进模型比较的结果Table1㊀Resultscomparisonofthemodelinthispaperwithotheradvancedmodels模型骰子系数(Dicetum)交并比(IoUtum)豪斯多夫距离(HDtum)/mmSCANS0.7659--3DU-Net0.73370.601693.9770AttentionU-Net0.75250.621266.49883DnnU-Net0.74300.6104109.01333DResNet0.75300.6255104.0289本文模型0.77800.655163.64173㊀结束语本文提出了一种新的基于Transformer的分割模型提取和整合图像区域间的空间关联㊂该模型所包含的带有混合多头图像区域节点注意力的Transformer模块以及类别注意力模块,分别学习和融合了肺部CT图像的空间层面和通道层面的信息㊂实验结果表明,该模型具有从CT图像中分割肺肿瘤的潜力并为治疗提供帮助㊂参考文献[1]GANSLERT,GANZPA,GRANTM,etal.SixtyyearsofCA:Acancerjournalforclinicians[J].CA:ACancerJournalforClinicians,2010,60(6):345-350.[2]LITJENSG,KOOIT,BEJNORDIBE,etal.Asurveyondeeplearninginmedicalimageanalysis[J].MedicalImageAnalysis,2017,42:60-88.[3]CUIHui,XUYiyue,LIWanlong,etal.Collaborativelearningofcross-channelclinicalattentionforradiotherapy-relatedesophagealfistulapredictionfromCT[C]//InternationalConferenceonMedicalImageComputingandComputer-AssistedIntervention.Springer,2020:212-220.[4]HSUJ,CHIUW,YEUNGS.DarCNN:Domainadaptiveregion-basedconvolutionalneuralnetworkforunsupervisedinstancesegmentationinbiomedicalimages[C]//ProceedingsoftheIEEE/CVFConferenceonComputerVisionandPatternRecognition.IEEE,2021:1003-1012.[5]LONGJ,SHELHAMERE,DARRELLT.Fullyconvolutionalnetworksforsemanticsegmentation[C]//ProceedingsoftheIEEEConferenceonComputerVisionandPatternRecognition.Boston:IEEE,2015:3431-3440.[6]RONNEBERGERO,FISCHERP,BROXT.U-net:Convolutionalnetworksforbiomedicalimagesegmentation[C]//InternationalConferenceonMedicalImageComputingandComputer-assistedIntervention.Cambridge,UK:Springer,2015:234-241.[7]SCHLEMPERJ,OKTAYO,SCHAAPM,etal.Attentiongated97第3期王伟桐,等:基于Transformer的肺肿瘤三维CT图像分割networks:Learningtoleveragesalientregionsinmedicalimages[J].MedicalImageAnalysis,2019,53:197-207.[8]VASWANIA,SHAZEERN,PARMARN,etal.Attentionisallyouneed[C]//Proceedingsofthe31stInternationalConferenceonNeuralInformationProcessingSystems.LongBeach,USA:NIPSFoundation,2017:6000-6010.[9]DEVLINJ,CHANGMW,LEEK,etal.Bert:Pre-trainingofdeepbidirectionaltransformersforlanguageunderstanding[C]//Proceedingsofthe2019ConferenceoftheNorthAmericanChapteroftheAssociationforComputationalLinguistics:HumanLanguageTechnologies,Volume1(LongandShortPapers).Minneapolis:ACL,2018:4171-4186.[10]PARMARN,VASWANIA,USZKOREITJ,etal.Imagetransformer[C]//InternationalConferenceonMachineLearning.Stockholm:dblp,2018:4055-4064.[11]DOSOVITSKIYA,BEYERL,KOLESNIKOVA,etal.Animageisworth16ˑ16words:Transformersforimagerecognitionatscale[J].arXivpreprintarXiv:2010.11929,2020.[12]MOBINYA,NGUYENHV.FastCapsNetforlungcancerscreening[C]//InternationalConferenceonMedicalImageComputingandComputer-AssistedIntervention.Cham:Springer,2018:741–749.[13]BERTASIUSG,WANGHeng,TORRESANIL.Isspace-timeattentionallyouneedforvideounderstanding?[C]//ProceedingsoftheInternationalConferenceonMachineLearning(ICML).IEEE,2021,2:4.[14]KIMS,KIMI,LIMS,etal.Scalableneuralarchitecturesearchfor3dmedicalimagesegmentation[M]//SHEND,etal.Medicalimagecomputingandcomputeraidedintervention-MICCAI2019.LectureNotesinComputerScience.Cham:Springer,2019,11766:220-228.[15]OKTAYO,SCHLEMPERJ,FOLGOCLL,etal.Attentionu-net:Learningwheretolookforthepancreas[J].arXivpreprintarXiv:1804.03999,2018.[16]FABIANI,JAEGERPF,KOHLSA,etal.Maier-Hein.nnu-net:Aself-configuringmethodfordeeplearning-basedbiomedicalimagesegmentation[J].IEEETransactionsonPatternAnalysisandMachineIntelligence,2021,18(2):203-211.[17]ANTONELLIM,REINKEA,BAKASS,etal.Themedicalsegmentationdecathlon[J].NatureCommunication,2022,13(1):1-13.[18]ZOUKH,WARFIELDSK,BHARATHAA,etal.Statisticalvalidationofimagesegmentationqualitybasedonaspatialoverlapindex1:Scientificreports[J].AcademicRadiology,2004,11(2):178-189.[19]CSURKAG,LARLUSD,PERRONNINF,etal.Whatisagoodevaluationmeasureforsemanticsegmentation[C]//ProceedingsoftheBritishMachineVisionConference.Manchester,UK:BMVAPress,2013,27:10-21.[20]ÇIÇEKÖ,ABDULKADIRA,LIENKAMPSS,etal.3DU-Net:Learningdensevolumetricsegmentationfromsparseannotation[C]//InternationalConferenceonMedicalImageComputingandComputer-assistedIntervention.Athens,Greece:Springer,2016,9901:424-432.08智㊀能㊀计㊀算㊀机㊀与㊀应㊀用㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀第14卷㊀。
基于自动阈值的CT图像快速肺实质分割算法

Computer Engineering and Applications 计算机工程与应用
◎图形图像、模式识别◎
基于自动阈值的 CT 图像快速肺实质分割算法
曹 蕾, 占 杰, 余晓锷, 陈武凡 CAO Lei, ZHAN Jie, YU Xiao- e, CHEN Wu- fan
作者简介: 曹蕾( 1974- ) , 女, 在读博士生, 讲师, 主要研究方向: 软件工程、医学图像处理; 陈武凡, 通讯作者。 收稿日期: 2007- 11- 01 修回日期: 2008- 01- 02
曹 蕾, 占 杰, 余晓锷, 等: 基于自动阈值的 CT 图像快速肺实质分割算法
2008, 44( 12) 179的各个部件; 然后源自部件数目和大小进行判断, 这里要考虑到
左 、右 肺 区 可 能 相 连 接 的 特 殊 情 况 ; 最 后 将 不 属 于 肺 实 质 区 的
其它部件( 主要是气管和主支气管) 去除。
( 4) 左右肺的快速自适应分割
如果阈值法不能成功地分割左右肺, 则必须进行再分割。
本 文 重 点 研 究 了 左 右 肺 连 接 的 快 速 判 断 、连 接 区 域 的 快 速 定 位
ral mesothelioma) 厚 度 测 量 , 应 用 相 同 的 分 割 细 化 方 法 会 得 到
完全相反的诊断效果。因此肺实质分割的粒度并不好掌握, 所
对应的细分割方法也难以通用。
START
Read a slice
Elimination of Out- ROI Influence
Application of Optimal Thresholding NO
Elimination of Trachea and Main Bronchi
三维重建及虚拟手术规划在胸腔镜解剖性肺段切除术中的应用

•论著•中国现代医生2020年11月第58卷第32期三维重建及虚拟手术规划在胸腔镜解剖性肺段切除术屮的应用刘海涛王黎彬戚维波银杨帆施谷平张小航赵俊杰马兴杰浙江省嘉兴市第一医院嘉兴学院附属医院心胸外科,浙江嘉兴314000[摘要]目的探讨利用Deepinsinghl软件进行三维重建及虚拟手术规划在胸腔镜解剖性肺段切除术中的应用价值。
方法回顾性分析2018年1~12月我院行胸腔镜解剖性肺段切除术治疗的22例术前疑似早期肺癌患者的临床资料。
术前将胸部增强CT检查的断层二维图像信息以DICOM格式导入Deepinsinghl系统中进行三维重建及虚拟手术规划实施精准肺段切除。
观察指标:①术前三维重建及虚拟手术规划情况;②术中及术后情况。
③随访情况。
结果①术前三维重建及虚拟手术规划情况:22例患者术前均完成三维重建和虚拟手术规划;②术中及术后情况:22例患者均顺利行胸腔镜解剖性肺段切除术,无中转开胸。
22例患者手术时间为(115.05±27.54)min,术中出血量为(78.64±16.14)mL,术后拔管时间为(3.55±1.06)d,术后住院时间为(7.27±2.62)凿遥术后发生肺部感染2例,发生肺动脉栓塞1例,均经保守治疗后痊愈。
术后肿瘤TNM分期为:良性肿瘤1例,0期9例,IA期11例、IB期2例遥三维重建和虚拟手术规划评估肿瘤性质的准确率为95.5%(21/22)遥③随访情况:随访期间所有患者均未发生局部复发、远处转移及死亡情况。
结论应用三维重建及虚拟手术规划能实现精准肺段切除,可提高胸腔镜解剖性肺段切除术的准确性和安全性。
[关键词]肺部肿瘤;三维重建技术;虚拟手术规划技术;肺段切除术[中图分类号]R655.3[文献标识码]A[文章编号]1673-9701(2020)32-0004-04Application of three-dimensional reconstruction and virtual surgical planning in thoracoscopic anatomic lung segment resectionLIU Haitao WANG Libia QI Weibo YANG Fan SHI Guping ZHANG Xiaohang ZHAO Junjie MA XingjieDepartment of Cardiolhoracic Surgery,Jiaxing First Hospital in Zhejiang Province,Affilialed Hospital of Jiaxing University,Jiaxing314000,China[Abstract]Objective To explore the application value of three-dimensional reconstruction and virtual surgical planning using Deepinsinght software in thoracoscopic anatomic lung segment resection.Methods The clinical data of22patients with preoperative suspected early lung cancer who underwent thoracoscopic anatomic lung segment resection in our hospital from January to December2018were retrospectively analyzed.The two-dimensional tomography information of chest enhanced CT examination was imported into Deepinsinght system in DICOM format for3D reconstruction and virtual surgical planning for accurate lung segment resection.The observation index included:①preoperative three-dimensional reconstruction and virtual operation planning;于intraoperative and postoperative conditions;③follow-up situation.Results①Preoperative three-dimensional reconstruction and virtual operation planning:All the22 patients completed3D reconstruction and virtual operation planning before the operation.于Intraoperative and postoperative conditions:All the22patients underwent thoracoscopic anatomic lung segment resection successfully,without conversion to thoracotomy.The operative time of22patients was(115.05±27.54)min,the intraoperative blood loss was(78.64±16.14)mL,the postoperative extubation time was(3.55±1.06)d,and the postoperative hospital stay was(7.27±2.62)d.Postoperative pulmonary infection occurred in2cases and pulmonary embolism in1case,all of which were cured after conservative treatment.Postoperative tumor TNM stage was benign in1case,stage0in9cases,stage IA in11cases, and stage IB in2cases.The accuracy of3D reconstruction and virtual surgical planning in assessing the nature of the tumor was95.5%(21/22).③Follow-up:No local recurrence,distant metastasis,or death occurred during the follow-up period.Conclusion The application of3D reconstruction and virtual surgical planning can achieve accurate lung segment resection and improve the accuracy and safety of thoracoscopic anatomic lung segment resection.[Key words]Lung tumor;Three-dimensional reconstruction technology;Virtual surgical planning technology;Lung segment resection[基金项目]浙江省医药卫生科技计划项目(2018KY796,2018KY800)▲通讯作者4CHINA MODERN DOCTOR Vol.58No.32November2020中国现代医生2020年11月第58卷第32期•论著窑近年来,肺癌的死亡率逐年上升,已居恶性肿瘤死亡之首[1-2]o随着低剂量螺旋CT广泛地应用于普查,早期肺癌越来越多地被发现。
生物医学图像处理

3.
图一 CVANN 模型 它的相关输入信号,权值,阈值和输出信号的是复数.定义神经元 n 的活性 Yn 如下:
这里 Wnm 是连系神经元 n 和神经元 m 的复值(CV)权值.Xm 是来自神经元 m 的 复值输入信号.Vn 是神经元 n 的复值阈值.为得到复值输出信号,将 Yn 写成如下实 部和虚部的形式:
在第一级与第二级使用 CVANN 以实现复制模式识别.
iii.
系统预测性能测量 在这篇论文中,我们用到了一个计算机算法以评估 CVANN 经训练后的分类输出,并检 测包含肺部及肺部边缘区域像素点..分割后的图像的正确分类像素点数可以通过一
下算法来计算:
������������ 和������������ 分别是网络的目标输出与实际输出.最后我们用以下这个公式计算这个方法的 准确度:
其中Tn(������ ) 和On(������ ) 都是复数,分别代表预想输出和实际输出.在 P 模式下,神经元 n 的实际输出值也即(4)的左边代表了实际模式与预想模式之间的误差 .N 代表输 出层的神经元总数.总的 CCVANN 模型就是两个 CVANN 的组合,如图二所显示:
图二
CCVANN 模型
图三图像肺部分离系统框图表示
其中复值反向传播算法用于训练该网络. 当(4)式表示的精确度达到时,训练就停止.在训练过程中用到了 16 副图,之后用剩下的 16 副图测试网络的性能 .计算出来的平均准确率达 99.80%.图四显示了最好准确率下四阶 CWT 和 CCVANN 分离出的图像.
图四有良性肿瘤的肺部图像(a) (B10 号图像) 有恶性肿瘤的肺部图像(b)(M 16 号图像) a 图分离后结果 (c) b 图分离后结果 (d) 为与单 CVANN 系统相比,我们将第一级 CVANN 学习效率,隐藏点数,最大相互影响点数分 别被设为 0.1 , 10 , 10 与[17]相似.第二个 CVANN 的这些参数有实验结果决定.网络结构如 下表一 表一网络结构
基于CT电影模式扫描的人体四维肺部模型构建

基于CT电影模式扫描的人体四维肺部模型构建重庆大学硕士学位论文(学术学位)学生姓名:***指导教师:罗洪艳副教授专业:生物医学电子与信息技术学科门类:工学重庆大学生物工程学院二O一四年四月The Modeling of 4D human lung based onCT cine scanA Thesis Submitted to Chongqing Universityin Partial Fulfillment of the Requirement for theMaster’s Degree of EngineeringByZhang YuwenSupervised by Prof. Luo HongyanSpecialty: Biomedical Electronics andInformation EngineeringCollege of Bioengineering ofChongqing University, Chongqing, ChinaApril 2014摘要近年来,肺部肿瘤的发病率逐年增高,个体化精确放疗对于不适合手术治疗的患者来说仍然是最主要的治疗手段。
基于CT、MRI的图像引导放射治疗(IGRT)和强调放射治疗(IMRT)可基本解决静止靶区的精确放疗问题。
但由于呼吸运动导致的医学影像中运动伪影的存在,对于胸腹腔肿瘤这样的运动靶区,却达不到很好的效果。
肺部四维模型构建是在三维模型的基础上加入时间轴的概念,将获取的一系列三维模型按其在呼吸周期上的相位排列,建立一个与呼吸相关的动态模型。
它能更准确真实的反映出人体胸腔内部器官和组织的运动情况,对于帮助医生实现运动靶区的个体化精确放疗的设计,提供了强有力的图像支持,具有重要的应用价值。
肺部动态模型的构建过程主要包含运动影像数据的获取、基于时相点的运动数据的排序、随时相点变化的静态三维模型的建立和动态模型仿真的实现等四个步骤。
本文重点围绕多时相点肺部模型的拼接构建开展了相关研究。
基于重采样的胸部CT图像肺实质自动分割

基于重采样的胸部CT图像肺实质自动分割司广磊;齐守良;岳勇;Han J.W.van Triest;康雁【摘要】Automatic lung parenchyma segmentation is one of the most important steps in the computer aided diagnosis (CAD) of the lung. To increase segmentation speed, an algorithm based on resampling of the image data is proposed and implemented. Methods The algorithm firstly resamples and extracts a small part (1/8 ) of the original CT images data. Several steps are implemented to get preliminary segmentation with the resampled data, which include simple threshold segmentation, body region elimination, trachea extraction, removal of interior cavities, left-right lung separation and lung nodule filling. The final results are obtained after projecting the preliminary segmentation to the original dataset and morphology smoothing. The proposed algorithm is applied to 20 patients' data (2556 slices) , and the results are compared to the manual segmentations. Results The algorithm can get accurate results with an average area overlapped ratio 99. 02% to the manual segmentation by the radiologist, and works well for the abnormal cases (right-leftrnconnected, with nodules and uncompleted views) . Through resampling, the time consumption of the algorithm is shortened significantly, typically by 50%, and the processing for one slice image is less than 0. 25 s. Conclusions The proposed automatic lung parenchyma segmentation algorithm with excellent robustness and high speed, can get accurate result and satisfy the requirements of current clinical applications.%目的胸部CT图像的肺实质自动分割是肺部疾病计算机辅助检测的重要基础.为提高分割速度,本文提出并实现了一种基于重采样的分割算法.方法首先对数据重采样,提取部分(1/8)体数据.再基于重采样体数据,通过阈值分割、胸腔提取、气管剔除、血管填充、左右肺分离和肺壁结节填充等步骤,得到初步分割结果.然后将该结果还原到完整数据体上,形态学平滑后即完成最终分割.最后将算法应用于20例患者数据(2556个断层),并与放射科医生手动分割结果进行比较.结果本文算法对20例患者数据均能取得优异结果,与放射科医生手动分割的平均面积重叠率达99.02%,且适用于左右肺相连、肺壁存在结节、视野不完整等异常情况.通过数据重采样极大缩短分割时间,一般可缩短50%,一帧图像平均耗时小于0.25s.结论本文算法能够实现胸部CT图像肺实质的自动分割,结果准确可靠,鲁棒性好,速度快,基本满足实际临床需求.【期刊名称】《北京生物医学工程》【年(卷),期】2012(031)004【总页数】7页(P349-355)【关键词】肺实质;重采样;CT图像;分割;计算机辅助诊断【作者】司广磊;齐守良;岳勇;Han J.W.van Triest;康雁【作者单位】东北大学中荷生物医学与信息工程学院,沈阳,110004;东北大学中荷生物医学与信息工程学院,沈阳,110004;中国医科大学盛京医院放射科,沈阳,110004;东北大学中荷生物医学与信息工程学院,沈阳,110004;东北大学中荷生物医学与信息工程学院,沈阳,110004【正文语种】中文【中图分类】TP301.6利用多排CT,一次屏气即可获得全肺连续(或重叠)的近似各向同性的高分辨率薄层图像。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Automatic lung segmentation from thoracic computed tomography scans using a hybrid approach with error detectionEva M. van Rikxoort, Bartjan de Hoop, Max A. Viergever, Mathias Prokop, and Bram van GinnekenCitation: Medical Physics 36, 2934 (2009); doi: 10.1118/1.3147146View online: /10.1118/1.3147146View Table of Contents: /content/aapm/journal/medphys/36/7?ver=pdfcovPublished by the American Association of Physicists in MedicineArticles you may be interested inComputerized segmentation of pulmonary nodules depicted in CT examinations using freehand sketches Med. Phys. 41, 041917 (2014); 10.1118/1.4869265Segmentation of lung lesions on CT scans using watershed, active contours, and Markov random fieldMed. Phys. 40, 043502 (2013); 10.1118/1.4793409Three-dimensional lung tumor segmentation from x-ray computed tomography using sparse field active models Med. Phys. 39, 851 (2012); 10.1118/1.3676687Investigation of lung nodule detectability in low-dose 320-slice computed tomographyMed. Phys. 36, 1700 (2009); 10.1118/1.3112363Computer-aided diagnosis of pulmonary nodules on CT scans: Segmentation and classification using 3D active contoursMed. Phys. 33, 2323 (2006); 10.1118/1.2207129Automatic lung segmentation from thoracic computed tomography scans using a hybrid approach with error detectionEva M.van Rikxoort a͒Image Sciences Institute,Heidelberglaan100,3584CX Utrecht,The NetherlandsBartjan de Hoop b͒Department of Radiology,University Medical Center Utrecht,Heidelberglaan100,3584CX Utrecht,The NetherlandsMax A.Viergever c͒Image Sciences Institute,Heidelberglaan100,3584CX Utrecht,The NetherlandsMathias Prokop d͒Department of Radiology,University Medical Center Utrecht,Heidelberglaan100,3584CX Utrecht,The NetherlandsBram van Ginneken e͒Image Sciences Institute,Heidelberglaan100,3584CX Utrecht,The Netherlands͑Received11December2008;accepted for publication15April2009;published9June2009͒Lung segmentation is a prerequisite for automated analysis of chest CT scans.Conventional lungsegmentation methods rely on large attenuation differences between lung parenchyma and sur-rounding tissue.These methods fail in scans where dense abnormalities are present,which oftenoccurs in clinical data.Some methods to handle these situations have been proposed,but they aretoo time consuming or too specialized to be used in clinical practice.In this article,a new hybridlung segmentation method is presented that automatically detects failures of a conventional algo-rithm and,when needed,resorts to a more complex algorithm,which is expected to produce betterresults in abnormal cases.In a large quantitative evaluation on a database of150scans fromdifferent sources,the hybrid method is shown to perform substantially better than a conventionalapproach at a relatively low increase in computational cost.©2009American Association ofPhysicists in Medicine.͓DOI:10.1118/1.3147146͔Key words:segmentation,lung,CT,error detection,automaticI.INTRODUCTIONThe advent of multidetector computed tomography͑CT͒scanners has made high-resolution,submillimeter isotropic CT imaging the modality of choice for analysis of the lungs. Computerized image analysis of thoracic CT data has be-come increasingly important over the last decades.For auto-matic image analysis,lung segmentation is usually an impor-tantfirst step.Accurate lung segmentation allows for the detection and quantification of abnormalities within the lungs.When lung segmentation fails to correctly define the borders of the lungs,findings might be missed orfindings outside the lungs might be included in the analysis.Accurate lung segmentation is,for example,important for quantifica-tion of emphysema and interstitial lung disease,lung volume estimation,and nodule detection and characterization.The importance of accurate lung segmentation for a CAD scheme was illustrated by Armato and Sensakovic.1They showed that a computer-aided detection system missed17% of all true nodules due to erroneous lung segmentations. When the lung segmentation paradigm was adapted to the specific task,this improved to only5%missed nodules. Heussel et al.2compared four commercially available pro-grams for quantitative analysis of emphysema.Their results showed that two of the programs were too time consuming to be used in clinical practice because of the necessity of ex-tensive manual correction of lung segmentation results͑59 and105min per scan on average͒.The other two programs required less manual corrections of lung segmentations but still required26and16min for processing a single scan, owing to manual interaction.A large amount of research has been devoted to the topic of lung segmentation in3D CT scans.As a consequence,a wide variety of methods performing automatic segmentation of the lungs is available.Most methods are based on the observation that,for normal lung parenchyma,there is a large difference in attenuation between the lung parenchyma and the surrounding tissue.These conventional methods per-form well on scans that do not contain dense abnormalities. However,in the case of dense pulmonary or subpleural ab-normalities,these areas are not included in the lung segmen-tation of these algorithms.This is illustrated in Fig.1.Other methods are specifically designed to handle such abnormali-ties,but are too slow or too specialized to be used in clinical practice.An open research area is to investigate the robust-ness of the various methods.In practice,there is a trade-off between required compu-tation time and quality of the segmentation results;the re-sults should be as precise as possible and available in as little time as possible.As a result,most available automatic chest CT analysis systems rely on conventional,threshold based,29342934 Med.Phys.36…7…,July20090094-2405/2009/36…7…/2934/14/$25.00©2009Am.Assoc.Phys.Med.segmentation since this is much less time consuming than, for example,a registration-based approach͑several minutes vs.several hours͒and produces good results in a large num-ber of scans.However,for scans containing͑substantial͒pathologic abnormalities,such an approach often results in segmentation errors and requires clinicians to manually edit the results.We address this trade-off with a hybrid method that combines a fast conventional approach and a more so-phisticated,computationally expensive approach.First,a fast conventional method is applied to each scan.The lung seg-mentations produced by the conventional method are auto-matically checked for errors.If there is a reasonable prob-ability that the segmentation result is not accurate,a multiatlas approach is applied.This takes substantially longer but performs better in abnormal cases.A key contri-bution of this paper is the automatic error detection.Instead of developing a single,compound method for each type of data,we develop a system to analyze the results of the seg-mentation,which can be used to decide to use a sophisticated method when simpler methods fail.We applied our hybrid lung segmentation to three data-bases of50scans each.The data originated from different sources,taken under different protocols and with varying types and extents of pathology.In these150scans,manual segmentations were performed to allow for quantitative evaluation of the lung segmentation results and of the error detection procedure proposed in this paper.I.A.Previous workNormal lungs appear as dark regions in CT data and there is a large difference in attenuation between the lung paren-chyma and the surrounding tissue.Most conventional meth-ods to segment the lungs make use of this difference by basing the core of the method on a thresholding approach. Examples of such methods can be found in Refs.1and3–7. Armato and Sensakovic1proposed a method that segments the lungs on each slice of the scan separately.First,several gray-level thresholds were applied to identify the lung re-gions in each slice and the lungs were separated at the ante-rior junction.Next,the trachea and the main bronchi were removed from the lung segmentation and holes in the seg-mentation results due to nodules or vessels were included in the segmentation result.The lung segmentation was applied to scans from two different sources;38scans containing an-notated lung nodules and22scans of patients with a me-sothelioma tumor.The results of the lung segmentation itself were not evaluated,only the effect of modifications to the lung segmentation on nodule detection and tumor thickness measurements.Leader et al.3proposed a similar2D technique as Armato and Sensakovic.1A threshold to identify the lung regions was determined slice by slice.The result was refined by separat-ing the lungs when connected,pruning airway regions in-cluded in the result,andfilling cavities in the segmentation result.The lung segmentation method was applied to91 thick slice͑5–10mm͒CT scans from50emphysema pa-tients and10thin slice͑2.5mm͒CT scans from a lung can-cer screening trial.As a reference standard,the results of a semiautomatic system were used.The results showed that for the thick and thin slice data,the average differences in lung volume between the reference segmentation and the auto-matic system were95and28ml,respectively.Two-dimensional methods are a logical choice when chest CT scans consist of thick slices.When isotropic data are available,it is advantageous to use3D processing to avoid inconsistencies between slices.Hu et al.4extracted the lung regions with an algorithm that operates mainly in3D.They first applied an optimal thresholding technique followed by a connected component analysis to separate the lungs from other nonbody voxels.Cavities inside the lungs werefilled and the trachea and main bronchi were removed from the result.Dynamic programming was applied to separate the left and right lungs on a per slice basis.Finally,the lung boundary was smoothed along the mediastinum.The method was applied to24CT scans of eight different patients, manual segmentations were made on everyfifth slice for12 of those scans.The results showed that the automatic lung segmentations closely resembled the manual segmentations, with the root mean square difference between the manual boundary and the automatically determined boundary aver-aging0.54mm.Sun et al.5presented a3D method in which the lungs were found by region growing based on three criteria:gray value,region homogeneity,and gradient magnitude.After the lungs were extracted,cavities inside the segmented volume werefilled using a morphological closing operation.To evaluate the method,it was applied to20CT images for which manual tracings of the lung border were available.The results showed that the average volume overlap between the manual delineations and the automatic result was88.5%.Brown et al.6,7used3D region growing and morphologi-cal operations that were integrated with expert anatomical knowledge in a higher-level set of semantics.In their ana-tomical model the chest wall,mediastinum,centraltracheo-F IG.1.Illustration of the performance of a conventional lung segmentationmethod based on gray-value thresholding.The top row shows two slicesfrom two different scans with normal lungs;first the original slice is shownfollowed by the lung segmentation result overlayed.The conventionalmethod produces a satisfactory segmentation of the lungs.The bottom rowshows two slices of two different scans containing pathologic abnormalities.Because of the higher densities of the abnormalities as compared to thedensity of normal lung parenchyma,the conventional method fails on thistype of scans.Medical Physics,Vol.36,No.7,July2009bronchial tree,and the left and right lung were modeled in terms of attenuation threshold,shape,contiguity,volume, and relative position.The low-level image processing rou-tines were guided by the information from the anatomical model.In Brown et al.7the lung segmentation was applied to 104CT scans of49patients.The results were visually judged by a radiologist,no quantitative analysis was performed.As illustrated in Fig.1,when high density abnormalities are present in the lungs,conventional methods tend to pro-duce errors.Pu et al.,8Prasad et al.,9and Sluimer et al.10 developed methods to handle such abnormalities.The method introduced by Pu et al.8was especially de-signed to include juxtapleural nodules in the lung segmenta-tion result.The image wasfirst smoothed,thresholded at −500HU,and nonlung regions wereflooded slice by slice. Next,the lung borders in each slice were tracked to define the inner lung border.This lung border was used to apply adaptive border marching on each slice to include nodules while minimizing oversegmentation of adjacent regions such as the abdomen and mediastinum.The method was applied to20CT scans containing juxtapleural nodules,all nodules in the scans were annotated by consensus reading.The re-sults show that adaptive border marching was able to include all juxtapleural nodules in the lung segmentation result.The typical diameter of all nodules was4.1mm,the size of the juxtapleural nodules was not specified.The method is un-likely to work on larger abnormalities,such as those shown in Fig.1.Prasad et al.9employed the curvature of the ribs in an adaptive thresholding technique to include lung regions that have increased attenuation.As afirst step,the ribs were seg-mented by thresholding and morphologic operations.Next, the lungs were found by varying a threshold until a lung boundary was found that was sufficiently close to the curva-ture of the ribs.The lung segmentation was applied to19 scans containing abnormalities due to asthma,scleroderma, and emphysema.The results were compared to a method in which the lungfields were found by thresholding.The method based on rib curvature performed significantly better than the threshold method by including abnormal regions bordering the ribs.However,by lowering the threshold,other nonlung regions not bordering the ribs are included into the segmentation result.In addition,the method depends on the success of the rib segmentation.Sluimer et al.10employed a segmentation by registration approach to segment scans containing substantial pathologic abnormalities.A probabilistic atlas was created by register-ing15scans to one reference scan and averaging the result. The segmentation of an abnormal test scan was initiated by elastically registering this probabilistic atlas to the scan and propagating the labels.The resulting segmentation was re-fined by a voxel classification on the border volume.For a set of ten abnormal scans,manual segmentations were per-formed on every fourth transversal slice,for the other slices the manual segmentation was interpolated and corrected by the observer.The registration based method outperformed a region growing method and an interactive region growing method,with overlap fractions with the manual segmentation result of0.82,0.39,and0.79,respectively.II.METHODSThis section describes the different steps of the hybrid lung segmentation method.The method consists of four steps which comprise three methods.As afirst step,the lungfields are segmented with an automatic3D algorithm,using con-ventional image processing techniques such as region grow-ing and morphological smoothing͑Sec.II A.͒This method is fast but likely to produce errors in some abnormal cases.To detect these errors,automatic error detection is applied͑Sec. II B͒.The scans that are likely to contain errors are then segmented by a more sophisticated algorithm,based on mul-tiatlas segmentation͑Sec.II C.͒This algorithm is likely to perform better for cases containing abnormal pathology but is considerably slower than the conventional algorithm.As a final step,the segmentation results of this algorithm are again checked by the automatic error detection method to determine whether manual interaction is required.Before ap-plying the automatic lung segmentation,all scans were sub-sampled to axial slices of256by256and to isotropic voxel sizes in axial direction to reduce required computation times. To obtain the results at the original image resolution,the results were supersampled.II.A.Conventional lung segmentationThe conventional lung segmentation method that is ap-plied as afirst step of the hybrid lung segmentation is com-parable to conventional lung segmentation as proposed by Sluimer et al.10and the algorithm of Hu et al.4The algorithm consists of the following steps:͑1͒Extraction of large air-ways;͑2͒Segmentation of lung regions;͑3͒Separation of the left and right lungs;͑4͒Smoothing.II.A.1.Extraction of large airwaysBefore the lungs are segmented,the trachea and the main parts of the bronchial tree are extracted using a region grow-ing technique.To initialize the region growing,a seed point is automatically identified on the top axial slices of the scan by searching for connected regions with the following prop-erties:an average HU below−950,a minimum size of 50mm2,a maximum size of1225mm2,mean x-and y-coordinates not further than30%of the x-and y-dimensions of the image away from the center of the slice. Starting at the top,thefirst25slices are examined for suit-able regions.When several regions are found in a slice,only the region closest to the center of the slice is kept.When all slices have been processed,the region that is closest to the center of its slice is selected.If no suitable region is detected in the top slices,the bottom slices of the scan are inspected to be able to handle cases that were scanned in a reverse direction.The seed point for the region growing process is the voxel with the lowest HU in the found region.From this seed point,the trachea and main stem bronchi are grownMedical Physics,Vol.36,No.7,July2009using explosion controlled region growing.11This approachworks as follows.First,region growing is applied from afixed threshold.Next,the process is iterated,slightly increas-ing the threshold in each iteration.The growing procedure isstopped when the size of the grown object is increased with ͑at least͒a factor of2compared to the size at the previous threshold.Such a volume increase indicates that the algo-rithm has grown into the lung parenchyma.When this oc-curs,the tree found by the previous threshold is retained andthe increase in threshold is lowered.The process is termi-nated when no increase in threshold is possible anymore,i.e.,increasing the threshold with1HU leads to an explosion.For the segmentation of the large airways,the initial thresh-old was set to−950HU.In each iteration,the threshold wasinitially increased with64HU.When an explosion occurred,the increase in threshold was divided by2.II.A.2.Segmentation of lung regionsAfter the trachea and main stem bronchi have been deter-mined,the lungs are segmented using region growing.As aseed point for the region growing,the voxel with the lowestHU within the airways is used.From this seed point,thelungs are grown.To determine the upper threshold for theregion growing operation,optimal thresholding12is applied.After the lung regions have been found,the trachea andbronchi are removed from the result.II.A.3.Separation of the left and right lungs Next,the lung region is separated into left and right lungs. When two connected components are found after removal of the trachea and main bronchi,the left and right lungs are identified by their center of gravity.However,in many cases, only one connected component is found because the pleura separating the left and right lung has a gray value included in the region growing.In these cases,the lungs are separated using a dynamic programming approach similar to the tech-nique described by Hu et al.4Dynamic programming using the HU of the original image as weights is applied to axial slices in which only one connected component is found.Due to the higher HU of the pleura as compared to that of the lung parenchyma,the maximum cost path corresponds to the pleura separating the lungs.The search area for the dynamic programming is determined in3D,starting from the center of gravity of the lung region.Let x cg be the x-coordinate of the center of gravity.The search area on axial slices is now de-fined as all pixels͑x,y͒for which x cg−5ഛxഛx cg+5.Pixels outside this range are not completely excluded from the dy-namic programming procedure,their weight is set to−1000 since it is unlikely that the pleura is located in this area.II.A.4.SmoothingAs afinal step of the lung segmentation method,each lung is smoothed separately.First3D holefilling is applied to include vessels and other high-density structures that were excluded by the threshold used in region growing,in the segmentation.Next,morphological closing with a spherical kernel is applied.The diameter of the kernel is set to2%of the x-dimension of the image.II.B.Automatic error detectionThe goal of the automatic error detection step is to iden-tify scans for which the lung segmentation method may have failed.The automatic error detection consists of two compo-nents:comparison with a set of statistics of correct lung seg-mentations and a shape consistency check.To develop the error detection method,335scans from various sources were used that were not among the test data in this paper.For320of those scans,the conventional ap-proach yielded correct lung segmentations͑visually con-firmed͒.Those320scans were used to determine statistics of correct lung segmentations.The other15scans contained erroneous lung segmentations which were used to experi-ment with measures to detect those errors.Based on experi-ments using these data,four factors were defined to be im-portant as indicators for success of a segmentation:•V olume of the left lung;•V olume of the right lung;•Ratio between the volumes of the left and right lung;•Shape consistency of the lung border.For thefirst three components,the volumes of the lungs in the320scans were determined.Based on these values,the minimum and maximum lung volumes and the ratio between the lung volumes that are considered correct were set to the minimum and maximum values observed in the training data.Errors in lung segmentation often occur at the borders of the lungs,when the contrast between the lung parenchyma and the surrounding tissue is low due to pathologic abnor-malities that show up as dense regions.In normal lung anatomy,the shape of the costal lung surface is convex. When an error occurs at the costal border,the surface is typically not convex anymore.Examples of normal and er-roneous lung segmentations are shown in the second column of Fig.2.Based on this observation,a shape check was de-veloped that tests the convexity of the costal surface in axial slices for each lung separately.The shape check starts by defining the costal surface of the lungs.For this purpose,the cumulative positions inside the lung segmentation are employed.The cumulative posi-tion͑x˘,y˘,z˘͒of a point͑x,y,z͒inside a lung is defined as follows:x˘͑x͒=1V͵0Z͵Y͵0x I͑xЈ,yЈ,zЈ͒dxЈdyЈdzЈ,y˘͑y͒=1V͵0Z͵y͵0X I͑xЈ,yЈ,zЈ͒dxЈdyЈdzЈ,Medical Physics,Vol.36,No.7,July2009z˘͑z ͒=1V͵0z͵0Y ͵XI ͑x Ј,y Ј,z Ј͒dx Јdy Јdz Ј,͑1͒where V is the total number of voxels in the lung,I is the binary lung image which is 1inside the lung and 0else-where,and X ,Y ,and Z are the dimensions of the e of the cumulative position maps locations inside the object to a standardized coordinate system running from 0to 1,such that voxels that are at similar spatial locations inside the object in different scans will get approximately the same coordinates.The cumulative x -position inside a lung is illus-trated in the third column of Fig.2.The costal surface in axial slices for the left lung is now defined as those voxelsinside the left lung segmentation for which x˘Ͼ0.2,and for the right lung as those voxels in the segmentation of the rightlung for which x˘Ͻ0.8.The effect of these settings is to leave out the mediastinal region of the lungs for which the convex-ity constraint does not hold.This is illustrated in the fourth column of Fig.2.The convexity is now determined by comparing the costal lung surface in axial slices to the convex hull of this costal lung surface.Examples of the convex hull are shown in the fifth column of Fig.2.When the difference image between the costal part of the lung and the convex hull is empty,this indicates that the costal lung surface is convex.However,this difference image often contains some small responses at the border ͑examples are shown in the sixth column of Fig.2͒.To remove those responses from the result,a morphologi-cal erosion with a spherical kernel of size 7voxels is applied.Areas remaining in the difference image after the erosion operation likely indicate errors in the segmentation.Ex-amples of this are shown in the last column of Fig.2.Since a segmentation error is likely to occur in a larger volume than one axial slice,a scan is marked as probably erroneous if the difference between the convex hull and the lung seg-mentation occurs in at least three consecutive slices.The four components of the error detection are combined using a boolean OR operation;if a lung segmentation fails on one of the four tests it is marked as possibly erroneous.II.C.Multiatlas lung segmentationThe proposed multiatlas segmentation method follows the general scheme of multiatlas segmentation as,for example,described in Rohlfing et al.13and Heckemann et al.14In mul-tiatlas segmentation,a set of training images ͑atlases ͒is reg-istered to the image to be segmented.To obtain a segmenta-tion of the target image,the manual labelings of the training images are transformed to the target image using the map-ping determined during registration ͑label propagation ͒.Af-ter this process,for each voxel a set of labels is available that are combined by decision fusion to decide on a label for the specific voxel.Formally,a set of n training images A i ,i =1,...,n with corresponding manually segmented ͑binary ͒images S i is available.All n training images are registered to a test image T ,resulting in n transformations u i from A i to T .u i is used to transform S i to T .We write the transformed image as u i ͑S i ͒.As a result,for each voxel in T ,n opinions exist about its label.The labels are combined by averaging all opinions for each voxel.After n registered training images,S is defined as S =1n ͚i =1nu i ͑S i ͒.͑2͒To obtain a binary segmentation S is thresholded at 0.5.After averaging the labels,each lung is smoothed sepa-rately using the same smoothing as described for the conven-tional lung segmentation.Morphological closing with a spherical kernel with a diameter of 2%of the x -dimension of the image is applied.II.C.1.RegistrationIn registration,an atlas image is transformed to the target image.In this paper,ELASTIX ͑ELASTIX can be downloaded from http://elastix.isi.uu.nl ͒version 3.9was used for regis-tration.This framework formulates the registration problem as an optimization problem in which the similarity between the target and atlas image is maximized.The framework is largely based on techniques described in Thévenaz et al.,15Rueckert et al.,16and Mattes et al.17Many parameters in the algorithm can be chosen.For the cost function the negative mutual information was used,which is implemented inELASTIX according to Thévenaz et al.15First,images were roughly aligned with an affine transformation.After that,a nonrigid registration modeled by B-splines was performed.For the optimization of the cost function,an iterative sto-chastic gradient descent optimizer 18was used.In each itera-tion a step toward the minimum is taken,and this directionisF IG .2.Illustration of the shape check of the error detection procedure for three slices from three different scans.The first row shows a correct seg-mentation of a left lung.The second and third rows show erroneous lung segmentations of a left and right lungs,respectively.The errors in the lung segmentations are indicated by arrows.The first column shows the original slice;in the second column the result of the automatic lung segmentation method is shown.The third column shows the cumulative x -positions inside the lung.The third column presents the costal surface of the lung that is taken into consideration.In the fourth column the convex hull is shown;the fifth column shows the difference image between the convex hull and the lung segmentation.Finally,the last column shows the difference between the lung segmentation and the convex hull at the costal surface of the lung after removal of small responses.This difference image is empty for the correct lung segmentation ͑first row ͒but not for the incorrect lung segmentations.Medical Physics,Vol.36,No.7,July 2009。