make_point_cloud_from_state_file - jaybgager/tracertools GitHub Wiki
This function generates a point cloud as an OBJ file from a specified point annotation layer in a locally-stored 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(string, mandatory)- the absolute path to the neuroglancer JSON state file to pull annotations from
- e.g. "/home/username/ng_jsons/state.json"
layer_name(string, mandatory)- the name of the point annotation layer to pull from, e.g.
"annotation1"
- the name of the point annotation layer to pull from, e.g.
output_path(string, mandatory)- the absolute path to the folder where you want to save the OBJ output file, e.g. '/home/username/ng_meshes'
- file will be named whatever the layer name was in the JSON state
Returns: OBJ file will be created in chosen directory
Example
The code below will create a point cloud OBJ file in the /home/user/point_clouds directory called annotation1.obj using the annotation layer annotation1 of the state.json file in the directory /home/user/ng_states.
INPUT:
import tracertools as tt
tt.make_point_cloud_from_state_file(
datastack = "brain_and_nerve_cord",
json_path = "/home/user/ng_states/state.json",
layer_name = "annotation1",
output_path = "/home/user/point_clouds",
)