Volume of each brain region in mutants


First of all, I want to thank you for all of the work ! It’s amazing :slight_smile:
I’m not an expert of coding and you make it easy to understand.
I have a question about cellfinder and Napari :

I have a lot of different transgenic lines and I know that with cellfinder we can have the volume of each brain areas. Imagine I have a mutant without one area (for exemple suprachiasmatic nucleus), do you think that it will be detected with the software and that it will not be a problem to register on the atlas?
Thank you a lot.


1 Like

Hi Amin,

Great to hear the tools are working out for you!

The short answer to your question is that, unfortunately, it depends. You may get very good registration and the area in question will be warped so much it is either tiny, or doesn’t exist. Alternatively, that region may get wrongly assigned to another part of the brain.

The only way to know is to test it with your data. You’ll probably need to play with the registration parameters (particularly the non-linear freeform ones) to get good registration with non-standard brains.


Thank you for the quick response! So if I understand correctly, in any case, there will be a modification of one of the regions (either it will be too distorted and will have an outlier value or it will be included in another region). All in all, if I understand well, there will be a strange information if I compare to a wild type brain ? So I could use cellfinder to detect this type of error and then come back in more detail if I see an outlier? Thanks again!

So the (non-existant) brain region will continue to exist in the warped atlas image, but if the registration works well, it will be shrunk so much that very few (or no) voxels in your sample brain will be included within it. If the registration doesn’t work well, then some other parts of the brain will be (wrongly) assigned to that missing region.

Either way, that region of the atlas won’t just be deleted, but it may be so small as to be effectively removed. The only way to see if it works is to test it with your data.

Does this make sense?

Continuing the discussion from Volume of each brain region in mutants:


Yes thank you for your answer ! It makes sense :slight_smile:
I wanted to test before to answer you but I have a problem… I tried cellfinder with the DATA that you give them in the tutorial it works well but when I try avec my own DATA, it’s impossible to read … I don’t know what to do …

If you have any ideas ? I put the error message that I received below. Thank you again for all of your advices !

**** error****

Traceback (most recent call last):
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\concurrent\futures\process.py”, line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\site-packages\imio\load.py”, line 434, in load_from_paths_sequence
img = tifffile.imread(p)
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\site-packages\tifffile\tifffile.py”, line 784, in imread
return tif.asarray(**kwargs)
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\site-packages\tifffile\tifffile.py”, line 3121, in asarray
result = stack_pages(pages, out=out, maxworkers=maxworkers)
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\site-packages\tifffile\tifffile.py”, line 15276, in stack_pages
out = create_output(out, shape, dtype)
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\site-packages\tifffile\tifffile.py”, line 15354, in create_output
return numpy.zeros(shape, dtype)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 49.7 GiB for an array with shape (6366, 2048, 2048) and data type uint16
“”"OME series: failed to read ‘12-00-13_Test_Brain_TH_AUTOFLUOl_2um_x0-63_Ultra_C01_xyz-Table Z3168.ome.tif’

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
OME series: failed to read ‘12-00-13_Test_Brain_TH_AUTOFLUOl_2um_x0-63_Ultra_C01_xyz-Table Z3169.ome.tif’
File “c:\users\idlv3\anaconda3\envs\brainrender\lib\runpy.py”, line 193, in _run_module_as_main
OME series: failed to read ‘12-00-13_Test_Brain_TH_AUTOFLUOl_2um_x0-63_Ultra_C01_xyz-Table Z3170.ome.tif’

Could you attach the log file created? It should be something like brainreg_XXXXX.log.

I think it’s this document :slight_smile:
Thank you for the rapid answer !
I have only brainrender.json not .log …


Sorry, I assumed you were using brainreg and not cellfinder (BTW you only need cellfinder if you’re doing cell counting, brainreg can be used if you’re just doing registration).

The json file shows that you set the voxel sizes to 5x2x2 micron. Is this correct? I only ask because it’s the same as the tutorial data.


Yes I did a mistake effectively. I did an acquisition on the ultramicroscope and I used a Z-step of 2micron and my pixel size is 5.16. So if I understood well I need to put : 2x5.16x5.16 ? is it correct ?
Thank you

Yep that’s correct.

Is your orientation correct? You used psl which is the same orientation as the sample data too.

And yes, I want to use cellfinder to count cells (TH staining). I want to present the next week in my journal club your article and that we can use your protocol in our lab :slight_smile:

Normaly my computer is ok because I test with the data of the tutorial and it works well. I think the orientation is good because I did an horizontal acquisition and I have psl orientation

Sounds great, let me know if you (or anyone in the lab) needs any help!

If your data was acquired horizontally (i.e. dorso-ventrally), then it won’t be psl unless reoriented. psl is a coronal acquisition, acquired rostro-caudally.

Hello, thank you for your help, I will present your paper tommorow during the journal club but I didn’t succed to implement my DATA.
We use a light-sheet microscope and when I try to use cellfinder it didn’t work … And I think I don’t get also how bg-space works…
Thank you !
I really think cellfinder will change the way to do analysis so thank you for that :slight_smile: