CellFocus Volume Crop & QC - User Manual
Dragonfly Prototype Apps · CellFocus Volume Crop & QC...
Version 1.0 · 2026-08-02
English Manual
Contents
1. Introduction
2. Use cases
3. Installation & enabling
4. Runtime environment & first-run setup
5. Interface
6. How to use
7. Parameters
8. Output
9. FAQ & troubleshooting
10. Notes & known limitations
11. References
1. Introduction
Finds the cell in a volume-EM (SBF-SEM and similar) stack, crops to its 3-D bounding box, and reports enough QC to judge whether that crop is trustworthy.
Cropping is a translation. The plugin therefore returns the new origin and applies it when publishing, so every voxel keeps its true position in space and any measurement made after the crop is still valid. If this Dragonfly build cannot set an origin, the plugin warns clearly at publish time and states the resulting offset — it never quietly publishes a displaced object.
Per-slice re-centring destroys geometry. That mode exists for deep-learning training frames; it translates each slice independently, so the spatial relationship between slices is destroyed and no 3-D measurement on the output is meaningful. It is never the default, it saves every dx/dy so it can be undone, and it warns before the run, not only after.
2. Use cases
- Cropping and shrinking volume-EM data before segmentation or deep learning.
- Seeing at a glance which slices in a stack are charged, out of focus or blank.
- Preparing centred training frames for deep learning, having accepted that it breaks the geometry between slices.
3. Installation & enabling
1. Install the Prototype Apps package (or tick this plugin in the App Store).
2. This plugin is disabled by default — enable it in Prototype Apps ▸ App Store.
3. Restart Dragonfly completely (plugins are discovered at startup only).
4. Runtime environment & first-run setup
Nothing to install or configure. It runs entirely in Dragonfly's own Python using the NumPy and SciPy it already ships. No internet, no download, no GPU, no virtual environment.
The header reports whether this build can publish Channels, publish ROIs and set an origin.
5. Interface
1. Inputs
Choose the Channel (published objects only) and timestep; shape, spacing and origin are shown.
2. Calibration & Preprocessing
Cell polarity, smoothing sigma and closing radius. Preprocessing acts on a working copy and never modifies the input object.
3. Parameters
Minimum and maximum cell area fraction, minimum contrast, crop margin, anomaly sensitivity k, crop mode, and whether to zero the background.
4. Preview & QC
A fast pass on downsampled data showing the box and the fraction kept. Nothing is published and the export buttons stay disabled.
5. Run
Full resolution, cancellable at any time.
6. Results & Export
Publish the cropped Channel or the cell-mask ROI; export the per-slice table (CSV) and the full result (JSON, including per-slice dx/dy).
6. How to use
1. Pick the Channel in step 1.
2. Confirm the cell polarity in step 2.
3. Run a preview in step 4 and check the box looks sensible with few anomalous slices.
4. Run at full resolution in step 5.
5. Publish or export in step 6.
7. Parameters
Parameter | Default | Meaning |
Cell polarity | bright | whether the cell is brighter or darker than background |
Smoothing sigma | 2.0 | Gaussian smoothing before segmentation |
Closing radius | 3 | closes small gaps in the cell outline |
Minimum cell area fraction | 0.001 | smaller than this is speckle, reported as no cell |
Maximum cell area fraction | 0.95 | larger than this is a blank slice mis-segmented |
Minimum contrast | 3.0 | difference between the two class means; below it, the slice has no structure |
Crop margin | 0 | extra voxels kept beyond the box |
Anomaly sensitivity k | 5.0 | robust deviations from the median before a slice is flagged |
Crop mode | fixed 3-D bounding box | the alternative is per-slice re-centring, which breaks geometry |
Mask out background | off | sets voxels outside the mask to 0 |
8. Output
Output | Meaning |
Cropped Channel | the crop, carrying its new origin |
Cell mask ROI | the per-slice cell segmentation |
Per-slice CSV | area, threshold, intensity, centroid and anomaly flag for every slice |
JSON | box, origin, compression, anomalous slices, per-slice dx/dy and all warnings |
9. FAQ & troubleshooting
- Some slices report no cell — normal if they lie outside the cell; otherwise check the polarity and the minimum contrast.
- An origin warning at publish time — this build cannot set an object origin, so the published crop sits at the source's position; the warning states the exact offset.
- The box is almost the whole volume — usually blank slices mis-segmented into a large "cell"; lower the maximum area fraction or raise the minimum contrast.
10. Notes & known limitations
- The whole volume is read into memory; use the preview to settle parameters on large data.
- Inputs must be published Channels.
- Publishing is always an explicit step-6 action; neither preview nor run publishes anything.
- Data produced by per-slice re-centring must not be used for any 3-D measurement.
11. References
The workflow follows Hermine-K/amira-sbfsem-cell-mask (MIT): https://github.com/Hermine-K/amira-sbfsem-cell-mask — no source was copied and no Amira or Hx API is required. Thresholding: N. Otsu, IEEE Trans. SMC 9(1), 1979.