isoview 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. isoview-0.1.0/.gitignore +148 -0
  2. isoview-0.1.0/PKG-INFO +370 -0
  3. isoview-0.1.0/README.md +326 -0
  4. isoview-0.1.0/isoview/__init__.py +36 -0
  5. isoview-0.1.0/isoview/array.py +11 -0
  6. isoview-0.1.0/isoview/config.py +213 -0
  7. isoview-0.1.0/isoview/corrections.py +135 -0
  8. isoview-0.1.0/isoview/fusion.py +979 -0
  9. isoview-0.1.0/isoview/intensity.py +427 -0
  10. isoview-0.1.0/isoview/io.py +942 -0
  11. isoview-0.1.0/isoview/masks.py +421 -0
  12. isoview-0.1.0/isoview/pipeline.py +913 -0
  13. isoview-0.1.0/isoview/segmentation.py +173 -0
  14. isoview-0.1.0/isoview/temporal.py +373 -0
  15. isoview-0.1.0/isoview/transforms.py +1115 -0
  16. isoview-0.1.0/isoview/viz.py +723 -0
  17. isoview-0.1.0/matlab/clusterMF_original.m +139 -0
  18. isoview-0.1.0/matlab/clusterPT_RC.m +600 -0
  19. isoview-0.1.0/matlab/io/fInterpolate.mexw64 +0 -0
  20. isoview-0.1.0/matlab/io/io_test.m +241 -0
  21. isoview-0.1.0/matlab/io/msvcp120.dll +0 -0
  22. isoview-0.1.0/matlab/io/msvcr120.dll +0 -0
  23. isoview-0.1.0/matlab/io/picx20.dll +0 -0
  24. isoview-0.1.0/matlab/io/picx7820.dll +0 -0
  25. isoview-0.1.0/matlab/io/picx7920.dll +0 -0
  26. isoview-0.1.0/matlab/io/readBINstack.mexw64 +0 -0
  27. isoview-0.1.0/matlab/io/readImage.m +25 -0
  28. isoview-0.1.0/matlab/io/readJP2header.mexw64 +0 -0
  29. isoview-0.1.0/matlab/io/readJP2stack.mexw64 +0 -0
  30. isoview-0.1.0/matlab/io/readKLBheader.mexw64 +0 -0
  31. isoview-0.1.0/matlab/io/readKLBroi.mexw64 +0 -0
  32. isoview-0.1.0/matlab/io/readKLBslice.mexw64 +0 -0
  33. isoview-0.1.0/matlab/io/readKLBstack.mexw64 +0 -0
  34. isoview-0.1.0/matlab/io/readTIFstack.m +170 -0
  35. isoview-0.1.0/matlab/io/readXML_RC.m +20 -0
  36. isoview-0.1.0/matlab/io/readXMLdeconvolutionFile.m +21 -0
  37. isoview-0.1.0/matlab/io/translateImage.mexw64 +0 -0
  38. isoview-0.1.0/matlab/io/writeImage.m +115 -0
  39. isoview-0.1.0/matlab/io/writeJP2stack.mexw64 +0 -0
  40. isoview-0.1.0/matlab/io/writeKLBstack.mexw64 +0 -0
  41. isoview-0.1.0/matlab/io/writeTIFstack.m +406 -0
  42. isoview-0.1.0/matlab/processTimepoint_RC.m +1173 -0
  43. isoview-0.1.0/matlab/projectStacks_RC.m +26 -0
  44. isoview-0.1.0/matlab/run_clusterPT_gaussian_gridsearch.m +144 -0
  45. isoview-0.1.0/matlab/run_clusterPT_threshold_gridsearch.m +146 -0
  46. isoview-0.1.0/matlab/run_fusion.m +114 -0
  47. isoview-0.1.0/pyproject.toml +112 -0
@@ -0,0 +1,148 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .nox/
42
+ .coverage
43
+ .coverage.*
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ *.cover
48
+ *.py,cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+
52
+ # Jupyter Notebook
53
+ .ipynb_checkpoints
54
+ *.ipynb_checkpoints/
55
+ *-checkpoint.ipynb
56
+
57
+ # IPython
58
+ profile_default/
59
+ ipython_config.py
60
+
61
+ # pyenv
62
+ .python-version
63
+
64
+ # pipenv
65
+ Pipfile.lock
66
+
67
+ # PEP 582
68
+ __pypackages__/
69
+
70
+ # Celery stuff
71
+ celerybeat-schedule
72
+ celerybeat.pid
73
+
74
+ # SageMath parsed files
75
+ *.sage.py
76
+
77
+ # Virtual environments
78
+ .env
79
+ .venv
80
+ env/
81
+ venv/
82
+ ENV/
83
+ env.bak/
84
+ venv.bak/
85
+
86
+ # Spyder project settings
87
+ .spyderproject
88
+ .spyproject
89
+
90
+ # Rope project settings
91
+ .ropeproject
92
+
93
+ # mkdocs documentation
94
+ /site
95
+
96
+ # mypy
97
+ .mypy_cache/
98
+ .dmypy.json
99
+ dmypy.json
100
+
101
+ # Pyre type checker
102
+ .pyre/
103
+
104
+ # pytype static type analyzer
105
+ .pytype/
106
+
107
+ # IDEs
108
+ .vscode/
109
+ .idea/
110
+ *.swp
111
+ *.swo
112
+ *~
113
+
114
+ # PyCharm
115
+ .idea/
116
+ *.iml
117
+ *.iws
118
+ .idea/workspace.xml
119
+ .idea/tasks.xml
120
+ .idea/usage.statistics.xml
121
+ .idea/dictionaries
122
+ .idea/shelf
123
+
124
+ # Sphinx documentation
125
+ docs/_build/
126
+ docs/_static/
127
+ docs/_templates/
128
+ .sphinx-cache/
129
+
130
+ # Test data and outputs
131
+ test/matlab_output/
132
+ test/*.mat
133
+ test/*.tif
134
+ test/*.tiff
135
+ test/*.klb
136
+ test/*.zarr
137
+
138
+ # OS-specific
139
+ .DS_Store
140
+ Thumbs.db
141
+
142
+ # Temporary files
143
+ *.log
144
+ *.tmp
145
+ nul
146
+
147
+ # data files
148
+ *.mat
isoview-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,370 @@
1
+ Metadata-Version: 2.4
2
+ Name: isoview
3
+ Version: 0.1.0
4
+ Summary: Multi-view light sheet microscopy image processing pipeline
5
+ Project-URL: Homepage, https://github.com/MillerBrainObservatory/isoview
6
+ Project-URL: Repository, https://github.com/MillerBrainObservatory/isoview
7
+ Author: Miller Brain Observatory
8
+ License: MIT
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
14
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
15
+ Requires-Python: ==3.12.9
16
+ Requires-Dist: cellpose>=3.0.0
17
+ Requires-Dist: dask[array]>=2024.1.0
18
+ Requires-Dist: fsspec>=2023.12.0
19
+ Requires-Dist: glfw>=2.8.0
20
+ Requires-Dist: h5py>=3.10.0
21
+ Requires-Dist: imageio>=2.31.0
22
+ Requires-Dist: ipywidgets>=8.1.0
23
+ Requires-Dist: jupyterlab
24
+ Requires-Dist: jupyterlab-vim>=4.1.0
25
+ Requires-Dist: matplotlib>=3.7.0
26
+ Requires-Dist: mbo-fastplotlib[imgui,notebook]
27
+ Requires-Dist: mbo-utilities
28
+ Requires-Dist: numpy<3.0,>=1.26.0
29
+ Requires-Dist: ome-zarr>=0.9.0
30
+ Requires-Dist: opencv-python>=4.8.0
31
+ Requires-Dist: pyklb>=0.3.0
32
+ Requires-Dist: scikit-image>=0.22.0
33
+ Requires-Dist: scikit-learn>=1.3.0
34
+ Requires-Dist: scipy>=1.11.0
35
+ Requires-Dist: tifffile>=2023.7.0
36
+ Requires-Dist: xmltodict>=0.13.0
37
+ Requires-Dist: zarr>=3.0.0
38
+ Provides-Extra: dev
39
+ Requires-Dist: mypy>=1.5.0; extra == 'dev'
40
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
41
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
42
+ Requires-Dist: ruff>=0.0.280; extra == 'dev'
43
+ Description-Content-Type: text/markdown
44
+
45
+ # Isoview Pipeline: MATLAB -> Python
46
+
47
+ *Conversion/Validation TODO*
48
+
49
+ - [x] readKLB.m
50
+ - [x] clusterPT_RC.m
51
+ - [x] clusterPT with zarr benchmarks
52
+ - [ ] clusterMF.m
53
+
54
+ Note: Multiprocessing is not yet implemented, as it is in the MATLAB pipeline.
55
+
56
+ ---
57
+
58
+ ## `readKLB.m` -> `pyklb`
59
+
60
+ Using our fork of [pyklb](https://github.com/MillerBrainObservatory/pyklb), on [pypi](https://pypi.org/project/pyklb/).
61
+
62
+ **1. Generate MATLAB Reference**
63
+
64
+ ```bash
65
+ matlab -batch \
66
+ "run('C://Users//RBO//repos//isoview//excludes//save_matlab_klb.m')"
67
+ ```
68
+
69
+ **2. Validate with Python**
70
+
71
+ ```bash
72
+ uv run --no-sync python excludes/test_klb_matlab_python.py
73
+ ```
74
+
75
+ | File | MATLAB Shape | Python Shape | Max Diff |
76
+ |------|--------------|--------------|----------|
77
+ | SPM00_TM000000_CM00_CHN00.klb | (2048, 2048, 543) | (543, 2048, 2048) -> (2048, 2048, 543) | 0.0 |
78
+ | SPM00_TM000000_CM01_CHN00.klb | (2048, 2048, 543) | (543, 2048, 2048) -> (2048, 2048, 543) | 0.0 |
79
+ | SPM00_TM000000_CM02_CHN01.klb | (2048, 2048, 592) | (592, 2048, 2048) -> (2048, 2048, 592) | 0.0 |
80
+ | SPM00_TM000000_CM03_CHN01.klb | (2048, 2048, 592) | (592, 2048, 2048) -> (2048, 2048, 592) | 0.0 |
81
+
82
+ **Total:** 4/4 files exactly equal (100%)
83
+
84
+ - **MATLAB**: Stores volumes as `(Y, X, Z)` = `(2048, 2048, 543/592)`
85
+ - **Python pyklb**: Returns volumes as `(Z, Y, X)` = `(543/592, 2048, 2048)`
86
+
87
+ ---
88
+
89
+ ## clusterPT_RC.m
90
+
91
+ D:\W2_DATA\foconnell\isoview_development\mosquito-larva_20250930_165806.corrected\SPM00\TM000000
92
+
93
+ **File structure**
94
+
95
+ ```
96
+ project_root\
97
+ SPM00\
98
+ Background_0.tif (one per camera)
99
+ Background_1.tif
100
+ Background_2.tif
101
+ Background_3.tif
102
+ TM00000\ (one folder per timepoint)
103
+ ch0.xml (rename from ch00_spec00.xml)
104
+ ch1.xml (rename from ch01_spec00.xml)
105
+ ANG000\
106
+ SPC00_TM00000_ANG000_CM0_CHN00_PH0.stack
107
+ SPC00_TM00000_ANG000_CM1_CHN00_PH0.stack
108
+ SPC00_TM00000_ANG000_CM2_CHN01_PH0.stack
109
+ SPC00_TM00000_ANG000_CM3_CHN01_PH0.stack
110
+ ```
111
+
112
+ ```matlab
113
+ inputFolder = 'D:\W2_DATA\foconnell\isoview_development\mosquito-larva_20250930_165806';
114
+ inputType = 2;
115
+ specimen = 0;
116
+
117
+ % Run 1: Cameras 0,1 with Channel 0
118
+ cameras = [0 1];
119
+ channels = 0;
120
+
121
+ % Run 2: Cameras 2,3 with Channel 1
122
+ cameras = [2 3];
123
+ channels = 1;
124
+ ```
125
+
126
+ 1. Background TIFFs: Place in SPM00 root (one per camera)
127
+ 2. XML files: Rename ch00_spec00.xml to ch0.xml, ch01_spec00.xml to ch1.xml
128
+ 3. XML files: Copy to each TM folder (TM00000, TM00001, etc.)
129
+
130
+ ### Comparison
131
+
132
+ See the full notebook [here](https://github.com/MillerBrainObservatory/isoview/blob/master/clusterPT_comparison.ipynb)
133
+
134
+ Most of the differences happen in the non-dense regions on the edge of the FOV:
135
+
136
+ <img width="1097" height="508" alt="Image" src="https://github.com/user-attachments/assets/bf06d440-24f9-41d0-a5f7-c2f8737b7281" />
137
+
138
+ ---
139
+
140
+ ## clusterMF.m
141
+
142
+ Multi-view fusion pipeline. Python implementation in `isoview/fusion.py`.
143
+
144
+ **MATLAB equivalent**
145
+
146
+ ```matlab
147
+ inputFolder = 'D:\W2_DATA\foconnell\isoview_development\mosquito-larva_20250930_165806.corrected_python_zarr';
148
+ specimen = 0;
149
+ timepoints = 0;
150
+ cameras = [0 1 2 3];
151
+ channels = [0 1];
152
+
153
+ % Fusion parameters
154
+ fusionType = 1; % adaptive blending
155
+ blendingRange = [20 4]; % [channel, camera]
156
+ cameraPairs = [0 1; 2 3];
157
+ flipH = true;
158
+ flipV = false;
159
+ ```
160
+
161
+ **Python equivalent**
162
+
163
+ ```python
164
+ from isoview import ProcessingConfig, fuse
165
+
166
+ config = ProcessingConfig(
167
+ input_dir=Path("D:/W2_DATA/.../mosquito-larva_20250930_165806.corrected_python_zarr"),
168
+ output_dir=Path("D:/W2_DATA/.../mosquito-larva_20250930_165806.corrected_python_zarr"),
169
+ specimen=0,
170
+ timepoints=[0],
171
+ cameras=[0, 1, 2, 3],
172
+ channels=[0, 1],
173
+ fusion_enable=True,
174
+ fusion_type="adaptive_blending",
175
+ fusion_blending_range=(20, 4),
176
+ fusion_camera_pairs=[(0, 1), (2, 3)],
177
+ fusion_flip_h=True,
178
+ fusion_flip_v=False,
179
+ )
180
+
181
+ fuse(config, estimate_params=True, apply_fusion=True)
182
+ ```
183
+
184
+ ### Feature Flags
185
+
186
+ All MATLAB clusterMF features are available as config flags (disabled by default):
187
+
188
+ | Feature | MATLAB | Python Flag |
189
+ |---------|--------|-------------|
190
+ | Temporal smoothing | rloess | `fusion_temporal_smoothing=True` |
191
+ | Smoothing window | smoothingRange | `fusion_smoothing_window=100` |
192
+ | Static parameters | staticFlag | `fusion_static=True` |
193
+ | Mask fusion mode | maskFusionMode | `fusion_mask_fusion_mode=1` |
194
+ | Mask padding | padding | `fusion_mask_padding=2` |
195
+ | Small object removal | bwareaopen | `fusion_mask_min_object_size=1e-5` |
196
+ | Slab processing | slabSize | `fusion_slab_size_cameras=3` |
197
+ | Median filtering | medianFilterRange | `fusion_median_filter_range=100` |
198
+ | Gaussian precision | preciseGauss | `fusion_precise_gauss=True` |
199
+ | Lookup tables | generateLUT | `fusion_generate_lookup_table=True` |
200
+
201
+ See [MATLAB_FEATURES.md](MATLAB_FEATURES.md) for complete documentation.
202
+
203
+ ### Diagnostic Output
204
+
205
+ Pipeline generates diagnostic PNGs when `save_diagnostics=True` (default):
206
+
207
+ ```
208
+ output_dir/
209
+ diagnostics/
210
+ TM000000/
211
+ cam0_1/
212
+ registration.png
213
+ intensity_correction.png
214
+ fusion_result.png
215
+ blending_weights.png
216
+ fused_overview.png
217
+ ```
218
+
219
+ ---
220
+
221
+ ## Zarr I/O Integration and Benchmarks
222
+
223
+ **Dataset Parameters**
224
+
225
+ - Data volume: (543, 2048, 2048) uint16
226
+ - Uncompressed size: 4344.00 MB (4.242 GB)
227
+ - Pixel spacing: [2.0, 0.406, 0.406] um
228
+ - Chunk size: (10, 128, 128)
229
+
230
+ ### Quick Compression Performance
231
+
232
+ Based on a single raw `.stack` from a mosquito recorded on isoview: `mosquito-larva_20250930_165806`
233
+
234
+ | Method | Compression | Level | Write (s) | Read (s) | Size (MB) | Ratio | Write Speed (GB/s) | Read Speed (GB/s) |
235
+ |--------|-------------|-------|-----------|----------|-----------|-------|-------------------|-------------------|
236
+ | blosc-zstd-5-sharded | blosc-zstd | 5 | 42.71 | 2.55 | 1780.3 | 2.44x | 0.099 | 1.663 |
237
+ | blosc-zstd-9-sharded | blosc-zstd | 9 | 52.96 | 2.52 | 1679.5 | 2.59x | 0.080 | 1.682 |
238
+ | blosc-lz4-3-sharded | blosc-lz4 | 3 | 40.12 | 2.50 | 2205.0 | 1.97x | 0.106 | 1.698 |
239
+ | blosc-zstd-5-no-shard | blosc-zstd | 5 | 44.99 | 2.25 | 1780.3 | 2.44x | 0.094 | 1.887 |
240
+ | blosc-lz4-3-no-shard | blosc-lz4 | 3 | 44.01 | 2.50 | 2205.0 | 1.97x | 0.096 | 1.698 |
241
+ | none-sharded | none | 0 | 45.34 | 2.28 | 4344.0 | 1.00x | 0.094 | 1.863 |
242
+ | none-no-shard | none | 0 | 52.18 | 1.90 | 4344.0 | 1.00x | 0.081 | 2.237 |
243
+
244
+ ### Pipeline Compression Performance
245
+
246
+ Now, instead of converting a `.stack`, we run the full `clusterPT` pipeline and compare `.tiff`, `.klb` and `.zarr`.
247
+
248
+ From the KLB source code (`keller-lab-block-filetype/src/klb_imageIO.cpp`):
249
+
250
+ ```cpp
251
+ int BWTblockSize = 9; // maximum compression
252
+ // compress the memory buffer (blocksize=9*100k, verbose=0, worklevel=30)
253
+ int ret = BZ2_bzBuffToBuffCompress(bufferOutPtr, &sizeCompressed,
254
+ bufferIn, gcount, BWTblockSize, 0, 30);
255
+ ```
256
+
257
+ **KLB uses bzip2 with level 9** (block size 9x100k = 900,000 bytes)
258
+
259
+ ```
260
+ Testing 11 configurations:
261
+
262
+ Baselines:
263
+ KLB_bzip2_9 - KLB format with bzip2, level 9 (block size 9x100k)
264
+ TIFF_uncompressed - Uncompressed TIFF for size reference
265
+
266
+ Zarr configurations (all with sharding: 10 frames/shard, 1 frame/chunk, full FOV):
267
+ Zarr_bzip2_9 - bzip2 level 9 (match KLB)
268
+ Zarr_zstd_6 - blosc-zstd at level 6
269
+ Zarr_zstd_9 - blosc-zstd at level 9
270
+ Zarr_lz4_6 - blosc-lz4 at level 6
271
+ Zarr_lz4_9 - blosc-lz4 at level 9
272
+ Zarr_lz4hc_6 - blosc-lz4hc at level 6
273
+ Zarr_lz4hc_9 - blosc-lz4hc at level 9
274
+ Zarr_gzip_6 - gzip at level 6
275
+ Zarr_gzip_9 - gzip at level 9
276
+ ```
277
+
278
+ <img width="843" height="364" alt="Image" src="https://github.com/user-attachments/assets/0764e115-b731-4075-b1e9-43997a4c11d7" />
279
+
280
+ ## Compression Benchmark Results
281
+
282
+ Tested on dataset: (543, 2048, 2048) uint16, ~4.24 GB uncompressed
283
+
284
+ | Format | Compression | Level | Size (MB) | Ratio | vs Uncompressed |
285
+ |--------|-------------|-------|-----------|-------|-----------------|
286
+ | **KLB_bzip2_9** | bzip2 | 9 | 1107.99 | **3.92x** | **74.5% reduction** |
287
+ | Zarr_bzip2_9 | bzip2 | 9 | 1127.56 | 3.85x | 74.0% reduction |
288
+ | Zarr_zstd_9 | blosc-zstd | 9 | 1255.15 | 3.46x | 71.1% reduction |
289
+ | Zarr_zstd_6 | blosc-zstd | 6 | 1297.95 | 3.35x | 70.1% reduction |
290
+ | Zarr_lz4hc_9 | blosc-lz4hc | 9 | 1332.07 | 3.26x | 69.3% reduction |
291
+ | Zarr_lz4hc_6 | blosc-lz4hc | 6 | 1337.21 | 3.25x | 69.2% reduction |
292
+ | Zarr_gzip_9 | gzip | 9 | 1434.98 | 3.03x | 67.0% reduction |
293
+ | Zarr_gzip_6 | gzip | 6 | 1457.96 | 2.98x | 66.4% reduction |
294
+ | Zarr_lz4_9 | blosc-lz4 | 9 | 1517.57 | 2.86x | 65.1% reduction |
295
+ | Zarr_lz4_6 | blosc-lz4 | 6 | 1519.42 | 2.86x | 65.0% reduction |
296
+ | TIFF_uncompressed | none | - | 4344.13 | 1.00x | - |
297
+
298
+ ---
299
+
300
+ ## Module Overview
301
+
302
+ ### Core Pipeline
303
+
304
+ | Module | Description | Key Functions |
305
+ |--------|-------------|---------------|
306
+ | `pipeline.py` | Main processing orchestrator | `IsoviewProcessor`, `process_dataset()` |
307
+ | `config.py` | All configuration flags | `ProcessingConfig` dataclass |
308
+ | `io.py` | File I/O (klb, tiff, zarr, stack) | `read_volume()`, `write_volume()`, `read_xml_metadata()` |
309
+ | `array.py` | Lazy loader for processed data | `IsoviewArray` class |
310
+
311
+ ### Image Processing
312
+
313
+ | Module | Description | Key Functions |
314
+ |--------|-------------|---------------|
315
+ | `corrections.py` | Dead pixel detection/correction | `correct_dead_pixels()`, `estimate_background()` |
316
+ | `segmentation.py` | Foreground segmentation | `segment_foreground()`, `fuse_masks()`, `create_coordinate_masks()` |
317
+ | `transforms.py` | Geometric transforms | `rotate_volume()`, `flip_volume()`, `crop_volume()`, `estimate_registration()`, `apply_registration()` |
318
+
319
+ ### Fusion Pipeline
320
+
321
+ | Module | Description | Key Functions |
322
+ |--------|-------------|---------------|
323
+ | `fusion.py` | Multi-view fusion | `fuse()`, `blend_views()` |
324
+ | `temporal.py` | Temporal parameter processing | `smooth_parameters_rloess()`, `apply_temporal_averaging()`, `create_lookup_table()` |
325
+ | `masks.py` | Mask processing for fusion | `combine_masks()`, `pad_mask_to_center()`, `apply_bwareaopen()` |
326
+ | `intensity.py` | Intensity correction/filtering | `apply_median_filter()`, `apply_gauss_filter()` |
327
+
328
+ ### Utilities
329
+
330
+ | Module | Description | Key Functions |
331
+ |--------|-------------|---------------|
332
+ | `viz.py` | Diagnostic visualization | `plot_projections()`, `plot_registration_result()`, `plot_fusion_result()`, `plot_volume_overview()` |
333
+
334
+ ### Public API
335
+
336
+ ```python
337
+ from isoview import (
338
+ ProcessingConfig, # configuration dataclass
339
+ IsoviewProcessor, # main processor class
340
+ process_dataset, # process clusterPT pipeline
341
+ fuse, # run clusterMF fusion
342
+ blend_views, # blend two registered views
343
+ temporal, # temporal processing submodule
344
+ viz, # visualization submodule
345
+ )
346
+ ```
347
+
348
+ ### IsoviewArray
349
+
350
+ Lazy loader for processed data with napari/visualization tool compatibility:
351
+
352
+ ```python
353
+ from isoview.array import IsoviewArray
354
+
355
+ arr = IsoviewArray("path/to/output/TM000000")
356
+
357
+ # Shape: (Z, Views, Y, X) for single timepoint
358
+ # Shape: (T, Z, Views, Y, X) for multi-timepoint
359
+ print(arr.shape) # (543, 4, 2048, 2048)
360
+ print(arr.views) # [(0, 0), (1, 0), (2, 1), (3, 1)]
361
+ print(arr.metadata) # microscope metadata dict
362
+
363
+ # Lazy indexing
364
+ frame = arr[100, 0] # single Z-slice, first view
365
+ volume = arr[:, 0] # full Z-stack, first view
366
+
367
+ # Access labels/projections (consolidated structure)
368
+ mask = arr.get_labels(timepoint=0, camera=0, label_type='segmentation')
369
+ proj = arr.get_projection(timepoint=0, camera=0, proj_type='xy')
370
+ ```