def data_prep_function(data, patch_centers, pixel_spacing, p_transform,
                       p_transform_augment, **kwargs):
    x = data_transforms.transform_dsb_candidates(data=data,
                                                 patch_centers=patch_centers,
                                                 p_transform=p_transform,
                                                 p_transform_augment=p_transform_augment,
                                                 pixel_spacing=pixel_spacing)
    x = data_transforms.pixelnormHU(x)
    return x
Esempio n. 2
0
def data_prep_function(data, patch_centers, pixel_spacing, p_transform,
                       p_transform_augment, **kwargs):
    x = data_transforms.transform_dsb_candidates(data=data,
                                                 patch_centers=patch_centers,
                                                 p_transform=p_transform,
                                                 p_transform_augment=p_transform_augment,
                                                 pixel_spacing=pixel_spacing)
    x = data_transforms.pixelnormHU(x)
    return x
Esempio n. 3
0
def data_prep_function(data, pixel_spacing, p_transform=p_transform):
    # TODO: MAKE SURE THAT DATA IS PREPROCESSED THE SAME WAY
    lung_mask = lung_segmentation.segment_HU_scan_elias(data)
    x, tf_matrix, lung_mask_out = data_transforms.transform_scan3d(data=data,
                                                                   pixel_spacing=pixel_spacing,
                                                                   p_transform=p_transform,
                                                                   lung_mask=lung_mask,
                                                                   p_transform_augment=None)
    x = data_transforms.pixelnormHU(x)
    return x, lung_mask_out, tf_matrix
Esempio n. 4
0
def data_prep_function(data, pixel_spacing, p_transform=p_transform):
    # TODO: MAKE SURE THAT DATA IS PREPROCESSED THE SAME WAY
    lung_mask = lung_segmentation.segment_HU_scan(data)
    x, tf_matrix, lung_mask_out = data_transforms.transform_scan3d(
        data=data,
        pixel_spacing=pixel_spacing,
        p_transform=p_transform,
        lung_mask=lung_mask,
        p_transform_augment=None)
    x = data_transforms.pixelnormHU(x)
    return x, lung_mask_out, tf_matrix
Esempio n. 5
0
def data_prep_function(data, patch_center, luna_annotations, pixel_spacing, luna_origin, p_transform,
                       p_transform_augment, **kwargs):
    x, patch_annotation_tf, annotations_tf = data_transforms.transform_patch3d(data=data,
                                                                               luna_annotations=luna_annotations,
                                                                               patch_center=patch_center,
                                                                               p_transform=p_transform,
                                                                               p_transform_augment=p_transform_augment,
                                                                               pixel_spacing=pixel_spacing,
                                                                               luna_origin=luna_origin)
    x = data_transforms.pixelnormHU(x)
    y = data_transforms.make_3d_mask_from_annotations(img_shape=x.shape, annotations=annotations_tf, shape='sphere')
    return x, y
Esempio n. 6
0
def data_prep_function(data, patch_center, pixel_spacing, luna_origin, p_transform,
                       p_transform_augment, world_coord_system, **kwargs):
    x, patch_annotation_tf = data_transforms.transform_patch3d(data=data,
                                                               luna_annotations=None,
                                                               patch_center=patch_center,
                                                               p_transform=p_transform,
                                                               p_transform_augment=p_transform_augment,
                                                               pixel_spacing=pixel_spacing,
                                                               luna_origin=luna_origin,
                                                               world_coord_system=world_coord_system)
    x = data_transforms.pixelnormHU(x)
    return x
Esempio n. 7
0
def data_prep_function(data, pixel_spacing, p_transform=p_transform):
    # TODO: MAKE SURE THAT DATA IS PREPROCESSED THE SAME WAY
    #lung_mask = lung_segmentation.segment_HU_scan(data)
    x, tf_matrix = data_transforms.transform_scan3d(data=data,
                                                                   pixel_spacing=pixel_spacing,
                                                                   p_transform=p_transform_data_in,
                                                                   lung_mask=None,
                                                                   p_transform_augment=None)
    print('x.shape', x.shape)
    x = data_transforms.pixelnormHU(x)
    print('x.shape', x.shape)
    return x, tf_matrix
Esempio n. 8
0
def data_prep_function(data, patch_center, luna_annotations, pixel_spacing, luna_origin, p_transform,
                       p_transform_augment, **kwargs):
    x, patch_annotation_tf, annotations_tf = data_transforms.transform_patch3d(data=data,
                                                                               luna_annotations=luna_annotations,
                                                                               patch_center=patch_center,
                                                                               p_transform=p_transform,
                                                                               p_transform_augment=p_transform_augment,
                                                                               pixel_spacing=pixel_spacing,
                                                                               luna_origin=luna_origin)
    x = data_transforms.pixelnormHU(x)
    y = data_transforms.make_3d_mask_from_annotations(img_shape=x.shape, annotations=annotations_tf, shape='sphere')
    return x, y
Esempio n. 9
0
def data_prep_function(data, pixel_spacing, p_transform=p_transform):
    # TODO: MAKE SURE THAT DATA IS PREPROCESSED THE SAME WAY
    #lung_mask = lung_segmentation.segment_HU_scan(data)
    x, tf_matrix = data_transforms.transform_scan3d(data=data,
                                                                   pixel_spacing=pixel_spacing,
                                                                   p_transform=p_transform_data_in,
                                                                   lung_mask=None,
                                                                   p_transform_augment=None)
    print 'x.shape', x.shape
    x = data_transforms.pixelnormHU(x)
    print 'x.shape', x.shape
    return x, tf_matrix
Esempio n. 10
0
def data_prep_function(data, luna_annotations, pixel_spacing, luna_origin,
                       p_transform=p_transform,
                       p_transform_augment=None):
    # make sure the data is processed the same way 
    x, annotations_tf, tf_matrix = data_transforms.transform_scan3d(data=data,
                                                                    pixel_spacing=pixel_spacing,
                                                                    p_transform=p_transform,
                                                                    luna_annotations=luna_annotations,
                                                                    p_transform_augment=None,
                                                                    luna_origin=luna_origin)
    x = data_transforms.pixelnormHU(x)
    y = data_transforms.make_3d_mask_from_annotations(img_shape=x.shape, annotations=annotations_tf, shape='sphere')
    return x, y, annotations_tf, tf_matrix
Esempio n. 11
0
def data_prep_function(data, luna_annotations, pixel_spacing, luna_origin,
                       p_transform=p_transform,
                       p_transform_augment=None):
    # make sure the data is processed the same way 
    x, annotations_tf, tf_matrix = data_transforms.transform_scan3d(data=data,
                                                                    pixel_spacing=pixel_spacing,
                                                                    p_transform=p_transform,
                                                                    luna_annotations=luna_annotations,
                                                                    p_transform_augment=None,
                                                                    luna_origin=luna_origin)
    x = data_transforms.pixelnormHU(x)
    y = data_transforms.make_3d_mask_from_annotations(img_shape=x.shape, annotations=annotations_tf, shape='sphere')
    return x, y, annotations_tf, tf_matrix
Esempio n. 12
0
def data_prep_function(data, patch_center, pixel_spacing, luna_origin,
                       p_transform, p_transform_augment, world_coord_system,
                       **kwargs):
    x, patch_annotation_tf = data_transforms.transform_patch3d(
        data=data,
        luna_annotations=None,
        patch_center=patch_center,
        p_transform=p_transform,
        p_transform_augment=p_transform_augment,
        pixel_spacing=pixel_spacing,
        luna_origin=luna_origin,
        world_coord_system=world_coord_system)
    x = data_transforms.pixelnormHU(x)
    return x