Multi Subject Sulci Snapshot Board

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
f4bry
Posts: 29
Joined: Wed Mar 25, 2009 1:46 pm

Multi Subject Sulci Snapshot Board

Post 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
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Multi Subject Sulci Snapshot Board

Post 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
f4bry
Posts: 29
Joined: Wed Mar 25, 2009 1:46 pm

Re: Multi Subject Sulci Snapshot Board

Post 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
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Multi Subject Sulci Snapshot Board

Post 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
f4bry
Posts: 29
Joined: Wed Mar 25, 2009 1:46 pm

Re: Multi Subject Sulci Snapshot Board

Post 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
f4bry
Posts: 29
Joined: Wed Mar 25, 2009 1:46 pm

Re: Multi Subject Sulci Snapshot Board

Post by f4bry »

Hello,

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

Thank you,
Fab
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Multi Subject Sulci Snapshot Board

Post 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
Post Reply