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

import typing
import pathlib
from styxdefs import *
import dataclasses

MRI_CA_TISSUE_PARMS_METADATA = Metadata(
    id="1d6429470b2b62de7212566259b4407543b03a79.boutiques",
    name="mri_ca_tissue_parms",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MriCaTissueParmsOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mri_ca_tissue_parms(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """File containing the computed tissue parameters."""


def mri_ca_tissue_parms(
    subjects: list[str],
    output_file: str,
    spacing_flag: bool = False,
    gradient_flag: bool = False,
    runner: Runner | None = None,
) -> MriCaTissueParmsOutputs:
    """
    Tool for computing tissue parameters in canonical space.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subjects: List of subjects for processing.
        output_file: Output file for storing results.
        spacing_flag: Specify spacing of classifiers in canonical space.
        gradient_flag: Use intensity gradient as input to classifier.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MriCaTissueParmsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MRI_CA_TISSUE_PARMS_METADATA)
    cargs = []
    cargs.append("mri_ca_tissue_parms")
    cargs.extend(subjects)
    cargs.append(output_file)
    if spacing_flag:
        cargs.append("-spacing")
    if gradient_flag:
        cargs.append("-gradient")
    ret = MriCaTissueParmsOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(output_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MRI_CA_TISSUE_PARMS_METADATA",
    "MriCaTissueParmsOutputs",
    "mri_ca_tissue_parms",
]
