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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_SEGREG_METADATA = Metadata(
    id="f2669e04710c9f1f9d1fd46259ec2d013c37daf3.boutiques",
    name="mri_segreg",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriSegregOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_segreg(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    outfile: OutputPathType
    """Output file generated by mri_segreg"""


def mri_segreg(
    input_file: InputPathType,
    output_file: str = "output.mgz",
    runner: Runner | None = None,
) -> MriSegregOutputs:
    """
    MRI Segregation tool.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input image file. All formats accepted by mri_convert can\
            be used.
        output_file: Output file for the processed image.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriSegregOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_SEGREG_METADATA)
    cargs = []
    cargs.append("mri_segreg")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_file)
    ret = MriSegregOutputs(
        root=execution.output_file("."),
        outfile=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_SEGREG_METADATA",
    "MriSegregOutputs",
    "mri_segreg",
]
