【醫學圖像處理】提取勾畫


dicom文件處理

  • 提取ct文件 / mr文件 / dose文件 / rt structure 文件

  • 提取指定ROI勾畫和對應的CT或MR圖像,重采樣到指定大小,存為.nii文件

code on github

from ifree import dicom

# get paths for CT, MR, DOSE and RT
fileDir = "./p/"
ctfiles, rtfile, mrfiles, dosefile, patientID = dicom.GetFilePath(fileDir)

# get MRs or CTs related to RT and copy them to new dir
patientNames, patientIDs, id2mrs, id2rt = archiveFiles(old_Dir, new_Dir)

# crop ROI-MASK and its CT or MR
roiName = "ctv"
newDir = "./p/"
newSize = [100, 100, 100] # leave None to get origin size
cropROI(id2mrs, id2rt, roiName, newSize, newDir)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM