# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

LESION_FILLING_METADATA = Metadata(
    id="e67424ecd9a0c5e13dd9b069bccb2e63e4348726.boutiques",
    name="LesionFilling",
    package="ants",
    container_image_tag="antsx/ants:v2.5.3",
)


class LesionFillingOutputs(typing.NamedTuple):
    """
    Output object returned when calling `lesion_filling(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    lesion_filled_output: OutputPathType
    """Output image with filled lesions."""


def lesion_filling(
    image_dimension: int,
    t1_image: InputPathType,
    lesion_mask: InputPathType,
    output_lesion_filled: str,
    runner: Runner | None = None,
) -> LesionFillingOutputs:
    """
    A tool for filling lesions in T1 images using a mask.
    
    Author: ANTs Developers
    
    URL: https://github.com/ANTsX/ANTs
    
    Args:
        image_dimension: Dimensionality of the image (e.g., 2, 3).
        t1_image: Path to the T1 image file.
        lesion_mask: Path to the lesion mask image file.
        output_lesion_filled: Path for the output file with lesions filled.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `LesionFillingOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(LESION_FILLING_METADATA)
    cargs = []
    cargs.append("LesionFilling")
    cargs.append(str(image_dimension))
    cargs.append(execution.input_file(t1_image))
    cargs.append(execution.input_file(lesion_mask))
    cargs.append(output_lesion_filled)
    ret = LesionFillingOutputs(
        root=execution.output_file("."),
        lesion_filled_output=execution.output_file(output_lesion_filled),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "LESION_FILLING_METADATA",
    "LesionFillingOutputs",
    "lesion_filling",
]
