Open manoaman opened 3 years ago
There is no specific limit, but depending on how they are chunked and the resolution/zoom level you may run into browser memory limits if you are attempting to display all of them simultaneously.
If your chunks are 2d , meaning all but 2 dimensions have a size of 1, and appropriately aligned to your cross-section views, you will need much less memory than if you use 3d or higher-d chunks.
You may also find that the layer bar takes up too much space --- that could probably be fixed easily enough. The memory limits will be harder to get around.
Hi jbms,
Somewhat related to this overlay question, I was assuming that with the current version of the Neuroglancer, I can overlay a segmentation layer and a skeleton layer if they are positioned correctly. In other words, registered correctly. And I was wondering if you could advise me on a visualization which involves nrrd (segmentations) files and swc (skeletons) files which I believe they can be visualized on the Neuroglancer platform. I suppose they can be overlayed once converted into precomputed format. Maybe certain features are already there and I may have overlooked, and I was hoping you could correct me if I'm wrong. Here are questions I was hoping you could advise me if you know.
Questions:
Can the Neuroglancer overlay Skeleton(s) layer(s) on a collection of segmentation mesh objects?
Would it be possible to change the opacity levels of the segmented mesh objects so that the skeleton can be identified inside the mesh?
Converting a swc to a precomputed file format can be done with CloudVolume. However, would it make more sense to prepare tiff or a binary image instead of individual swc files? And then chunk the files into precomputed format?
Is there an open source software which takes a collection of swc files and converts them into a tiff stack or some other formats so that it can later processed from precomputed format? (Maybe an off topic here, sorry.)
Perhaps swc files are not suitable for the visualization with mesh objects. Should I find an approach to convert them into segmentations of a tiff stack or a binary image instead? (Maybe an off topic here, sorry.)
Is there a good public example of an overlay of a segmentation and a skeleton layers?
I'm still researching into swc formats and trying to figure out what data formats are better suited in visualizing on the Neuroglancer platform.
Thank you for your time and advise! -m
swc: http://www.neuronland.org/NLMorphologyConverter/MorphologyFormats/SWC/Spec.html nrrd: https://en.wikipedia.org/wiki/Nrrd#:~:text=Nrrd%20(%22nearly%20raw%20raster%20data,visualization%20and%20image%20processing%20applications.
Yes you can overlay skeletons over segmentation meshes and reduce opacity of meshes so that you can see skeletons inside.
If you want to display skeletons, then converting to precomputed format from swc is probably the simplest thing to do. I don't see how converting to tiff and then presumably volumetric precomputed format would help there.
Thank you for the example jbms! I will have a look at it.
@jbms
Somewhat related to that:
Neuroglancer can display 2d cross sections of arbitrary nd data sources, including 4d xyzt volumes. You can display 2d and 3d sources overlaid or side by side. There is also experimental 3d volume rendering support.
Hello @jbms
Does Neuroglancer support showing sections in 3d layout? Currently, I don't see a way to check "Sections" or use a shortcut "s: toggle-show-sections" to make three xyz image planes appear. I was asked about a use case where the user only wants to look at the lower-left of the 4panel layout and view the segmentation on an image in a single large panel. Will the workaround be using either xy-3d, yz-3d, or xz-3d layout?
Normally, when showing cross sections in the 3d view, the cross sections are exactly what is shown in the other cross section panels.
Currently, there isn't a UI option for showing cross sections in the 3d view when the cross section panels aren't shown, but it can be enabled through the JSON state / Python API:
https://github.com/google/neuroglancer/blob/master/python/examples/example_cross_section.py
I tried adding something like the following segment from the GUI "{}" but the "cross_sections" seems to get ignored and disappears. Could I be doing wrong?
"layout": "3d",
"cross_sections":{
"a":{
"width":1000,
"height":1000,
"position":[
2914.478759765625,
3336.535400390625,
11248.5
],
"orientation":[
0.6853626370429993,
0.07270946353673935,
0.11450875550508499,
0.7154572606086731
],
"scale":6.491028727518084
}
}
It should be:
"layout": {"type": "3d", "crossSections": {"a": {"width": 1000, "height": 1000}}}
If you want to specify position, orientation, or scale, they should be:
"position": {"link": "unlinked", "value": [3000, 3000, 4000]}
In place of "unlinked"
you can also specify "relative"
How do I make yz and xz sections appear also? Do I need to specify other than b
or c
?
"layout": {"type": "3d", "crossSections": {"a": {"width": 1000, "height": 1000},"b": {"width": 1000, "height": 1000},"c": {"width": 1000, "height": 1000}}}
You need to specify an orientation as well.
I tried both inside and outside the "crossSections", and both json reverts back to "4panel" layout. Should the orientation specified differently?
"layout": {
"type": "3d",
"crossSections": {
"a": {
"position": {
"link": "unlinked",
"value": [
0,
0,
0
]
},
"orientation": [1,0,0,0]
},
"b": {
"position": {
"link": "unlinked",
"value": [
0,
0,
0
]
},
"orientation": [0,1,0,0]
},
"c": {
"position": {
"link": "unlinked",
"value": [
0,
0,
0
]
}
},
"orientation": [0,0,1,0]
}
}
"layout": {
"type": "3d",
"crossSections": {
"a": {
"position": {
"link": "unlinked",
"value": [
5848,
4349,
7823
]
},
"orientation": [1,0,0,0]
}
}
}
The orientation works the same as position, so you also need to have nested link
and value
members.
Agh, I didn't think about that. Figured it out. Much appreciated @jbms !!
"layout": {
"type": "3d",
"crossSections": {
"a": {
"position": {
"link": "unlinked",
"value": [0,0,0]
},
"orientation": {
"link": "relative",
"value": [1,1,0,0]
}
},
"b": {
"position": {
"link": "unlinked",
"value": [0,0,0]
},
"orientation": {
"link": "relative",
"value": [0,1,1,0]
}
},
"c": {
"position": {
"link": "unlinked",
"value": [0,0,0]
},
"orientation": {
"link": "unlinked",
"value": [1,0,1,0]
}
}
}
}
Could this feature experimental? I see occasionally one cross section (usually "c" in my case), gets disoriented or removed from switching layouts, zoom in/out or navigation on x,y,z from the upper left navigator bars. Not quite sure what's triggering to reset "orientation" for "c" at times.
It is possible there is a bug --- I don't think that feature has been used heavily.
If you can figure out how to reliably reproduce the issue that would help in resolving it.
My original intention was to position three planes in the center of axis lines. The obvious issue that I see is with the position of the "c" plane, and in some cases showing multiple "c"? planes. Here are the steps I reproduced on the demo site.
"layout": {
"type": "3d",
"crossSections": {
"a": {
"position": {
"link": "unlinked",
"value": [0,0,0]
},
"orientation": {
"link": "unlinked",
"value": [1,1,0,0]
}
},
"b": {
"position": {
"link": "unlinked",
"value": [0,0,0]
},
"orientation": {
"link": "unlinked",
"value": [0,1,1,0]
}
},
"c": {
"position": {
"link": "unlinked",
"value": [0,0,0]
},
"orientation": {
"link": "unlinked",
"value": [1,0,1,0]
}
}
}
}
"layout": {
"type": "3d",
"crossSections": {
"a": {
"position": {
"link": "unlinked",
"value": [
3132.5,
3321.5,
3954.5
]
},
"orientation": {
"link": "relative",
"value": [
0.7071067690849304,
0.7071067690849304,
0,
0
]
}
},
"b": {
"position": {
"link": "unlinked",
"value": [
3132.5,
3321.5,
3954.5
]
},
"orientation": {
"link": "relative",
"value": [
0,
0.7071067690849304,
0.7071067690849304,
0
]
}
},
"c": {
"position": {
"link": "unlinked",
"value": [
0,
0,
0
]
},
"orientation": {
"link": "unlinked",
"value": [
0.7071067690849304,
0,
0.7071067690849304,
0
]
}
}
}
}
{
"dimensions": {
"x": [
8e-9,
"m"
],
"y": [
8e-9,
"m"
],
"z": [
8e-9,
"m"
]
},
"position": [
3132.5,
3321.5,
3954.5
],
"crossSectionScale": 4,
"projectionOrientation": [
-0.10855773091316223,
0.18556760251522064,
0.11640383303165436,
0.9696546196937561
],
"projectionScale": 12151.283495145528,
"layers": [
{
"type": "image",
"source": "precomputed://gs://neuroglancer-public-data/flyem_fib-25/image",
"tab": "source",
"name": "image"
}
],
"selectedLayer": {
"visible": true,
"layer": "image"
},
"layout": {
"type": "4panel",
"crossSections": {
"a": {
"position": {
"link": "unlinked",
"value": [
3132.5,
3321.5,
3954.5
]
},
"orientation": {
"link": "unlinked",
"value": [
0.7071067690849304,
0.7071067690849304,
0,
0
]
}
},
"b": {
"position": {
"link": "unlinked",
"value": [
3132.5,
3321.5,
3954.5
]
},
"orientation": {
"link": "unlinked",
"value": [
0,
0.7071067690849304,
0.7071067690849304,
0
]
}
},
"c": {
"position": {
"link": "unlinked",
"value": [
0,
0,
0
]
},
"orientation": {
"link": "unlinked",
"value": [
0.7071067690849304,
0,
0.7071067690849304,
0
]
}
}
}
}
}
Hi,
Is there a limit to number of layers loaded simultaneously in Neuroglancer? For example, has there been a use case where 10~20 layers of volumetric or 2D image slices, identical in sizes, are overlayed one another?
Thanks, m