Page 1 of 1

Multi Subject Sulci Snapshot Board

Posted: Fri Jul 24, 2015 4:04 pm
by f4bry
Hello,

I would like to use the 'Multi Subject Sulci Snapshot Board' module to check the sulci recognition results on several subjects. I've obtained the following error:

Cannot start command 'convert' '-resize' '500' '/tmp/bv_16384_60.jpg' '/tmp/bv_16384_60.jpg' : No such file or directory
Try to restart the command...
Cannot start command 'convert' '-resize' '500' '/tmp/bv_16384_60.jpg' '/tmp/bv_16384_60.jpg' : No such file or directory
Try to restart the command...
Cannot start command 'convert' '-resize' '500' '/tmp/bv_16384_60.jpg' '/tmp/bv_16384_60.jpg' : No such file or directory
Traceback (most recent call last): File "/Applications/brainvisa/bin/real-bin/autocrop.py", line 62, in <module>
main() File "/Applications/brainvisa/bin/real-bin/autocrop.py", line 55, in main img = Image.open(input) File "/Applications/brainvisa/lib/python2.6/site-packages/PIL/Image.py", line 1980, in open
raise IOError("cannot identify image file") IOError: cannot identify image file


I get the same error on Mac OS X 10.10 and on a linux machine.
Is there any setting that I am missing?

Thank you,
Fab

Re: Multi Subject Sulci Snapshot Board

Posted: Mon Jul 27, 2015 1:53 pm
by riviere
Hi Fab,

Oh you're right, this process makes use of the "convert" command, which is part of the ImageMagick package, which we dont ship with the BrainVisa distribution. You can install it easily on Linux (I don't know for Mac, but I guess that there should exist some packaging of it ?)

Alternatively, the newer "snapbase" tool in BrainVisa offers more flexible ways to make database-wide snapshots of sulci, segmentations, or other views.

Denis

Re: Multi Subject Sulci Snapshot Board

Posted: Mon Jul 27, 2015 5:49 pm
by f4bry
Hi Denis,

I have installed ImageMagick and now I don't have any error from the the GUI. It creates a file, .png for example, but empty, completely black.
From the terminal I got this message:

Code: Select all

warning, running python script in an arbitrary thread
run: /tmp/bv_54956_59.py with options: None
/tmp/bv_54956_59.py : invalid format (not handled)
Could not read object in file /tmp/bv_54956_59.py !
warning, running python script in an arbitrary thread
run: /tmp/bv_54956_61.py with options: None
Reading FGraph version 3.1
bounding box found : 80, 23, 35
                     165, 217, 175
740 labels de sillons lus.
Referential of UUID a9ff9d30-53a1-8a40-751b-7119b309aa71 not found.
overriding transformation source referential
Exception in command/history writer: Cannot convert python object  to scalar / command type: CreateWindow
'ObjectInfo'
{ 0 : { 'boundingbox_max' : [ 130.943969726562, 92.0786666870117, 78.4511032104492 ], 'boundingbox_min' : [ -104.450004577637, -140.489883422852, -27.6211547851562 ], 'geometry' : [ 1085, 475, 1280, 598 ], 'group' : 0, 'objects' : [ 1, 2 ], 'observer_position' : [ 35.4149742126465, 23.2469825744629, -14.2056083679199 ], 'position' : [ 35.4149742126465, 23.2469825744629, -13.7989120483398, 0 ], 'selected' : 0, 'slice_quaternion' : [ 0, 0, 0, 1 ], 'type' : 'AWindow', 'view_quaternion' : [ 0.5, 0.5, 0.5, 0.5 ], 'view_size' : [ 384, 384 ], 'windowType' : '3D', 'zoom' : 1 } }
saving /tmp/bv_54956_60.jpg
/tmp/bv_54956_61.py : invalid format (not handled)
Could not read object in file /tmp/bv_54956_61.py !


Thank you!
Fab

Re: Multi Subject Sulci Snapshot Board

Posted: Mon Jul 27, 2015 11:59 pm
by riviere
After testing, I have the same kind of output as you have, but for me it works.
Do you see anatomist windows popping and closing with sulci in them while it runs ? It should do so.
The script is rather old and produces warnings, but most of them are not harmful in this context, except possibly one: when opening anatomist windows to render the sulcal graphs, options are passed but are not converted to a type which is compatible with what is expected in anatomist. For me it just made options not be passed, and the rendering is not done completely full-screen as it should, but that's all.
I have put a fix here for that:
ftp://ftp.cea.fr/pub/dsv/anatomist/upda ... napshot.py
It should be put at the same location in brainvisa distribution (in bin/) to replace the older script.
I don't know if it would help you.

Denis

Re: Multi Subject Sulci Snapshot Board

Posted: Tue Jul 28, 2015 8:10 am
by f4bry
Hi,

ok, I saved your script in brainvisa/bin and I also tried to modify the snapshot width and height (were set to 0). Now both are 10000.
And now it works! (for one subject, I can not test more subjects for the moment)
Maybe was just that the problem, sorry.

Thank you very much!
Fab

Re: Multi Subject Sulci Snapshot Board

Posted: Wed Jul 29, 2015 4:13 am
by f4bry
Hello,

Last question (hopefully): would be possible to add a subject label for each snapshot?

Thank you,
Fab

Re: Multi Subject Sulci Snapshot Board

Posted: Wed Jul 29, 2015 10:05 am
by riviere
The label is not handled by the "Multi Subject Sulci Snapshot Board" process, but it is something that snapbase does. Have you tried it ?

Denis