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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRSI_SEGMENT_METADATA = Metadata(
    id="68c36b893349987e43bfd6044eeb59ccd2b7cef2.boutiques",
    name="mrsi_segment",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class MrsiSegmentOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mrsi_segment(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file name"""


def mrsi_segment(
    mrsi_file: InputPathType,
    runner: Runner | None = None,
) -> MrsiSegmentOutputs:
    """
    FSL Magnetic Resonance Spectroscopy - register fast segmentation to MRSI.
    
    Author: FSL Team
    
    Args:
        mrsi_file: MRSI nifti file.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrsiSegmentOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRSI_SEGMENT_METADATA)
    cargs = []
    cargs.append("mrsi_segment")
    cargs.append(execution.input_file(mrsi_file))
    cargs.append("[--t1")
    cargs.append("T1]")
    cargs.append("[--anat")
    cargs.append("ANAT]")
    cargs.append("[--output")
    cargs.append("OUTPUT]")
    cargs.append("[--filename")
    cargs.append("FILENAME]")
    ret = MrsiSegmentOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file("[--output]/[--filename]"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRSI_SEGMENT_METADATA",
    "MrsiSegmentOutputs",
    "mrsi_segment",
]
