lama/segmentation_plugins/secondary_seg_lateral_ventricle.py
def run(image_to_segment: Path,
        initial_segmentation: Path) -> np.ndarray:
    """
    Lama segmetnation plugin module has to implement a run function.
    It currently work well for the lateral ventricles in in E15.5 micro-CT images, but currently only for the main label
    region in each lateral centricle

    Parameters
    ----------
    image_to_segment
    initial_segmentation

    Returns
    -------

    """
    # Do right lateral ventricle first
    r_ventricle_label = 26
    r_surrounding_labels = [39, 29, 35]  # ventricular zone, thalamus, neopallial cortex and amygdala
    r_seg = segment_lateral_ventricles(image_to_segment, initial_segmentation, r_surrounding_labels, r_ventricle_label)

    # And the left
    l_ventricle_label = 25
    l_surrounding_labels = [40, 30, 36]
    l_seg = segment_lateral_ventricles(image_to_segment, initial_segmentation, l_surrounding_labels, l_ventricle_label)

    # merge the two segmentations
    seg = r_seg
    seg[l_seg == l_ventricle_label] = l_ventricle_label

    return seg

    Lama segmetnation plugin module has to implement a run function.
    It currently work well for the lateral ventricles in in E15.5 micro-CT images, but currently only for the main label
    region in each lateral centricle

    Parameters
    ----------
    image_to_segment
    initial_segmentation

    Returns
    -------

    
Lama segmetnation plugin module has to implement a run function.
It currently work well for the lateral ventricles in in E15.5 micro-CT images, but currently only for the main label
region in each lateral centricle

Parameters



Returns
Lama segmetnation plugin module has to implement a run function . It currently work well for the lateral ventricles in in E15 . 5 micro - CT images but currently only for the main label region in each lateral centricle Parameters Returns
def run(image_to_segment: Path,
        initial_segmentation: Path) -> np.ndarray:
    r_ventricle_label = 26
    r_surrounding_labels = [39, 29, 35]  
    r_seg = segment_lateral_ventricles(image_to_segment, initial_segmentation, r_surrounding_labels, r_ventricle_label)
    l_ventricle_label = 25
    l_surrounding_labels = [40, 30, 36]
    l_seg = segment_lateral_ventricles(image_to_segment, initial_segmentation, l_surrounding_labels, l_ventricle_label)
    seg = r_seg
    seg[l_seg == l_ventricle_label] = l_ventricle_label
    return seg
def run ( image_to_segment : Path , initial_segmentation : Path ) -> np . ndarray : r_ventricle_label = 26 r_surrounding_labels = [ 39 , 29 , 35 ] r_seg = segment_lateral_ventricles ( image_to_segment , initial_segmentation , r_surrounding_labels , r_ventricle_label ) l_ventricle_label = 25 l_surrounding_labels = [ 40 , 30 , 36 ] l_seg = segment_lateral_ventricles ( image_to_segment , initial_segmentation , l_surrounding_labels , l_ventricle_label ) seg = r_seg seg [ l_seg == l_ventricle_label ] = l_ventricle_label return seg
Lama segmetnation plugin module has to implement a run function.
Lama segmetnation plugin module has to implement a run function .
"""
    Lama segmetnation plugin module has to implement a run function.
    It currently work well for the lateral ventricles in in E15.5 micro-CT images, but currently only for the main label
    region in each lateral centricle

    Parameters
    ----------
    image_to_segment
    initial_segmentation

    Returns
    -------

    """ # Do right lateral ventricle first # ventricular zone, thalamus, neopallial cortex and amygdala # And the left # merge the two segmentations
image_to_segment
Path
initial_segmentation
Path