コード例 #1
0
                theta_idx - 1) * D_HEIGHT + z_idx
    return region_number


if __name__ == "__main__":
    stl_base = "G:\\My Drive\\Project\\HW-9232 Registration method for edentulous" \
               "\\Edentulous registration error analysis\\Typodont_scan\\Edentulous_scan\\"
    all_regions = []
    file = stl_base + 'full_arch.txt'
    if os.path.isfile(file):
        print('read txt')
        full_region = Yomiread.read_csv(file, 3, -1)
    else:
        stl_file = 'full_arch.stl'
        print('read stl')
        full_region = region_points.read_regions(stl_base + stl_file,
                                                 voxel_size=0.05)
        Yomiwrite.write_csv_matrix(stl_base + 'full_arch.txt', full_region)

    base = "G:\\My Drive\\Project\\HW-9232 Registration method for edentulous" \
           "\\Edentulous registration error analysis\\Stage2_more_regions\\"
    target_measurement_file = "targets.txt"
    points = Yomiread.read_csv(base + target_measurement_file, 4, 10, flag=1)
    targets_original = points[0:4, 1:4]

    arch1 = edentulous_arch.Edentulous_arch(full_region, targets_original)
    print('angle range is', arch1.target_angle_range)
    print('target position is',
          arch1.target_origins_cylindrical[:, 1] * 180 / np.pi)

    # Set up simulation conditions
    D_ANGLE = 3
コード例 #2
0
    BIAS_ERROR_FLAG = 0
    ORIENTATION = 1

    stl_base = "G:\\My Drive\\Project\\HW-9232 Registration method for edentulous\\Edentulous registration error analysis\\Typodont_scan\\Edentulous_scan\\"
    all_regions = []

    for i in range(5):
        file = stl_base + 'region_points_' + np.str(i+1) + '.txt'
        if os.path.isfile(file):
            print('read txt')
            individual_region = Yomiread.read_csv(file,3,-1)
        else:
            stl_file = 'Fiducial_region_' + np.str(i+1) + '.stl'
            print('read stl')
            individual_region = region_points.read_regions(stl_base + stl_file, voxel_size = 2.0)
            Yomiwrite.write_csv_matrix(stl_base + 'region_points_' + np.str(i + 1) + '.txt', individual_region)
        all_regions.append(individual_region)

    for i in range(len(all_regions)):
        value_95 = []
        fiducials_new = np.copy(fiducials_original)
        mm = 0
        for point in all_regions[i]:
            print('checking point ', mm + 1)
            fiducials_new[i,:] = point
            #print('fiducials are ', fiducials_new)
            value_95_tem = check_tre(targets_original, fiducials_new)
            value_95.append(value_95_tem)
            if np.ndim(targets_original) == 1:
                if (value_95_tem < THRESHOLD_0):