Beispiel #1
0
    #arch_ct_in_ios_fxt = fe.Fixture(MISSING_TOOTH_NUMBER, 'CT', 'IOS')

    # arch after curvilinear correction - original ios arch
    arch_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'IOS', 'IOS')
    #arch_ios_fxt_curvilinear_correction = fe.Fixture(MISSING_TOOTH_NUMBER, 'IOS', 'IOS')

    # arch after curvilinear correction - virtual ct features
    arch_ct_in_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'CT', 'IOS')
    #arch_ct_in_ios_fxt_curvilinear_correction = fe.Fixture(MISSING_TOOTH_NUMBER, 'CT', 'IOS')

    # Read CT and IOS full arch scan
    for i in TOOTH_NUMBER:
        print('reading CT tooth', i)
        new_dicom_path = target_dicom_base + dicom_file_name + np.str(i) + '.csv'
        dicom_tem = Yomiread.read_csv(new_dicom_path, 3, -1)
        tooth_dicom_tem = fe.ToothFeature(dicom_tem, i, 'CT', 'CT')
        arch_ct.add_tooth(i, tooth_dicom_tem)
        #arch_ct_original.add_tooth(i, tooth_dicom_tem)

        print('reading IOS tooth', i)
        if i in MISSING_TOOTH_NUMBER:
            print('Tooth '+np.str(i) + ' is covered by splint')
            if i in TARGET_TOOTH:
                print('Tooth ' + np.str(i) + ' is covered by target')
        else:
            new_stl_path = source_stl_base + stl_file_name + np.str(i) + '.csv'
            stl_tem = Yomiread.read_csv(new_stl_path, 3, -1)
            tooth_stl_tem = fe.ToothFeature(stl_tem, i, 'IOS', 'IOS')
            arch_ios.add_tooth(i, tooth_stl_tem)
        if 'stl_tem' in locals():
            del stl_tem
Beispiel #2
0
    # generate virtual landmarks using ct features with local ICP
    arch_ct_in_ios = fe.FullArch(MISSING_TOOTH_NUMBER, 'CT', 'IOS')
    # arch after curvilinear correction - original ios arch
    arch_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'IOS', 'IOS')
    # arch after curvilinear correction - virtual ct features
    arch_ct_in_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'CT', 'IOS')

    for i in TOOTH_NUMBER:
        print('reading tooth ', i)
        new_dicom_path = target_dicom_base + dicom_file_name + np.str(i) + '.csv'
        new_stl_path = source_stl_base + stl_file_name + np.str(i) + '.csv'

        stl_tem = Yomiread.read_csv(new_stl_path, 3, -1)
        dicom_tem = Yomiread.read_csv(new_dicom_path, 3, -1)

        tooth_stl_tem = fe.ToothFeature(stl_tem, i, 'IOS', 'IOS')
        arch_ios.add_tooth(i, tooth_stl_tem)

        tooth_dicom_tem = fe.ToothFeature(dicom_tem, i, 'CT', 'CT')
        arch_ct.add_tooth(i, tooth_dicom_tem)
        del stl_tem, dicom_tem

    # ---- Perform Local ICP
    local_ICP.do_local_registration(TRANS_INIT,THRESHOLD_ICP,RMS_LOCAL_REGISTRATION, arch_ios, arch_ct)
    # check local registration quality (rms of local ICP of each tooth)
    for i in arch_ios.tooth_list: # used for algorithm verification (count missing tooth as well)
    #for i in arch_ios.existing_tooth_list: # used for real 3 images processing
        print('tooth ' + np.str(i) + ' ICP rms is ' + np.str(arch_ios.get_tooth(i).ICP.inlier_rmse))

    # Update spline points
    arch_ios.update_spline()
    # arch after curvilinear correction - original ios arch
    arch_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'IOS', 'IOS')

    # arch after curvilinear correction - virtual ct features
    arch_ct_in_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'CT', 'IOS')

    # Read CT and IOS full arch scan
    for i in TOOTH_NUMBER:
        print('reading CT tooth', i)
        if i in MISSING_TOOTH_NUMBER:
            print('missing tooth', i)
        else:
            new_dicom_path = target_dicom_base + dicom_file_name + np.str(i) + '.csv'
            dicom_tem = Yomiread.read_csv(new_dicom_path, 3, -1)
            tooth_dicom_tem = fe.ToothFeature(dicom_tem, i, 'CT', 'CT')
            arch_ct.add_tooth(i, tooth_dicom_tem)

        print('reading IOS tooth', i)
        if i in MISSING_TOOTH_NUMBER:
            print('Tooth '+np.str(i) + ' is covered by splint')
            if i in TARGET_TOOTH:
                print('Tooth ' + np.str(i) + ' is covered by target')
        else:
            new_stl_path = source_stl_base + stl_file_name + np.str(i) + '.csv'
            stl_tem = Yomiread.read_csv(new_stl_path, 3, -1)
            tooth_stl_tem = fe.ToothFeature(stl_tem, i, 'IOS', 'IOS')
            arch_ios.add_tooth(i, tooth_stl_tem)
        if 'stl_tem' in locals():
            del stl_tem
        if 'dicom_tem' in locals():
Beispiel #4
0
    # arch after curvilinear correction - original ios arch
    arch_ios_curvilinear_correction = fe.FullArch(MISSING_TOOTH_NUMBER, 'IOS',
                                                  'IOS')

    # arch after curvilinear correction - virtual ct features
    arch_ct_in_ios_curvilinear_correction = fe.FullArch(
        MISSING_TOOTH_NUMBER, 'CT', 'IOS')

    # Read CT and IOS full arch scan
    for i in TOOTH_NUMBER:
        print('reading CT tooth', i)
        new_dicom_path = target_dicom_base + dicom_file_name + np.str(
            i) + '.csv'
        dicom_tem = Yomiread.read_csv(new_dicom_path, 3, -1)
        tooth_dicom_tem = fe.ToothFeature(dicom_tem, i, 'CT', 'CT')
        arch_ct.add_tooth(i, tooth_dicom_tem)

        print('reading IOS tooth', i)
        if i in MISSING_TOOTH_NUMBER:
            print('Tooth ' + np.str(i) + ' is covered by splint')
            if i in TARGET_TOOTH:
                print('Tooth ' + np.str(i) + ' is covered by target')
        else:
            new_stl_path = source_stl_base + stl_file_name + np.str(i) + '.csv'
            stl_tem = Yomiread.read_csv(new_stl_path, 3, -1)
            tooth_stl_tem = fe.ToothFeature(stl_tem, i, 'IOS', 'IOS')
            arch_ios.add_tooth(i, tooth_stl_tem)
        if 'stl_tem' in locals():
            del stl_tem
        if 'dicom_tem' in locals():
Beispiel #5
0
    # arch after curvilinear correction - virtual ct features
    arch_ct_in_ios_curvilinear_correction = fe.FullArch(
        MISSING_TOOTH_NUMBER, 'CT', 'IOS')
    arch_ct_in_ios_fxt_curvilinear_correction = fe.Fixture(
        MISSING_TOOTH_NUMBER, 'CT', 'IOS')

    for i in TOOTH_NUMBER:
        print('reading tooth ', i)
        new_dicom_path = target_dicom_base + dicom_file_name + np.str(
            i) + '.csv'
        new_stl_path = source_stl_base + stl_file_name + np.str(i) + '.csv'

        stl_tem = Yomiread.read_csv(new_stl_path, 3, -1)
        dicom_tem = Yomiread.read_csv(new_dicom_path, 3, -1)

        tooth_stl_tem = fe.ToothFeature(stl_tem, i, 'IOS', 'IOS')
        arch_ios.add_tooth(i, tooth_stl_tem)

        tooth_dicom_tem = fe.ToothFeature(dicom_tem, i, 'CT', 'CT')
        arch_ct.add_tooth(i, tooth_dicom_tem)
        arch_ct_original.add_tooth(i, tooth_dicom_tem)
        del stl_tem, dicom_tem

    # ---- Perform Local ICP
    local_ICP.do_local_registration(TRANS_INIT, THRESHOLD_ICP,
                                    RMS_LOCAL_REGISTRATION, arch_ios, arch_ct)
    # check local registration quality (rms of local ICP of each tooth)
    for i in arch_ios.tooth_list:  # used for algorithm verification (count missing tooth as well)
        # for i in arch_ios.existing_tooth_list: # used for real 3 images processing
        print('tooth ' + np.str(i) + ' ICP rms is ' +
              np.str(arch_ios.get_tooth(i).ICP.inlier_rmse))