示例#1
0
文件: main0.py 项目: yf817/MPhys
def main(argv=None):
    # read_dicom(".\\Patients\\HN-CHUM-001\\08-27-1885-TomoTherapy Patient Disease-00441\\1-REGCTsim-CTPET-CT-43961\\000000.dcm")
    # ImageReg.load_series(".\\Patients\\HN-CHUM-001\\08-27-1885-TomoTherapy Patient Disease-00441\\112161818-kVCT Image Set-62659\\", "pct_series")
    # ImageReg.load_series(".\\Patients\\HN-CHUM-001\\08-27-1885-PANC. avec C.A. SPHRE ORL   tte et cou  -TP-74220\\3-StandardFull-07232\\", "petct_series")
    fixed = ImageReg.image_info("pct_series.mha")
    moving = ImageReg.image_info("petct_series.mha")
    dvf = sitk.ReadImage("dvf.mhd")
    vis = ImageReg.resample_image(fixed, moving, dvf)
    print(type(vis))
    ImageReg.myshow(vis, fixed)
    print("Done Loading Patient Info")
示例#2
0
def main(argv=None):
    # read_dicom(".\\Patients\\HN-CHUM-001\\08-27-1885-TomoTherapy Patient Disease-00441\\1-REGCTsim-CTPET-CT-43961\\000000.dcm")
    # ImageReg.load_series(
    #     ".\\Patients\\HN-CHUM-001\\08-27-1885-TomoTherapy Patient Disease-00441\\112161818-kVCT Image Set-62659\\", "pct_series")
    # ImageReg.load_series(
    #     ".\\Patients\\HN-CHUM-001\\08-27-1885-PANC. avec C.A. SPHRE ORL   tte et cou  -TP-74220\\3-StandardFull-07232\\", "petct_series")
    fixed = ImageReg.image_info("pct_series.mha")
    moving = ImageReg.image_info("petct_series.mha")
    dvf = sitk.ReadImage("dvf.mhd", sitk.sitkVectorFloat64)
    small_dvf = ImageReg.resize_image(dvf, fixed)
    small_moving = ImageReg.resize_image(moving, fixed)
    transform_img = ImageReg.resample_image(small_moving, fixed, small_dvf)
    ImageReg.myshow(transform_img)
    print("Done Loading Patient Info")
示例#3
0
文件: main.py 项目: yf817/MPhys
def main(argv=None):

    # read_dicom(".\\Patients\\HN-CHUM-001\\08-27-1885-PANC. avec C.A. SPHRE ORL   tte et cou  -TP-74220\\3-StandardFull-07232\\000000.dcm")
    # ImageReg.load_series(
    #     ".\\Patients\\HN-CHUM-001\\08-27-1885-TomoTherapy Patient Disease-00441\\112161818-kVCT Image Set-62659\\", "pct_series")
    # ImageReg.load_series(
    #     ".\\Patients\\HN-CHUM-001\\08-27-1885-PANC. avec C.A. SPHRE ORL   tte et cou  -TP-74220\\3-StandardFull-07232\\", "test_series")
    fixed = ImageReg.image_info("pct_series.mha")
    moving = ImageReg.image_info("petct_series.mha")
    dvf = sitk.ReadImage("dvf.mhd", sitk.sitkVectorFloat64)
    # small_dvf = ImageReg.resize_image(dvf, fixed)
    # small_moving = ImageReg.resize_image(movsng, fixed)
    pre_def, post_def = ImageReg.get_rigid_transforms(dvf_path)
    transform = ImageReg.define_transform(pre_def, post_def, dvf)
    transform_img = ImageReg.resample_image(moving, fixed, transform)
    ImageReg.myshow(transform_img)
    print("Done Loading Patient Info")
示例#4
0
文件: loadSlicer.py 项目: yf817/MPhys
def show_image(image_array):
    data = np.asarray(image_array).astype(np.float64)
    image = sitk.GetImageFromArray(data)
    ImageReg.myshow(image)
    sitk.WriteImage(image, "imagetest.mha")
示例#5
0
def main(argv=None):
    slice_array(planning_path, start, end)
    slice_image = sitk.ReadImage("sliced_pct.mha")
    ImageReg.myshow(slice_image)