google / google/neuroglancer

How to view a SWC file on Neuroglancer?

Open
#207 27 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
389
Avg merge
3d 21h
Merged PRs (30d)
3

Description

Hi,

I am trying to view a SWC file but cannot seem to figure out how to configure or required steps to view it. I am getting unsupported data source error. Could you please help me to a good example to look at? I am also sharing a sample SWC file. Thanks.

https://drive.google.com/file/d/1zOWpYvHtxArdXTO8Q3FGZ8DugmdCu8d5/view?usp=sharing

![Screen Shot 2020-03-10 at 5 31 10 PM](https://user-images.githubusercontent.com/47464840/76370806-4b6a7900-62f5-11ea-9277-5dda2fdc04d2.png)

{
"dimensions": {
"x": [
0.01309425,
"m"
],
"y": [
0.02506075,
"m"
],
"z": [
0.000219,
"m"
]
},
"crossSectionScale": 0.04566210045662101,
"projectionOrientation": [
-0.18240146338939667,
-0.22431287169456482,
0.6762499809265137,
0.6775687336921692
],
"projectionScale": 93.51598173515983,
"layers": [
{
"type": "image",
"source": {
"url": "swc://http://localhost:9000/test.swc",
"subsources": {
"default": true,
"bounds": true
},
"enableDefaultSubsources": false
},
"tab": "source",
"opacity": 1,
"blend": "default",
"shader": "#uicontrol vec3 color color(default=\"white\")\n#uicontrol float min slider(default=0, min=0, max=1, step=0.01)\n#uicontrol float max slider(default=1, min=0, max=1, step=0.01)\n#uicontrol float brightness slider(default=0, min=-1, max=1, step=0.1)\n#uicontrol float contrast slider(default=0, min=-3, max=3, step=0.1)\n\nfloat scale(float x) {\n return (x - min) / (max - min);\n}\n\nvoid main() {\n emitRGB(\n color * vec3(\n scale(\n toNormalized(getDataValue()))\n + brightness) * exp(contrast)\n );\n}",
"shaderControls": {
"color": "#fff7f6",
"min": 0.52,
"max": 0.68,
"brightness": 0.4,
"contrast": 0.2
},
"name": "swc"
}
],
"selectedLayer": {
"layer": "Nissl",
"visible": true,
"size": 612
},
"layout": "4panel",
"statistics": {
"visible": true
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.