Neural-Systems-at-UIO / nutil

https://nutil.readthedocs.io/en/latest/
GNU General Public License v3.0
12 stars 5 forks source link

JSON file missing some objects? #320

Open jelrod14 opened 1 month ago

jelrod14 commented 1 month ago

This may be a somewhat niche issue, but still looking to see if you can provide some insight. I am using the quint pipeline to register my stained sections and then Ilastik pixel classifier+ object classifier to segment a plasticity marker. I get the xy coordinate of each instance of this marker, and then want to map it back onto my registered sections to get subregion information. The goal is whole brain analysis of my marker, so i care about the z coordinate position of each subregion, as they can shift based on human error and such. I used a script to extract the average z position of each region from the json file of each image. My issue arises here, where some regions do not appear to be labeled in the json file, despite the csv generated having objects within those regions. for example the retrosplenial area, one of my ROI will show up in my object report but not be named in the json file, leaving me unable to get the z position for these objects/the average for the region. I did come across the box below when looking into the documentation, and thought that this could be the source of my issue: image

Does this mean that using a custom xlsx file could solve the issue described above? Sorry if my question is somewhat confusing, and I can provide more context/data examples if needed. Thanks! Jacob

jelrod14 commented 1 month ago

Okay, I have actually figured out the source of the problem, so hopefully this will make my issue much more straight forward: When we generate our custom regions text file from qc align including a lot of regions of the brain, all looks good and all of our regions are included. Then when we run nutil for our custom report, we get a lot of errors saying "Error when reading colour data in sheet": (0) is not correct colour format." Then when I open the json file, a lot of regions are not included in the file. It appears that it stops incorporating the data into the json for all of the regions after a specific number of regions, despite the text file having way more than that number (seems like 125 is its stopping point, but havent tested this number further). I'm not sure if this is an error in the code or a user error that I could remedy. Thanks! Jacob

sharoncy commented 1 month ago

Hi Jacob. Sorry to hear you're having problems. I don't fully understand what you're trying to do, but I'll do my best to help. To get a better understanding of your issue, it would help if you would send me some examples files. Then I can try to replicate the issue on my side. I would need your JSON file from QuickNII or VisuAlign, a few atlas maps and corresponding segmentations (I don't need the whole dataset, just files from a few sections), your .NUT file from Nutil (this specifies your Nutil parameters), and the customregion file from QCAlign. Please send to "support@ebrains.eu", specifying that the ticket should go to the "Brain Atlases" support group and "Sharon Yates". Thanks!

jelrod14 commented 1 month ago

@sharoncy Just sent!