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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRIS_MULTIMODAL_METADATA = Metadata(
    id="2538165a13ddb942b3f140f14c2c3852f648e85c.boutiques",
    name="mris_multimodal",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MrisMultimodalOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mris_multimodal(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    processed_output_surface: OutputPathType
    """Processed output surface file."""
    annotation_output_file: OutputPathType
    """Output file containing annotation data."""
    overlay_output_file: OutputPathType
    """Output file containing overlay data."""
    csv_output_file: OutputPathType
    """Output CSV file."""


def mris_multimodal(
    input_surface: InputPathType,
    target_surface: InputPathType,
    output_surface: InputPathType,
    annotation_output: InputPathType,
    overlay_output: InputPathType,
    csv_output: InputPathType,
    fill_holes: bool = False,
    curvature: bool = False,
    thickness: bool = False,
    vtk_output: bool = False,
    runner: Runner | None = None,
) -> MrisMultimodalOutputs:
    """
    A FreeSurfer tool for processing multimodal surface data.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_surface: Input surface file.
        target_surface: Target surface file.
        output_surface: Output surface file.
        annotation_output: Output file for annotation data.
        overlay_output: Output file for overlay data.
        csv_output: Output CSV file.
        fill_holes: Flag to fill holes in the surface.
        curvature: Flag to process curvature data.
        thickness: Flag to process thickness data.
        vtk_output: Flag to output VTK file format.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MrisMultimodalOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRIS_MULTIMODAL_METADATA)
    cargs = []
    cargs.append("mris_multimodal")
    cargs.extend([
        "-i",
        execution.input_file(input_surface)
    ])
    cargs.extend([
        "-t",
        execution.input_file(target_surface)
    ])
    cargs.extend([
        "-o",
        execution.input_file(output_surface)
    ])
    if fill_holes:
        cargs.append("-fillHoles")
    if curvature:
        cargs.append("--curvature")
    if thickness:
        cargs.append("--thickness")
    cargs.extend([
        "-a",
        execution.input_file(annotation_output)
    ])
    cargs.extend([
        "-v",
        execution.input_file(overlay_output)
    ])
    cargs.extend([
        "-c",
        execution.input_file(csv_output)
    ])
    if vtk_output:
        cargs.append("-vtk")
    ret = MrisMultimodalOutputs(
        root=execution.output_file("."),
        processed_output_surface=execution.output_file(pathlib.Path(output_surface).name),
        annotation_output_file=execution.output_file(pathlib.Path(annotation_output).name),
        overlay_output_file=execution.output_file(pathlib.Path(overlay_output).name),
        csv_output_file=execution.output_file(pathlib.Path(csv_output).name),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRIS_MULTIMODAL_METADATA",
    "MrisMultimodalOutputs",
    "mris_multimodal",
]
