首页 > 编程知识 正文

ct一般什么时候加骨窗,窗位和窗宽的计算

时间:2023-05-04 22:45:53 阅读:27355 作者:2405

##SimpleITK CT影像窗宽窗位彪强手机

--- coding : utf-8---- importsimpleitkassitkimportosimportnumpyasnpdefwindow _ transform (CT _ array,window widtwind ) normal=false (: ' ' return : trucatedimageaccordingtowindowcenterandwindowwwidthandnormalizedto [ 0, 1 ] ' ' min window=float (窗口中心)-0.5*float (窗口宽度) newimg=(CT_Array-minwindow )/float (窗口宽度) 255 ).astype('float32 ' ) returnnewimgprint('-'*100 ) image=sitk.readimage sitk.sitk float 32 ) array=sitk.ggprint 400,100,true (new _ image=sitk.getimagefromarray (new _ image ) new_image.setdirection ) image.getdirection

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。