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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_STRIP_NONWHITE_METADATA = Metadata(
    id="85cd600947bfda4ae61eea101b99ad79680f009b.boutiques",
    name="mri_strip_nonwhite",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriStripNonwhiteOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_strip_nonwhite(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Processed output volume file"""


def mri_strip_nonwhite(
    input_volume: InputPathType,
    transform: InputPathType,
    template_volume: InputPathType,
    output_volume: str,
    runner: Runner | None = None,
) -> MriStripNonwhiteOutputs:
    """
    Tool for processing MRI images, transforming volumetric data using provided
    transformation and template files.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_volume: Input MRI volume file.
        transform: Transformation file to be applied to the input volume.
        template_volume: Template volume file used in conjunction with the\
            transform.
        output_volume: Name of the output volume file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriStripNonwhiteOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_STRIP_NONWHITE_METADATA)
    cargs = []
    cargs.append("mri_strip_nonwhite")
    cargs.append(execution.input_file(input_volume))
    cargs.append(execution.input_file(transform))
    cargs.append(execution.input_file(template_volume))
    cargs.append(output_volume)
    ret = MriStripNonwhiteOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_volume),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_STRIP_NONWHITE_METADATA",
    "MriStripNonwhiteOutputs",
    "mri_strip_nonwhite",
]
