Hi, I am quite impressed by the tools provided by brainglobe and I am running first tests on our 2P serial imaging data. So far I have successfully registered downsampled images from half a brain. Our original dataset involves 25 planes of images per 80 um brain slice for 76 slices. My question is: If I were to use the original data set, would brainreg downsample the original data (both in x-y and number of planes) to register images to the specified atlas but at the end provide the same number of registered atlas images to the original data provided? or would you recommend personally downsampling the data to match as close as possible to the atlas and upsample registered atlas images (both spatially and in number ) to be able to visualize the data in napari? Thanks in advance.
Just to make sure I understand, is your data 25 optical planes in each physical section? So you have 25 x 76 total optical sections?
brainreg will downsample your data to match the atlas used, and the registration results will be at that resolution. You shouldn’t need to downsample the data yourself. You can then either view the registration results overlaid with the downsampled data (and there is a napari plugin for that), or upsample the results to match the raw data. To do the latter, there is code implemented within the napari plugin, it’s just not accessible through the GUI (it’s in there for the cellfinder plugin).
Thanks Adam. Yes indeed we have 25 x 76 optical sections.
Thanks for referring to the upsampling code. Indeed at the end I would like to be able to count number of cells within specific regions of the brain so I will need to be able to explore at the raw image level. One more question (sorry if it is too trivial): The label layer that I visualize when I open the output folder in napari has the labels as numbers. How can I reach the mapping of these numbers to brain region names?
Are you planning on counting the cells manually, or using cellfinder? If the latter, the plugin will do all this for you.
Showing the brain regions isn’t yet implemented within the loader plugin, but there’s another plugin you can use in the mean time.
brainreg comes with
brainreg-segment, which should be installed into napari for you. If you open the plugin, click
Load project (sample space), and select your brainreg output, the downsampled data and the atlas will load. If you then make the atlas file visible, select the layer and hover over a brain area, it will appear in the bottom right. This code also needs to make its way into the main reader plugin (long todo list).
Alternatively, all the underlying atlas data will be found in your home directory in
.brainglobe/atlas_name. In there,
structures.csv will have the brain region <-> ID mappings.
Feel free to raise issues on github for features you need (or add them yourself and submit a PR )
I am currently exploring the tools for the developing blockface system we have. Use cases are not final yet or can be multiple at the institute level. That’s why I wanted to be able to register imaes and be able to explore them at different levels of detail/resolution, while being able to identify the brain-region we are looking at. I will definitely test the cell finder and familiarize myself with napari plugins further. I am not proficient with python (old generation here), but if we develop new features we will definitely add them.
Thanks for your help
great, get in touch whenever if you have questions. We’re developing a lot of software for serial2p data specifically.