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

import typing
import pathlib
from styxdefs import *
import dataclasses

TEST_ORIENTATION_PLANES_FROM_PARCELLATION_METADATA = Metadata(
    id="4ec44f64124a848bb9ff90699fb3e68885365ff6.boutiques",
    name="testOrientationPlanesFromParcellation",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class TestOrientationPlanesFromParcellationOutputs(typing.NamedTuple):
    """
    Output object returned when calling `test_orientation_planes_from_parcellation(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def test_orientation_planes_from_parcellation(
    input_file: InputPathType,
    output_file: str,
    bb_flag: bool = False,
    runner: Runner | None = None,
) -> TestOrientationPlanesFromParcellationOutputs:
    """
    Tests orientation planes from a given parcellation using FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input file for the parcellation data.
        output_file: Output file for the orientation planes results.
        bb_flag: Flag to use bounding box in the computation.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `TestOrientationPlanesFromParcellationOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(TEST_ORIENTATION_PLANES_FROM_PARCELLATION_METADATA)
    cargs = []
    cargs.append("testOrientationPlanesFromParcellation")
    cargs.extend([
        "-i",
        execution.input_file(input_file)
    ])
    cargs.extend([
        "-o",
        output_file
    ])
    if bb_flag:
        cargs.append("-bb")
    ret = TestOrientationPlanesFromParcellationOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "TEST_ORIENTATION_PLANES_FROM_PARCELLATION_METADATA",
    "TestOrientationPlanesFromParcellationOutputs",
    "test_orientation_planes_from_parcellation",
]
