Skip to content

Conversation

@LucaMarconato
Copy link

@LucaMarconato LucaMarconato commented May 1, 2025

Solution for #2.

This PR adds a pixi configuration tested on macOS (Apple Silicon).
Trying out the PR on macOS should be as simple as running pixi run demo-local. Same for other operating systems, but first one need to add the new platform in pyproject.toml.

To visualize the data with neuroglancer I installed http-server and ran

 http-server test_meshes_output --cors --port 8080

then I used this script

##
import neuroglancer

ip = "localhost"  # or public IP of the machine for sharable display
port = 9999  # change to an unused port number
neuroglancer.set_server_bind_address(bind_address=ip, bind_port=port)

viewer = neuroglancer.Viewer()
print(viewer)

##
# host locally, for instance using http-server https://github.com/http-party/http-server
# http-server test_meshes_output -p 8080 --cors
demo_data = "precomputed://http://127.0.0.1:8080/multires"

with viewer.txn() as s:
    s.layers["meshes"] = neuroglancer.SegmentationLayer(source=demo_data)
    s.layers["meshes"].segments = [1, 2]

davidackerman and others added 22 commits October 15, 2021 20:47
Add ngmesh reader, new pyfqmr source and update readme
add additional extension as .ng for .ngmesh
Refactor configuration and dask parallelization
updates to fix crashing for large meshes
Fix issue where meshes get compressed to nothing
Updates to speed up distributed tasks
modify how grid_offset is calculated
allow loading of json meshes, which required copying due to read only…
@davidackerman
Copy link
Collaborator

thanks so much! ill take a look in the near future. also take a look at igneous. igneous seems great, but many of my other repositories rely on dask, so i have been incorporating code from igneous into a new repository (with some other methods i find useful). I hope to include multires in there as well so ultimately one can go straight from segmentations to multires meshes. i will try to update once completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants