Metadata-Version: 2.2
Name: harmony-to-organoid
Version: 0.5.0
Summary: Utility for extracting individual organoid max projections from the export of Opera Phenix Harmony software.
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: markdown==3.7
Requires-Dist: matplotlib==3.10.0
Requires-Dist: scikit-image==0.25.0
Requires-Dist: tifffile==2024.12.12
Requires-Dist: typer==0.15.1
Requires-Dist: imagecodecs>=2024.12.30
Requires-Dist: ashlar>=1.19.0

# Harmony to Organoid

## Example output

Check out [this page](example_output/README.md) for exemplary output files.

## How to Prepare

You can install the tool via pip:

```
pip install harmony-to-organoid
```

## How to Run

### How to run from commandline

Process your data exported from Harmony by executing the command `harmony-to-organoid process`.

**Parameters:**

- `--index-file`: **(Required)** Path to the Harmony export index XML file (`Index.idx.xml`) or (`Index.xml`) 
  located next to the corresponding TIFF files.
- `--output-dir`: **(Required)** Path to your desired output directory.
- `--lut-min`: **(Optional)** Comma-separated minimum LUT (Lookup Table) values for each channel.
- `--lut-max`: **(Optional)** Comma-separated maximum LUT values for each channel.
- `--colors`: **(Optional)** Comma-separated colors for each channel.
- `--align-fields`: **(Optional)** Align fields using ashlar. True by default.
- `--exclude-fields`: **(Optional)** Comma separated list of field IDs which should not be processed.

**Example:**

```bash
harmony-to-organoid process \
    --index-file MY/INPUT/DATA/Index.xml \
    --output-dir MY/OUTPUT/DATA \
    --lut-min 100,100,100,100 \
    --lut-max 2000,1000,1500,2000 \
    --colors white,orange,blue,#ff0000 \
    --exclude-fields 2,3,7
```

**Output:**

After successfully running the processing command, your specified output directory (`MY/OUTPUT/DATA`) will contain the following:

- **Projections:**  
  Maximum intensity projection images (`projections/`) generated for each data group, providing 2D summaries of your 3D data.

- **Plots:**  
  Visual representations of the data are stored in `plots`, including group bounding boxes and projections placed within 
  their  respective areas, ensuring spatial consistency and aiding in data interpretation.

- **README Files:**  
  Automatically generated documentation (`README.md` and `README.html`) that includes embedded plots for easy reference and sharing.

### How to run from Jupyter notebook

Check out our example notebook `notebook.ipynb`.
