Open atomized1 opened 3 years ago
You will need to do some metadata wrangling:
mesh
key to /info
json file. The value of which can be arbitary, but will inform ng in which subfolder to retrieve the mesh(es) /{MY_MESH_DIR}/info
with the content being {"@type": "neuroglancer_legacy_mesh"}
(per spec ){LABEL_INDEX}:0
. e.g. /{MY_MESH_DIR}/1:0
/{MY_MESH_DIR}/128:0
etc. fragments
, value as array of string. e.g. /{MY_MESH_DIR}/1:0
contains text {"fragments": ["label_index_1_mesh1", "label_index_1_mesh2"]}
Then, in the viewer side, on select a fragment (hover and double click on a fragment), you should see the mesh loading.
If not, check the console, it should give you some hint on what went wrong.
Thank you so much for your help. I can see that it is looking for a file with a name like 1:0. I am on a windows machine, and cannot name a file that. Is there an alternative way of formatting this?
I hadn't thought about the issue of colons on Windows. Currently there is not, though it would probably make sense to add an option to the precomputed format metadata to do that. The :0
was originally intended to support multiple levels of detail, but that was later implemented a different way.
However, it turns out that the Windows NTFS filesystem supports something called "alternate data streams" which is indicated by filename:stream
. So I think you can actually create a stream named "0" of a file named "12345" which will be opened with the path "12345:0". When you list the directory, it will just show "12345".
@atomized1 if you are using the nginx config either from https://github.com/HumanBrainProject/neuroglancer-docker or https://hub.docker.com/r/ylep/neuroglancer , you can instead name the file 1
, 12345
the nginx conf takes care of the :0
part
jbms's solution worked, and it can now see the file. It read the 1:0 file and looks for the files mentioned under fragments. My last question is just if examples of these fragment files are available so I can see if I am formatting mine correctly.
I generated precomputed labels based on nifti files using neuroglancer-scripts. Is there a way I can generate meshes using these in neuroglancer to also be displayed?
Currently my output looks like this