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

import typing
import pathlib
from styxdefs import *
import dataclasses

VOLUME_CAPTURE_PLANE_METADATA = Metadata(
    id="b2bfd3d4513396540148947511ec229d0418fc44.boutiques",
    name="volume-capture-plane",
    package="workbench",
    container_image_tag="brainlife/connectome_workbench:1.5.0-freesurfer-update",
)


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


def volume_capture_plane(
    volume: InputPathType,
    subvolume: str,
    interp: str,
    h_dim: int,
    v_dim: int,
    scale_min: float,
    scale_max: float,
    bottom_left_x: float,
    bottom_left_y: float,
    bottom_left_z: float,
    bottom_right_x: float,
    bottom_right_y: float,
    bottom_right_z: float,
    top_left_x: float,
    top_left_y: float,
    top_left_z: float,
    image: str,
    runner: Runner | None = None,
) -> VolumeCapturePlaneOutputs:
    """
    Interpolate image from plane through volume.
    
    NOTE: If you want to generate an image with all of the capabilities of the
    GUI rendering, see -show-scene.
    
    Renders an image of an arbitrary plane through the volume file, with a
    simple linear grayscale palette. The parameter <interp> must be one of:
    
    CUBIC
    ENCLOSING_VOXEL
    TRILINEAR.
    
    Author: Connectome Workbench Developers
    
    URL: https://github.com/Washington-University/workbench
    
    Args:
        volume: the volume file to interpolate from.
        subvolume: the name or number of the subvolume to use.
        interp: interpolation type.
        h_dim: width of output image, in pixels.
        v_dim: height of output image, in pixels.
        scale_min: value to render as black.
        scale_max: value to render as white.
        bottom_left_x: x-coordinate of the bottom left of the output image.
        bottom_left_y: y-coordinate of the bottom left of the output image.
        bottom_left_z: z-coordinate of the bottom left of the output image.
        bottom_right_x: x-coordinate of the bottom right of the output image.
        bottom_right_y: y-coordinate of the bottom right of the output image.
        bottom_right_z: z-coordinate of the bottom right of the output image.
        top_left_x: x-coordinate of the top left of the output image.
        top_left_y: y-coordinate of the top left of the output image.
        top_left_z: z-coordinate of the top left of the output image.
        image: output - the output image.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VolumeCapturePlaneOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(VOLUME_CAPTURE_PLANE_METADATA)
    cargs = []
    cargs.append("wb_command")
    cargs.append("-volume-capture-plane")
    cargs.append(execution.input_file(volume))
    cargs.append(subvolume)
    cargs.append(interp)
    cargs.append(str(h_dim))
    cargs.append(str(v_dim))
    cargs.append(str(scale_min))
    cargs.append(str(scale_max))
    cargs.append(str(bottom_left_x))
    cargs.append(str(bottom_left_y))
    cargs.append(str(bottom_left_z))
    cargs.append(str(bottom_right_x))
    cargs.append(str(bottom_right_y))
    cargs.append(str(bottom_right_z))
    cargs.append(str(top_left_x))
    cargs.append(str(top_left_y))
    cargs.append(str(top_left_z))
    cargs.append(image)
    ret = VolumeCapturePlaneOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VOLUME_CAPTURE_PLANE_METADATA",
    "VolumeCapturePlaneOutputs",
    "volume_capture_plane",
]
