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

import typing
import pathlib
from styxdefs import *
import dataclasses

V__ALIGN_PARTIAL_OBLIQUE_METADATA = Metadata(
    id="8266c2389908e7353d0356e57b5059a88cdc6548.boutiques",
    name="@align_partial_oblique",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VAlignPartialObliqueOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__align_partial_oblique(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    aligned_output: OutputPathType
    """Aligned partial coverage T1 weighted dataset"""


def v__align_partial_oblique(
    base: InputPathType,
    input_: InputPathType,
    suffix: str | None = None,
    keep_tmp: bool = False,
    clean: bool = False,
    dxyz: float | None = None,
    dx: float | None = None,
    dy: float | None = None,
    dz: float | None = None,
    runner: Runner | None = None,
) -> VAlignPartialObliqueOutputs:
    """
    A script to align a full coverage T1 weighted non-oblique dataset to match a
    partial coverage T1 weighted non-oblique dataset. Alignment is done with a
    rotation and shift (6 parameters) transform only.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        base: Reference anatomical full coverage volume.
        input_: Partial coverage T1 weighted non-oblique dataset.
        suffix: Output dataset name is formed by adding SUF to the prefix of\
            the base dataset. The default suffix is _alnd_PartialCoverageObliqueT1.
        keep_tmp: Keep temporary files.
        clean: Clean all temp files, likely left from -keep_tmp option then\
            exit.
        dxyz: Cubic voxel size of output dataset in TLRC space Default MM is 1.
        dx: Size of voxel in the x direction (Right-Left). Default is 1mm.
        dy: Size of voxel in the y direction (Anterior-Posterior). Default is\
            1mm.
        dz: Size of voxel in the z direction (Inferior-Superior). Default is\
            1mm.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VAlignPartialObliqueOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__ALIGN_PARTIAL_OBLIQUE_METADATA)
    cargs = []
    cargs.append("@align_partial_oblique")
    cargs.extend([
        "-base",
        execution.input_file(base)
    ])
    cargs.extend([
        "-input",
        execution.input_file(input_)
    ])
    if suffix is not None:
        cargs.extend([
            "-suffix",
            suffix
        ])
    if keep_tmp:
        cargs.append("-keep_tmp")
    if clean:
        cargs.append("-clean")
    if dxyz is not None:
        cargs.extend([
            "-dxyz",
            str(dxyz)
        ])
    if dx is not None:
        cargs.extend([
            "-dx",
            str(dx)
        ])
    if dy is not None:
        cargs.extend([
            "-dy",
            str(dy)
        ])
    if dz is not None:
        cargs.extend([
            "-dz",
            str(dz)
        ])
    ret = VAlignPartialObliqueOutputs(
        root=execution.output_file("."),
        aligned_output=execution.output_file(pathlib.Path(base).name + "_alnd_" + pathlib.Path(input_).name + ".nii.gz"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VAlignPartialObliqueOutputs",
    "V__ALIGN_PARTIAL_OBLIQUE_METADATA",
    "v__align_partial_oblique",
]
