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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__DJUNCT_MONTAGE_COORDINATOR_METADATA = Metadata(
    id="9334f9ba509c4429fa9b5cd5573bb0523c2d77bd.boutiques",
    name="@djunct_montage_coordinator",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VDjunctMontageCoordinatorOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__djunct_montage_coordinator(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_coords: OutputPathType
    """Output coordinates (IJK or XYZ) for the montage setup."""


def v__djunct_montage_coordinator(
    input_file: InputPathType,
    montx: float,
    monty: float,
    out_xyz: bool = False,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> VDjunctMontageCoordinatorOutputs:
    """
    Small program to calculate how to evenly space a certain number of slices within
    each view plane of a dataset.
    
    Author: AFNI Team
    
    URL:
    https://afni.nimh.nih.gov/pub/dist/doc/program_help/@djunct_montage_coordinator.html
    
    Args:
        input_file: Name of input dataset.
        montx: Montage dimension: number of panels along x-axis (i.e., number\
            of cols).
        monty: Montage dimension: number of panels along y-axis (i.e., number\
            of rows).
        out_xyz: Make program output 'X Y Z' values.
        help_: See helpfile.
        version: See version number.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VDjunctMontageCoordinatorOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__DJUNCT_MONTAGE_COORDINATOR_METADATA)
    cargs = []
    cargs.append("@djunct_montage_coordinator")
    cargs.extend([
        "-inset",
        execution.input_file(input_file)
    ])
    cargs.extend([
        "-montx",
        str(montx)
    ])
    cargs.extend([
        "-monty",
        str(monty)
    ])
    if out_xyz:
        cargs.append("-out_xyz")
    if help_:
        cargs.append("-help")
    if version:
        cargs.append("-ver")
    ret = VDjunctMontageCoordinatorOutputs(
        root=execution.output_file("."),
        output_coords=execution.output_file("output.txt"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VDjunctMontageCoordinatorOutputs",
    "V__DJUNCT_MONTAGE_COORDINATOR_METADATA",
    "v__djunct_montage_coordinator",
]
