make_objs_from_state_file - jaybgager/tracertools GitHub Wiki
This function generates convex hull meshes as OBJ files from all the point annotation layers in a local neuroglancer JSON state file.
Arguments:
datastack(string, mandatory)- the name of the CAVE datastack the JSON state is from
- for a list of datastacks currently supported with tracertools configs, use get_supported_configs
json_path(stringype, mandatory)- the absolute path to the neuroglancer JSON state file to pull annotations from
- e.g. "/home/username/ng_jsons/state.json"
output_path(type, mandatory)- the absolute path to the folder where you want to save the mesh output
- e.g. "/home/username/ng_meshes"
- will create folders where none exist
Returns:
- makes an OBJ file for each point annotation layer in the JSON state file
Example
The following code makes a folder called ng_meshes in the directory /home/user and populates it with an OBJ file of a convex hull mesh for each point annotation layer present in the JSON state file at /home/user/ng_states/state.json.
INPUT:
import tracertools as tt
tt.make_objs_from_state_file(
datastack = "brain_and_nerve_cord",
json_path = "/home/user/ng_states/state.json",
output_path = "/home/user/ng_meshes",
)