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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_REMOVE_NECK_METADATA = Metadata(
    id="8e30093031ff9f4da559f5e5f4affbdaf83b0a83.boutiques",
    name="mri_remove_neck",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriRemoveNeckOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_remove_neck(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_volume_file: OutputPathType
    """Processed MRI volume with neck removed."""


def mri_remove_neck(
    input_volume: InputPathType,
    transform: InputPathType,
    gca: InputPathType,
    output_volume: str,
    runner: Runner | None = None,
) -> MriRemoveNeckOutputs:
    """
    Tool for removing neck from MRI volumes.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_volume: Input MRI volume.
        transform: Transformation matrix to register the volume.
        gca: GCA file needed for processing.
        output_volume: Output MRI volume with the neck removed.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriRemoveNeckOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_REMOVE_NECK_METADATA)
    cargs = []
    cargs.append("mri_remove_neck")
    cargs.append(execution.input_file(input_volume))
    cargs.append(execution.input_file(transform))
    cargs.append(execution.input_file(gca))
    cargs.append(output_volume)
    ret = MriRemoveNeckOutputs(
        root=execution.output_file("."),
        output_volume_file=execution.output_file(output_volume),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_REMOVE_NECK_METADATA",
    "MriRemoveNeckOutputs",
    "mri_remove_neck",
]
