{"name":"napari-tmidas","display_name":"T-MIDAS","visibility":"public","icon":null,"categories":["Annotation","Segmentation","Acquisition"],"schema_version":"0.3.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-tmidas.get_reader","title":"Open data with T-MIDAS","python_name":"napari_tmidas._reader:napari_get_reader","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas.write_multiple","title":"Save multi-layer data with T-MIDAS","python_name":"napari_tmidas._writer:write_multiple","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas.write_single_image","title":"Save image data with T-MIDAS","python_name":"napari_tmidas._writer:write_single_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas.make_sample_data","title":"Load sample data from T-MIDAS","python_name":"napari_tmidas._sample_data:make_sample_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas._label_inspection","title":"Label Inspector","python_name":"napari_tmidas._label_inspection:label_inspector_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas.file_selector","title":"Batch Image Processing","python_name":"napari_tmidas._file_selector:napari_experimental_provide_dock_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas._file_conversion","title":"Microscopy Image Converter","python_name":"napari_tmidas._file_conversion:napari_experimental_provide_dock_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas._crop_anything","title":"Batch Crop Anything","python_name":"napari_tmidas._crop_anything:batch_crop_anything_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas._roi_colocalization","title":"Batch ROI Colocalization Analysis","python_name":"napari_tmidas._roi_colocalization:roi_colocalization_analyzer","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas._label_based_cropping","title":"Label-Based Image Cropping","python_name":"napari_tmidas._label_based_cropping_widget:napari_experimental_provide_dock_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-tmidas._frame_removal","title":"Frame Removal Tool","python_name":"napari_tmidas._frame_removal:frame_removal_widget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":[{"command":"napari-tmidas.get_reader","filename_patterns":["*.npy","*.tif","*.tiff"],"accepts_directories":false}],"writers":[{"command":"napari-tmidas.write_multiple","layer_types":["image*","labels*"],"filename_extensions":[],"display_name":""},{"command":"napari-tmidas.write_single_image","layer_types":["image"],"filename_extensions":[".npy"],"display_name":""}],"widgets":[{"command":"napari-tmidas.file_selector","display_name":"Batch Image Processing","autogenerate":false},{"command":"napari-tmidas._label_inspection","display_name":"Batch Label inspection","autogenerate":false},{"command":"napari-tmidas._file_conversion","display_name":"Batch Microscopy Image Conversion","autogenerate":false},{"command":"napari-tmidas._crop_anything","display_name":"Batch Crop Anything","autogenerate":false},{"command":"napari-tmidas._roi_colocalization","display_name":"Batch ROI Colocalization Analysis","autogenerate":false},{"command":"napari-tmidas._label_based_cropping","display_name":"Label-Based Image Cropping","autogenerate":false},{"command":"napari-tmidas._frame_removal","display_name":"Frame Removal Tool","autogenerate":false}],"sample_data":[{"command":"napari-tmidas.make_sample_data","key":"unique_id.1","display_name":"T-MIDAS"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configurations":{}},"package_metadata":{"metadata_version":"2.4","name":"napari-tmidas","version":"0.5.15","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A plugin for batch processing of confocal and whole-slide microscopy images of biological tissues","description":"\n# napari-tmidas\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-tmidas.svg?color=green)](https://github.com/MercaderLabAnatomy/napari-tmidas/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-tmidas.svg?color=green)](https://pypi.org/project/napari-tmidas)\n[![Supported Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue)](https://python.org)\n[![Downloads](https://static.pepy.tech/badge/napari-tmidas)](https://pepy.tech/project/napari-tmidas)\n[![GitHub stars](https://badgen.net/github/stars/MercaderLabAnatomy/napari-tmidas)](https://github.com/MercaderLabAnatomy/napari-tmidas/stargazers)\n[![DOI](https://zenodo.org/badge/943353883.svg)](https://doi.org/10.5281/zenodo.17988815)\n[![tests](https://github.com/MercaderLabAnatomy/napari-tmidas/actions/workflows/test_and_deploy.yml/badge.svg?branch=main)](https://github.com/MercaderLabAnatomy/napari-tmidas/actions/workflows/test_and_deploy.yml)\n[![codecov](https://codecov.io/gh/MercaderLabAnatomy/napari-tmidas/branch/main/graph/badge.svg)](https://codecov.io/gh/MercaderLabAnatomy/napari-tmidas)\n\n\n**Need fast batch processing for confocal & whole-slide microscopy images of biological cells and tissues?**\n\nThis open-source napari plugin integrates state-of-the-art AI + analysis tools in an interactive GUI with side-by-side result comparison! Transform, analyze, and quantify microscopy data at scale including deep learning - from file conversion to segmentation, tracking, and analysis.\n\n![napari-tmidas-interactive-table-example](https://github.com/user-attachments/assets/1330cc6c-18de-46f4-a7ef-e1d7ffc3970e)\n\n\n## ✨ Key Features\n\n🤖 **AI Methods Built-In**\n- Virtual staining (VisCy) • Denoising (CAREamics) • Spot detection (Spotiflow) • Segmentation (Cellpose, Convpaint) • Tracking (Trackastra, HOCT, Ultrack)\n- Auto-install in isolated environments • No dependency conflicts • GPU acceleration\n\n🔄 **Universal File Conversion**\n- Convert LIF, ND2, CZI, NDPI, Acquifer → TIFF or OME-Zarr\n- Preserve spatial metadata automatically\n\n⚡ **Batch Processing**\n- Process entire folders with one click • 40+ processing functions • Progress tracking & quality control\n- One **Dimension Order** setting, shared by every function — set it once per batch, not per function\n\n� **Interactive Workflow**\n- Side-by-side table view of original and processed images • Click to instantly compare results • Quickly iterate parameter values • Real-time visual feedback\n\n�📊 **Complete Analysis Pipeline**\n- Segmentation → Tracking → Quantification → Colocalization\n\n## 🚀 Quick Start\n\n\nSupports Python 3.11+; commands below use Python 3.12.\n```sh\n# Install napari and the plugin\nmamba create -y -n napari-tmidas -c conda-forge python=3.12\nmamba activate napari-tmidas\npip install \"napari[all]\"\npip install napari-tmidas\n\n# Launch napari\nnapari\n```\n\nThen find napari-tmidas in the **Plugins** menu. [Watch video tutorials →](https://www.youtube.com/@macromeer/videos)\n\n> **💡 Tip**: AI methods (SAM2, Cellpose, Spotiflow, etc.) auto-install into isolated environments on first use - no manual setup required!\n\n> **⚠️ Before a batch run**: set **Dimension Order** (top of the batch widget) to match your data — `TZYX` for a 3D time series, `ZYX` for a Z-stack, `TYX` for a 2D movie. Most microscopy TIFFs carry no usable axis metadata, so on `Auto` a function that builds 3D objects cannot tell Z from T: it will either stop with an error or label the same object once per Z slice. The widget reads each file's rank up front, shows it next to the dropdown, and warns before the run starts.\n\n## 📖 Documentation\n\n### AI-Powered Methods\n\n| Method | Description | Documentation |\n|--------|-------------|---------------|\n| 🎨 **VisCy** | Virtual staining from phase/DIC | [Guide](docs/viscy_virtual_staining.md) |\n| 🔧 **CAREamics** | Noise2Void/CARE denoising | [Guide](docs/careamics_denoising.md) |\n| 🎯 **Spotiflow** | Spot/puncta detection | [Guide](docs/spotiflow_detection.md) |\n| 🔬 **Cellpose** | Cell/nucleus segmentation | [Guide](docs/cellpose_segmentation.md) |\n| 🎨 **Convpaint** | Custom semantic/instance segmentation | [Guide](docs/convpaint_prediction.md) |\n| 📈 **Trackastra** | Transformer-based cell tracking | [Guide](docs/trackastra_tracking.md) |\n| 🧬 **HOCT** | Transformer-based cell tracking (Higher-Order Cell Tracking Transformer) | [Guide](docs/hoct_tracking.md) |\n| 🔗 **Ultrack** | Cell tracking based on segmentation ensemble | [Guide](docs/ultrack_tracking.md) |\n\n### Core Workflows\n\n- **[File Conversion](docs/file_conversion.md)** - Multi-format microscopy file conversion (LIF, ND2, CZI, NDPI, Acquifer)\n- **[Batch Processing](docs/all_processing_functions.md)** - All 40+ processing functions in one place\n- **[Frame Removal](docs/frame_removal.md)** - Interactive human-in-the-loop frame removal from time series\n- **[Label-Based Cropping](docs/label_based_cropping.md)** - Interactive ROI extraction with label expansion\n- **[Quality Control](docs/grid_view_overlay.md)** - Visual QC with grid overlay\n- **[Quantification](docs/regionprops_analysis.md)** - Extract measurements from labels\n\n### Advanced Features\n\n- [Batch Crop Anything](docs/crop_anything.md) - Interactive object cropping with SAM2\n- [Batch Label Inspection](docs/batch_label_inspection.md) - Manual label verification and editing, with one-click delete/relabel across all timepoints, click-to-split for merged objects, and click-to-merge-neighbors for over-segmented ones\n- [Multichannel Processing](docs/multichannel_processing.md) - Channel selection and per-channel processing\n\n## 💻 Installation\n\n### Step 1: Install napari\n\n```sh\nmamba create -y -n napari-tmidas -c conda-forge python=3.12\nmamba activate napari-tmidas\npython -m pip install \"napari[all]\"\n```\n\n### Step 2: Install napari-tmidas\n\n| Your Needs | Command |\n|----------|---------|\n| **Standard installation** | `pip install napari-tmidas` |\n| **Want the latest dev features** | `pip install git+https://github.com/MercaderLabAnatomy/napari-tmidas.git` |\n\n## 🖼️ Screenshots\n\n<details>\n<summary><b>File Conversion Widget</b></summary>\n\n<img src=\"https://github.com/user-attachments/assets/e377ca71-2f30-447d-825e-d2feebf7061b\" alt=\"File Conversion\" width=\"600\">\n\nConvert proprietary formats to open standards with metadata preservation.\n</details>\n\n<details>\n<summary><b>Batch Processing Interface</b></summary>\n\n<img src=\"https://github.com/user-attachments/assets/cfe84828-c1cc-4196-9a53-5dfb82d5bfce\" alt=\"Batch Processing\" width=\"600\">\n\nSelect files → Choose processing function → Run on entire dataset.\n</details>\n\n<details>\n<summary><b>Label Inspection</b></summary>\n\n<img src=\"https://github.com/user-attachments/assets/0bf8c6ae-4212-449d-8183-e91b23ba740e\" alt=\"Label Inspection\" width=\"600\">\n\nInspect and manually correct segmentation results.\n</details>\n\n<details>\n<summary><b>SAM2 Crop Anything</b></summary>\n\n<img src=\"https://github.com/user-attachments/assets/6d72c2a2-1064-4a27-b398-a9b86fcbc443\" alt=\"Crop Anything\" width=\"600\">\n\nInteractive object selection and cropping with SAM2.\n</details>\n\n## 📋 TODO\n\n### Memory-Efficient Streaming\n\nMost of this is done. Batch processing no longer materializes whole stacks: the worker keeps large inputs lazy and streams results back to disk block by block (256 MB budget), 15 functions map their existing body over blocks via the `@chunked` decorator, and 6 more own their I/O outright via `skip_load`. Measured end to end on a real `(31, 2, 57, 2720, 2720)` uint16 acquisition — 52 GB dense — Gamma Correction peaks at **3.15 GB RSS** in 8.8 min, byte-identical to the dense path. Convpaint prediction, Cellpose segmentation and Trackastra tracking all write per-timepoint now. The mechanism is documented in [`_chunked.py`](src/napari_tmidas/processing_functions/_chunked.py), and the behaviour is pinned by `TestZarrOutputStreaming`, `TestSplitChannelsStreaming`, `TestLazyTiffLoading`, `TestCLAHEDaskMemory` and `TestRollingBallPerPlane`.\n\nWhat is left:\n\n- **CAREamics denoising and VisCy virtual staining still run dense.** Both allocate the full output array and take the input as a NumPy array. Neither has been audited for real — that needs their dedicated virtualenvs installed.\n- **~14 registered functions still scale linearly with input size.** That is now a known list rather than an unknown one. Each needs either a `@chunked` conversion or a check that it cannot take one: functions using global statistics (`Convert to 8-bit` rescales by the whole-stack min/max) and functions with cross-block topology (`Mirror Labels`) both resist it.\n- **The structural decision.** Dense functions opt into laziness one at a time, by accepting `_source_filepath`. Whether to keep converting them individually or change the worker's contract for all of them at once is still open.\n\n### Other Known Issues\n\n- `Resize Zarr by YX Scale (OME-Zarr native)` writes **zarr v3** stores: attributes live in `zarr.json` (multiscales nested under an `ome` key), not in a v2 `.zattrs`. Anything downstream that reads `.zattrs` directly will find no file there — use [`ome_output_utils._read_root_attrs()`](src/napari_tmidas/processing_functions/ome_output_utils.py), which handles both layouts.\n\n## 🤝 Contributing\n\nContributions are welcome! Please ensure tests pass before submitting PRs:\n\n```sh\npip install tox\ntox\n```\n\n## 📄 License\n\nBSD-3 License - see [LICENSE](LICENSE) for details.\n\n## 🐛 Issues\n\nFound a bug or have a feature request? [Open an issue](https://github.com/MercaderLabAnatomy/napari-tmidas/issues)\n\n## 🙏 Acknowledgments\n\nBuilt with [napari](https://github.com/napari/napari) and powered by:\n\n**AI/ML Methods:**\n- [Cellpose](https://github.com/MouseLand/cellpose) • [Convpaint](https://github.com/guiwitz/napari-convpaint) • [VisCy](https://github.com/mehta-lab/VisCy) • [CAREamics](https://github.com/CAREamics/careamics) • [Spotiflow](https://github.com/weigertlab/spotiflow) • [Trackastra](https://github.com/weigertlab/trackastra) • [HOCT](https://github.com/royerlab/hoct) • [Ultrack](https://github.com/royerlab/ultrack) • [SAM2](https://github.com/facebookresearch/segment-anything-2)\n\n**Core Scientific Stack:**\n- [NumPy](https://numpy.org/) • [scikit-image](https://scikit-image.org/) • [PyTorch](https://pytorch.org/)\n\n**File Format Support:**\n- [OME-Zarr](https://github.com/ome/ome-zarr-py) • [tifffile](https://github.com/cgohlke/tifffile) • [nd2](https://github.com/tlambert03/nd2) • [pylibCZIrw](https://github.com/ZEISS/pylibczi) • [readlif](https://github.com/nimne/readlif)\n\n---\n\n[PyPI]: https://pypi.org/project/napari-tmidas\n[pip]: https://pypi.org/project/pip/\n[tox]: https://tox.readthedocs.io/en/latest/\n\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Marco Meer","author_email":"marco.meer@pm.me","maintainer":null,"maintainer_email":null,"license":"Copyright (c) 2025, Marco Meer\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of copyright holder nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: MacOS","Operating System :: POSIX :: Linux","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy>=1.23.0","magicgui","tqdm","qtpy","scikit-image>=0.19.0","pyqt5","zarr>=3","ome-zarr","napari-ome-zarr","nd2","pylibCZIrw","readlif","tifffile<2025.5.21,>=2023.7.4","tiffslide","acquifer-napari","psygnal>=0.9.0","ome-zarr>=0.8.0","tox; extra == \"testing\"","pytest>=7.0.0; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","pytest-timeout; extra == \"testing\"","napari; extra == \"testing\"","pyqt5; extra == \"testing\"","psygnal>=0.8.0; extra == \"testing\"","napari-tmidas[testing]; extra == \"all\""],"requires_python":">=3.11","requires_external":null,"project_url":["Bug Tracker, https://github.com/macromeer/napari-tmidas/issues","Documentation, https://github.com/macromeer/napari-tmidas#README.md","Source Code, https://github.com/macromeer/napari-tmidas","User Support, https://github.com/macromeer/napari-tmidas/issues"],"provides_extra":["testing","all"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}