> For the complete documentation index, see [llms.txt](https://isciml.s2labs.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://isciml.s2labs.co/command-line-options/generate-models/images-and-media.md).

# one-pipe

## Overview

The `generate-models one-pipe` subcommand is part of the `generate-models` command group in isciml. This subcommand generates models with a single pipe configuration, allowing for various geometric and physical property specifications.

## Usage

```
singularity exec isciml.sif isciml generate-models one-pipe [OPTIONS]
```

## Description

This subcommand creates one or more models of a single pipe within a given mesh. It allows for customization of the pipe's geometry (depth, length, angles, radius) and physical properties (mu and sigma values). This is useful for generating synthetic datasets for training or testing in non-invasive imaging applications.

## Options

| Option                      | Description                                             | Default                             | Required |
| --------------------------- | ------------------------------------------------------- | ----------------------------------- | -------- |
| `--mesh PATH`               | Path to the input mesh file.                            | -                                   | Yes      |
| `--min_depth FLOAT`         | Minimum depth of the pipe.                              | 0.0                                 | No       |
| `--max_depth FLOAT`         | Maximum depth of the pipe.                              | 0.0                                 | No       |
| `--min_length FLOAT`        | Minimum length of the pipe.                             | 6.0                                 | No       |
| `--max_length FLOAT`        | Maximum length of the pipe.                             | 6.0                                 | No       |
| `--min_dip_angle FLOAT`     | Minimum dipping angle for the pipe.                     | 0.0                                 | No       |
| `--max_dip_angle FLOAT`     | Maximum dipping angle for the pipe.                     | 0.0                                 | No       |
| `--min_azimuth_angle FLOAT` | Minimum azimuth angle for the pipe.                     | 0.0                                 | No       |
| `--max_azimuth_angle FLOAT` | Maximum azimuth angle for the pipe.                     | 0.0                                 | No       |
| `--min_radius FLOAT`        | Minimum radius of the pipe.                             | 2.0                                 | No       |
| `--max_radius FLOAT`        | Maximum radius of the pipe.                             | 2.0                                 | No       |
| `--pipe_mu_value FLOAT`     | Mu value to assign to the pipe.                         | 1.0                                 | No       |
| `--pipe_sigma_value FLOAT`  | Sigma value to assign to the pipe.                      | 1.0                                 | No       |
| `--start_index INTEGER`     | Starting index for the output files.                    | 0                                   | No       |
| `--num_files INTEGER`       | Number of pipe models to generate.                      | 1                                   | No       |
| `--mu_value_key TEXT`       | Key to use for the mu value in the mesh file.           | "mu"                                | No       |
| `--sigma_value_key TEXT`    | Key to use for the sigma value in the mesh file.        | "sigma"                             | No       |
| `--output_folder PATH`      | Path to the output folder for storing generated models. | -                                   | Yes      |
| `--output_prefix TEXT`      | Prefix to use for the output files.                     | "one\_pipe"                         | No       |
| \`--output\_format \[npy    | vtk]\`                                                  | Format to use for the output files. | "npy"    |
| `--overwrite`               | Flag to overwrite existing files.                       | False                               | No       |
| `--help`                    | Show the help message and exit.                         | -                                   | No       |

## Example

To generate 10 pipe models with varying depths and radii:

```
singularity exec isciml.sif isciml generate-models one-pipe \
    --mesh /path/to/input/mesh.vtk \
    --min_depth 5.0 \
    --max_depth 20.0 \
    --min_radius 1.5 \
    --max_radius 3.0 \
    --num_files 10 \
    --output_folder /path/to/output/folder \
    --output_format vtk \
    --overwrite
```

## Output

The command will generate the specified number of pipe models and save them in the designated output folder. Each file will be named using the pattern: `{output_prefix}_{index}.{output_format}`.

## Notes

* When min and max values are the same for a parameter, a constant value is used.
* When min and max values differ, random values within the range are generated for each model.
* The `--overwrite` flag should be used cautiously to avoid unintended data loss.
* Ensure the input mesh is compatible with the pipe dimensions specified.

## Related Commands

* `generate-models inspect-mesh`: Inspects the mesh and provides mesh information.
* `generate-models initialize-mu-sigma`: Initializes mu and sigma values for a mesh.

## See Also

For more information on model generation and customization, refer to the isciml documentation on synthetic data creation and model parameterization.
