convert_structure_json_to_csv#

brainglobe_atlasapi.atlas_generation.structure_json_to_csv.convert_structure_json_to_csv(structure_json_path, destination_path=None, root=997)[source]#

Convert an atlas structure JSON file to CSV format.

This function converts a JSON dictionary of atlas structures into a CSV format, which can be useful for compatibility with tools like cellfinder and for easier data browsing.

Parameters:
  • structure_json_path (str or Path) – Path to the input JSON file containing the structure data.

  • destination_path (str or Path, optional) – Where to save the resulting CSV file. If None, the CSV file will be saved in the same directory as the JSON file with a .csv extension.

  • root (int, optional) – The ID value for the root (whole brain) structure, used when determining parent IDs. By default, 997.