lama/registration_pipeline/run_lama.py
def create_glcms(config: LamaConfig, final_reg_dir):
    """
    Create grey level co-occurence matrices. This is done in the main registration pipeline as we don't
    want to have to create GLCMs for the wildtypes multiple times when doing phenotype detection.
    """
    if not config['glcm']:
        return
    logging.info("Creating GLCMS")
    glcm_dir = config.mkdir('glcm_dir')

    mask_path = config['fixed_mask']
    if mask_path:
        mask = common.img_path_to_array(mask_path)
    else:
        logging.warn("Cannot make GLCMs without a mask")
        return

    glcm3d.pyradiomics_glcm(final_reg_dir, glcm_dir, mask)
    logging.info("Finished creating GLCMs")

    Create grey level co-occurence matrices. This is done in the main registration pipeline as we don't
    want to have to create GLCMs for the wildtypes multiple times when doing phenotype detection.
    
Create grey level co-occurence matrices. This is done in the main registration pipeline as we don't
want to have to create GLCMs for the wildtypes multiple times when doing phenotype detection.
Create grey level co - occurence matrices . This is done in the main registration pipeline as we don ' t want to have to create GLCMs for the wildtypes multiple times when doing phenotype detection .
def create_glcms(config: LamaConfig, final_reg_dir):
    if not config['glcm']:
        return
    logging.info("Creating GLCMS")
    glcm_dir = config.mkdir('glcm_dir')
    mask_path = config['fixed_mask']
    if mask_path:
        mask = common.img_path_to_array(mask_path)
    else:
        logging.warn("Cannot make GLCMs without a mask")
        return
    glcm3d.pyradiomics_glcm(final_reg_dir, glcm_dir, mask)
    logging.info("Finished creating GLCMs")
def create_glcms ( config : LamaConfig , final_reg_dir ) : if not config [ 'glcm' ] : return logging . info ( "Creating GLCMS" ) glcm_dir = config . mkdir ( 'glcm_dir' ) mask_path = config [ 'fixed_mask' ] if mask_path : mask = common . img_path_to_array ( mask_path ) else : logging . warn ( "Cannot make GLCMs without a mask" ) return glcm3d . pyradiomics_glcm ( final_reg_dir , glcm_dir , mask ) logging . info ( "Finished creating GLCMs" )
Create grey level co-occurence matrices.
Create grey level co - occurence matrices .
"""
    Create grey level co-occurence matrices. This is done in the main registration pipeline as we don't
    want to have to create GLCMs for the wildtypes multiple times when doing phenotype detection.
    """
config
LamaConfig
final_reg_dir