lama/elastix/elastix_registration.py
def move_intemediate_volumes(reg_outdir: Path):
    """
    If using elastix multi-resolution registration and outputting image each resolution, put the intermediate files
    in a separate folder.

    Do the same with pyramid images
    """

    intermediate_imgs = list(reg_outdir.rglob('*result.0.R*'))  #[x for x in imgs if basename(x).startswith('result.')]
    if len(intermediate_imgs) > 0:

        reolution_img_dir = reg_outdir / RESOLUTION_IMGS_DIR
        common.mkdir_force(reolution_img_dir)
        for int_img in intermediate_imgs:
            shutil.move(str(int_img), str(reolution_img_dir))

    pyramid_imgs = list(reg_outdir.rglob('*ImagePyramid*'))
    if len(pyramid_imgs) > 0:

        img_pyramid_dir = reg_outdir / IMG_PYRAMID_DIR
        common.mkdir_force(img_pyramid_dir)
        for pyr_img in pyramid_imgs:
            shutil.move(str(pyr_img), str(img_pyramid_dir))

    If using elastix multi-resolution registration and outputting image each resolution, put the intermediate files
    in a separate folder.

    Do the same with pyramid images
    
If using elastix multi-resolution registration and outputting image each resolution, put the intermediate files
in a separate folder.

Do the same with pyramid images
If using elastix multi - resolution registration and outputting image each resolution put the intermediate files in a separate folder . Do the same with pyramid images
def move_intemediate_volumes(reg_outdir: Path):
    intermediate_imgs = list(reg_outdir.rglob('*result.0.R*'))  
    if len(intermediate_imgs) > 0:
        reolution_img_dir = reg_outdir / RESOLUTION_IMGS_DIR
        common.mkdir_force(reolution_img_dir)
        for int_img in intermediate_imgs:
            shutil.move(str(int_img), str(reolution_img_dir))
    pyramid_imgs = list(reg_outdir.rglob('*ImagePyramid*'))
    if len(pyramid_imgs) > 0:
        img_pyramid_dir = reg_outdir / IMG_PYRAMID_DIR
        common.mkdir_force(img_pyramid_dir)
        for pyr_img in pyramid_imgs:
            shutil.move(str(pyr_img), str(img_pyramid_dir))
def move_intemediate_volumes ( reg_outdir : Path ) : intermediate_imgs = list ( reg_outdir . rglob ( '*result.0.R*' ) ) if len ( intermediate_imgs ) > 0 : reolution_img_dir = reg_outdir / RESOLUTION_IMGS_DIR common . mkdir_force ( reolution_img_dir ) for int_img in intermediate_imgs : shutil . move ( str ( int_img ) , str ( reolution_img_dir ) ) pyramid_imgs = list ( reg_outdir . rglob ( '*ImagePyramid*' ) ) if len ( pyramid_imgs ) > 0 : img_pyramid_dir = reg_outdir / IMG_PYRAMID_DIR common . mkdir_force ( img_pyramid_dir ) for pyr_img in pyramid_imgs : shutil . move ( str ( pyr_img ) , str ( img_pyramid_dir ) )
If using elastix multi-resolution registration and outputting image each resolution, put the intermediate files
in a separate folder.
If using elastix multi - resolution registration and outputting image each resolution put the intermediate files in a separate folder .
"""
    If using elastix multi-resolution registration and outputting image each resolution, put the intermediate files
    in a separate folder.

    Do the same with pyramid images
    """ #[x for x in imgs if basename(x).startswith('result.')]
reg_outdir
Path