Viewing mesh vtk

93 views
Skip to first unread message

afried...@gmail.com

unread,
Jul 11, 2019, 12:17:18 PM7/11/19
to Neuroglancer
I am currently trying to view a vtk mesh in the UI. I'm trying to follow this example:
In this example the channel displaying the red mesh is using a vtk format.  I was able to verify this by opening the config settings on the page and looking at the layer information. When I try to add a new channel and use vtk as a datasource, I get the error "Unsupported data source vtk." When I try to add a vtk file through adding a new layer in the config json, nothing shows. I read somewhere that vtk is a legacy format. How do I get this mesh displayed? If I can't use a vtk file is there another option other than the precomputed format?

Jeremy Maitin-Shepard

unread,
Jul 11, 2019, 12:35:50 PM7/11/19
to afried...@gmail.com, Neuroglancer
VTK is supported as in the example you showed, but it cannot be added through the UI.

Instead, you need to modify the JSON state directly, to add a layer specification like in the example: (note the layer type is "mesh")

    {
      "type": "mesh",
      "source": "vtk://https://storage.googleapis.com/neuroglancer-fafb-data/elmr-data/FAFB.surf.vtk.gz",
      "vertexAttributeSources": [],
      "shader": "void main() {\n  emitRGBA(vec4(1.0, 0.0, 0.0, 0.5));\n}\n",
      "name": "neuropil-full-surface"
    }

Some VTK formats may not be supported.  Check the developer console to see if there are any errors.

--
You received this message because you are subscribed to the Google Groups "Neuroglancer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neuroglancer...@googlegroups.com.
To post to this group, send email to neurog...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/neuroglancer/157ae48a-970d-4757-ab96-c94943fe1238%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages