lama/staging/staging_metric_maker.py
def whole_volume_staging(propagated_mask_dir: Path, outdir: Path):
    """
    Generate a csv of whole embryo volumes.

    Parameters
    ----------
    propagated_mask_dir:  masks that have been inverted back to rigid or original inputs
    outdir: where to put the resulting staging csv

    """
    output = {}

    for mask_folder in propagated_mask_dir.iterdir():

        if not mask_folder.is_dir():
            continue

        # The mask with start with the same name as the folder + an image extension
        mask_path = common.getfile_startswith(mask_folder, mask_folder.name)

        mask_array = common.LoadImage(mask_path).array
        embryo_vol_voxels = mask_array[mask_array == 1].size
        output[mask_folder.name] = embryo_vol_voxels
    _write_output(output, outdir)

    Generate a csv of whole embryo volumes.

    Parameters
    ----------
    propagated_mask_dir:  masks that have been inverted back to rigid or original inputs
    outdir: where to put the resulting staging csv

    
Generate a csv of whole embryo volumes.
Parameters

masks that have been inverted back to rigid or original inputs
outdir: where to put the resulting staging csv
Generate a csv of whole embryo volumes . Parameters masks that have been inverted back to rigid or original inputs outdir : where to put the resulting staging csv
def whole_volume_staging(propagated_mask_dir: Path, outdir: Path):
    output = {}
    for mask_folder in propagated_mask_dir.iterdir():
        if not mask_folder.is_dir():
            continue
        mask_path = common.getfile_startswith(mask_folder, mask_folder.name)
        mask_array = common.LoadImage(mask_path).array
        embryo_vol_voxels = mask_array[mask_array == 1].size
        output[mask_folder.name] = embryo_vol_voxels
    _write_output(output, outdir)
def whole_volume_staging ( propagated_mask_dir : Path , outdir : Path ) : output = { } for mask_folder in propagated_mask_dir . iterdir ( ) : if not mask_folder . is_dir ( ) : continue mask_path = common . getfile_startswith ( mask_folder , mask_folder . name ) mask_array = common . LoadImage ( mask_path ) . array embryo_vol_voxels = mask_array [ mask_array == 1 ] . size output [ mask_folder . name ] = embryo_vol_voxels _write_output ( output , outdir )
Generate a csv of whole embryo volumes.
Generate a csv of whole embryo volumes .
"""
    Generate a csv of whole embryo volumes.

    Parameters
    ----------
    propagated_mask_dir:  masks that have been inverted back to rigid or original inputs
    outdir: where to put the resulting staging csv

    """ # The mask with start with the same name as the folder + an image extension
propagated_mask_dir
Path
outdir
Path