24f2001927/Neuroglancer-ROI-API — reverse-engineered prompt
Reverse engineered prompt
Build me a Python tool for extracting small 3D regions from large Neuroglancer compatible volume datasets.
I want to run a local API server, load a remote or local volume URL, open it in a browser viewer, then save a small cube of data centered on a coordinate. It should work both from an API call where I send x, y, z, and from the viewer by hovering over a point and pressing X. Save each extracted cube as a NumPy file in an extracted folder, with the coordinates in the filename.
After extraction, show the saved region back in the Neuroglancer viewer as its own layer so I can quickly confirm it worked. Also include a simple Jupyter notebook that lets me open one of the saved .npy files and scroll through slices with a slider.
Please include clear setup and run instructions for Windows, including loading a sample public Neuroglancer dataset and optionally serving a local folder over HTTP if needed.
Want more depth? Deep Reverse