https://github.com/aplbrain/reconstruct2stack
A Python library to convert Reconstruct or PyReconstruct segmentation contours to image mask stacks.
https://github.com/aplbrain/reconstruct2stack
Last synced: 10 months ago
JSON representation
A Python library to convert Reconstruct or PyReconstruct segmentation contours to image mask stacks.
- Host: GitHub
- URL: https://github.com/aplbrain/reconstruct2stack
- Owner: aplbrain
- License: apache-2.0
- Created: 2023-03-05T03:26:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T18:58:56.000Z (over 3 years ago)
- Last Synced: 2025-03-15T09:22:39.894Z (over 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reconstruct2stack
[Reconstruct](https://github.com/SynapseWeb/PyReconstruct) is a connectomics segmentation and annotation tool. Reconstruct exports its annotations in the form of JSON-encoded contours, in a .jser file. This library reads .jser files and outputs a standard image-mask stack, in the form of a numpy array or image files.
## Installation
```bash
git clone https://github.com/aplbrain/reconstruct2stack
cd reconstruct2stack
poetry install
```
## Usage
```python
from reconstruct2stack import jser_to_image_stack
jser_to_image_stack(
"my-series.jser",
"segmentation-stack/",
(8192, 8192), # image size, in XY pixels
)
```
This library is a work in progress. More documentation will follow shortly.