Skip to content

[Docs] Overview of SPIMquant Workflows and Output Types#140

Merged
akhanf merged 3 commits intomainfrom
copilot/docs-overview-spimquant-workflows
Mar 31, 2026
Merged

[Docs] Overview of SPIMquant Workflows and Output Types#140
akhanf merged 3 commits intomainfrom
copilot/docs-overview-spimquant-workflows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Adds the three documentation artifacts requested by the epic: a pipeline narrative, a complete output reference, and an enhanced segmentation how-to. Navigation is updated to surface all three.

New: docs/workflow_overview.md — "How SPIMquant Works Under the Hood"

  • Mermaid flowchart of all 11 stages with prose description of what each stage does, why, and what it produces
  • Output summary table mapping file patterns to pipeline stages (including corrected path sub-*/xfm/*_regqc.html for registration QC reports)
  • Key config knobs and a "Further Reading" cross-link table

Rewritten: docs/reference/outputs.md

  • Full BIDS-derivative directory tree
  • Every output type covered: filename pattern, interpretation, scale conventions (e.g. 0–100 mask → direct % field fraction), and example paths referencing tests/bids_ds
  • Intermediate/temp files section; all TODO stubs removed

Rewritten: docs/howto/segmentation.md

  • Mermaid sub-pipeline diagram
  • Intensity correction: Gaussian vs N4 — when to use each
  • Segmentation: threshold (fixed value) vs otsu+k3i2 (adaptive multi-Otsu) with accurate description of the k (number of Otsu classes) and i (threshold index for binary classification) parameters, trade-offs, and per-stain YAML example
  • Post-segmentation cleaning (edge removal, small-object filtering)

Navigation (mkdocs.yml, docs/index.md)

  • "How It Works" added as a top-level nav item
  • "Segmentation Methods", "Output Files", and "Workflow Visualization" wired into nav
  • Home page Quick Links updated

Copilot AI changed the title [WIP] Add documentation overview for SPIMquant workflows and output types [Docs] Overview of SPIMquant Workflows and Output Types Mar 31, 2026
Copilot AI requested a review from akhanf March 31, 2026 01:51
A two-step unsupervised method that adapts to the intensity distribution of each image:

1. **Multi-Otsu thresholding** — Otsu's method is extended to find *N* thresholds that minimise within-class variance, splitting the histogram into background, low-signal, and high-signal classes.
2. **k-means refinement** — 3-class k-means clustering (`k=3`) is applied to the voxels that fall in the intermediate class identified by Otsu, further separating ambiguous voxels. The result assigned class index `i=2` (the highest-intensity class) is kept as positive.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot: it is not actually using k-means, it is simply a way to select which how many classes to use for multiotsu, and which of the levels to use for the binary classification. fix this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b191746. The description now correctly explains that k is the number of Otsu classes (with k-1 thresholds computed) and i is the 1-based index of the threshold to use for the binary classification — no k-means involved.

| Path pattern | Content | Stage |
|---|---|---|
| `sub-*/micr/*_space-{tpl}_SPIM.nii.gz` | Subject brain warped to template | 6 |
| `sub-*/micr/*_regqc.html` | Registration QC report | 10 |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `sub-*/micr/*_regqc.html` | Registration QC report | 10 |
| `sub-*/xfm/*_regqc.html` | Registration QC report | 10 |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in b191746.

Copilot AI requested a review from akhanf March 31, 2026 02:06
@akhanf akhanf marked this pull request as ready for review March 31, 2026 02:19
@akhanf akhanf merged commit 75e5eca into main Mar 31, 2026
2 checks passed
@akhanf akhanf deleted the copilot/docs-overview-spimquant-workflows branch March 31, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Overview of SPIMquant Workflows and Output Types

2 participants