Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export ID numbers for ClearMap2.1? #124

Open
cardinger opened this issue Jul 17, 2023 · 1 comment
Open

Export ID numbers for ClearMap2.1? #124

cardinger opened this issue Jul 17, 2023 · 1 comment

Comments

@cardinger
Copy link

Hello,

Is there any easy way to export a full list of all of the possible ClearMap2.1 ID numbers? Basically looking for an excel file of the tools > structure selector screen. Is this available?

Thanks!

@crousseau
Copy link
Collaborator

How about this ?

"""This assumes you are using the latest version (not default) of the atlas.
This is strongly advised but is not the default in the current version to keep the same behaviour as 2.0."""

import os

import ClearMap.Alignment.Annotation as annotation
import ClearMap.Settings as settings

annotation_file_path = os.path.join(settings.atlas_folder, 'ABA_25um_2017_annotation.tif')
label_file_path = os.path.join(settings.atlas_folder, 'ABA_annotation_last.json') 
annotation.initialize(annotation_file=annotation_file_path, label_file=label_file_path)


desination_file_path = os.path.expanduser('~/labels.csv')  # Replace destination here to your liking
annotation.annotation.df.to_csv(desination_file_path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants