razvanmarinescu / brain-coloring

BrainPainter - Brain Visualisation Software
57 stars 17 forks source link

Destrieux atlas failing silently if Left-Unknown/Right-Unknown is missing? #11

Closed loupl closed 3 years ago

loupl commented 3 years ago

First of all: great tool! I really like the simplicity with which you can generate high quality visualisations.

Now to a small bug I might have found. I'm using the Destrieux atlas and would like to visualise some measurements for the different ROIs. I'm not particularly interested in the subcortical regions at this stage, so I had left them out -- thankfully, the web tool raised an error suggesting that some expected columns were missing from the .csv I uploaded. I added some dummy values for these regions (based on the suggested columns highlighted as missing) and the image generation seemed to kick off without any issues. However, at the end of the process I got a warning that some images could not be generated and the logs weren't too helpful as they seemed to contain mostly lines indicating successful imports, suddenly an incomplete line and ending in Blender quit (see below).

...
Successfully imported 'models/Destrieux_atlas_pial/rh.pial.Destrieux.G_insular_short.ply' in 0.175 sec

Successfully imported 'models/Destrieux_atlas_pial/rh.pial.Destrieux.G_pariet_inf-Supramar.ply' i

Successfu

Successfully imported 'models/Destrieux_atlas_pial/rh.pial.Destrieux.G_and_S_frontomargin.ply' in 0.244 sec

Successfully imported 'models/Destrieux_atlas_pial/rh.pial.Destrieux.G_and_S_cingul-Ant.ply' in 0.485 sec
...
-------------generated/F8FA9DF9DE524ED1/F8FA9DF9DE524ED1_wrong-example.csv-------------

Blender quit

I double checked my .csv against the example you include for download on the website. The only difference I could find is that my data does not contain the [Left-Unknown, Right-Unknown] columns but I am pretty sure these weren't highlighted/included in the initial error message when actual ROIs were missing. Once I added these two columns with some dummy values to my .csv everything worked fine. This seems to be a really minor issue but it could trip up people as the initial error message indicating missing columns does not include this.

Feel free to ignore this in case I mixed up something when trying to reproduce the error -- this could well have happened. If this is an actual issue, I'm happy to look through the source and fix it once I have the time for it. Otherwise, any help/input from your side would be appreciated. Cheers!

vmallela0 commented 3 years ago

Thanks for letting us know! I just fixed this. I'll commit ASAP.

loupl commented 3 years ago

No worries at all! Thanks a lot for replying so quickly.

vmallela0 commented 3 years ago

Pushed!

I'll write something in the near future that makes it based on the config file keys rather than a hard coded version haha. Just waiting on splitting subcortical files into left/right.