Page 1 of 2

Process Ana Do A Lot of Things chokes on minc volume

Posted: Mon Jun 11, 2007 4:36 pm
by MichelLeipzig
Hi all,

I'm seeing a problem with Process Ana Do A Lot of Things, with a synthetic minc volume, downloaded from the Montreal Neurological Institute's webpage. It seems to have problems from the histogram onwards. I think my AC-PC coordinates are correct.

Is there a glaring problem in my use of the software?

See below. Cheers,

Michel

Process Ana Do A Lot of Things from T1 MRI 2 started on 2007/06/11 17:28
------------------------------
!! VIP Error:
Sorry, ComputeVolumeHisto is only implemented for S16BIT volume
------------------------------

------------------------------
!! VIP Error:

Execution aborted in function '(histo)ComputeVolumeHisto'.

------------------------------
...

in Vip Bias Correction 1 RuntimeError: System command exited with non null value : 111

neuroProcesses.py (1641) in _processExecution:
result = process.execution( self )
VipBiasCorrection.py (131) in execution:
context.system('VipBiasCorrection', '-input', self.mri.fullName(), '-o', self.mri_corrected.fullName() , '-Fwrite', write, '-Kregul', self.field_rigidity, '-Dimfield', dim, '-sampling', self.sampling, '-Grid', self.ngrid, '-geometric', self.geometric, '-nIncrement', self.nIncrement, '-Increment',self.increment, '-Temperature', self.init_temperature, '-amplitude', self.init_amplitude, '-ZregulTuning', self.zdir_multiply_regul)
neuroProcessesGUI.py (932) in system:
ret = apply( ExecutionContextGUI.system, (self,) + args, kwargs )
neuroProcesses.py (1721) in system:
raise RuntimeError( _t_( 'System command exited with non null value : %s' ) % str( ret ) )

in Ana Brain Mask from T1 MRI 1 RuntimeError: System command exited with non null value : 111
...

Process Ana Do A Lot of Things from T1 MRI 2 finished on 2007/06/11 17:28 (8 seconds)

Posted: Mon Jun 11, 2007 8:53 pm
by Manik
In the error message there is this line :
Sorry, ComputeVolumeHisto is only implemented for S16BIT volume
It seems you have to convert your image to a signed 16bit image.
In Brainvisa, you can convert your image using "converters/automatic/Aims Converter"
You should open your image with it, set an output file name, and choose voxelType S16.
You might also want to use GIS format for the output image, as it is the native format of BrainVisa, and use the output image to run Ana Do A Lot Of Things.

Posted: Tue Jun 12, 2007 11:17 am
by MichelLeipzig
Dear Manik,

thanks for the kind reply.

I did what you suggested, and it seems to have enabled the process. (Somewhat surprising, since this was a signed short minc volume, which should have worked...)

There is still the following going on:


------------------------------
! VIP Warning:
Something was wrong with the iterative erosion!
------------------------------

but looking at the hemispheric surfaces, the result looks fine so far. I'm writing this as the process is still running...

Here's another question:

Is it possible to set the software so that it simply assumes that the various output filenames are the same as the input filename, plus some standard suffix, plus the appropriate filetype? Seems to me that it would make the interface a lot more user-friendly. Just tell it to do the computation with the usual suffixes, and click RUN...What do you think?

Thanks again for your kind consideration...

Cheers,

Michel

Posted: Tue Jun 12, 2007 1:59 pm
by Manik
About the VIP Warning, when I see it, I usually have a bad result, but sometimes it is ok anyway, I am not sure what this means.
For the filenames, you should create and use a BrainVisa database : create an empty directory, and in Brainvisa menu Preferences/databases you should add a database in this directory.
After that, you should import your T1 GIS S16 image using "data management/import/anatomy/Import T1 MRI" into the database : select the filename as input, click on the red magnifying glass and create a new subject name and protocol name. There should be a filename in the dialog box. Just select it, and run the process. The image is now in the database.
When you use Ana Do A Lot Of Things, just use the green magnifying glass to get the input image from the database and all other filenames should be filled automatically.
The resulting files will be in the database directory.

Posted: Tue Jun 12, 2007 2:13 pm
by MichelLeipzig
Hi again Manik,

thanks for your tremendous assistance. Your solution makes perfect sense. In the event of such a VIP Error: message, what recourse is there, if anything at all?

One last question (for now :wink: ). What I basically want is to identify the sulci. I just want to establish that all of this Process Ana Do A Lot of Things necessary to get to this end, although the sense that I got from the Medical Image Analysis paper by Denis, is that it takes the full PADALT.

Cheers,

Michel

Posted: Tue Jun 12, 2007 3:27 pm
by Manik
To solve the problem, there may be alternatives in the pipeline 2005 elements, but you need to ask Jean-François Mangin how to use them with your data (you need to use locks to prevent Ana Do All from destroying the 2005 output files).
I also think that you need all Ana Do All processes to get the sulci.
You should search in the forum for topics related to this, I think it was mentionned some time ago), or wait for help from Denis and Jean-François.

Posted: Tue Jun 12, 2007 7:29 pm
by Jean-Francois Mangin
Hi, forget about the Vip warnings as long as you like the result, they are just a a push to check carefully the output. Considering your objective,
you may save some time browsing some of the documentation. Have fun.

Posted: Tue Jun 12, 2007 7:56 pm
by riviere
Hi,
You have already had the main answer: use a database and everything gets a lot simpler...
For the Minc float/short problem: I guess the data are actually 16 bit short int + a floating point scale factor. For us these are float data. The importation process in BV should take care of the conversion in short data (but this can also lead to strange quantification problems in the histogram analysis).
Denis

Posted: Wed Jun 13, 2007 11:43 am
by MichelLeipzig
riviere wrote:Hi,
You have already had the main answer: use a database and everything gets a lot simpler...
For the Minc float/short problem: I guess the data are actually 16 bit short int + a floating point scale factor. For us these are float data. The importation process in BV should take care of the conversion in short data (but this can also lead to strange quantification problems in the histogram analysis).
Denis
I have defined a database path (/home/maudette/data/brainvisa) under Preferences as suggested by Manik.

However, after I define filenames in Ana Do A Lot of Things interface, without the leading path, and press Run, the software decides upon itself to fill in leading path of BrainVisa for various entries (/home/maudette/brainvisa), i.e. the path where BrainVisa resides. It fails to take the path under Preferences into account, and once again, hits a snag at LGraph when it mistakenly repeats the leading path (/home/maudette/brainvisa/home/maudette/brainvisa). All of this, despite the definition of a database under Preferences. I can upload xv images of all this if needed.

Does this sound in fact like 2 bugs? Why is the software filling in the current path in Ana Do A Lot of Things, despite the existence of a database?

Again, thanks for everyone's kind support.

Michel

Posted: Thu Jun 14, 2007 10:12 pm
by riviere
Have you used the T1 importation process before running the pipeline ?
Denis

Posted: Fri Jun 15, 2007 10:28 am
by MichelLeipzig
riviere wrote:Have you used the T1 importation process before running the pipeline ?
Denis
Yes. data management->import->anatomy->Import T1 MRI->input minc volume, output ima volume, and use ima volume in anatomy->T1 Pipeline 2004->pipeline->Ana Do A Lot of Things.

Building Attributed Relational Graph...
/home/maudette/data/brainVisa//home/maudette/data/brainVisa/Lgraph.data: No such file or directory

(I recently renamed /home/maudette/data/brainvisa /home/maudette/data/brainVisa . Don't know why, but one of the steps was looking for data/brainVisa...).

If I try to fill in the Ana... GUI without a path, the interface fills in the current path /home/maudette/brainvisa, which leads to the same problem at Lgraph, i.e.: a double path.

What do you think, Denis, Manik? A simple fix in a py file?

Cheers,

Michel

Posted: Fri Jun 15, 2007 7:45 pm
by riviere
What do you think, Denis, Manik? A simple fix in a py file?
No, here it's a C++ program. But we have used it thousands of times so I am very surprised if there is a bug in it... Did you change the database path after you renamed it ?
Can you send BrainVisa log file to the support email address (using the support menu in brainvisa) so we can have a better look at your configuration and at what happened ?
Denis

Posted: Mon Jun 18, 2007 9:16 am
by MichelLeipzig
Hi Denis,

I did change the path to reflect the renamed database. I am re-running it now, and will forward you the log file.

Edit: if you want to include some intermal print flags in the code for me to trigger, when I'm running it, feel free. Just let me know how to use them.

Thanks for your kind consideration.

Bien amicalement,

Michel

Posted: Mon Jun 18, 2007 9:07 pm
by riviere
If you are not using the "bug report" menu feature in BrainVisa, then you must quit brainvisa before sending the log file, because otherwise it includes links to incomplete temporary files. Closing BrainVisa closes temp files and cleans the log up.
Thanks
Denis

Posted: Mon Jun 18, 2007 9:23 pm
by riviere
Hi,
Well the previous log (brainvisa.log~) is a complete one, so I could load and read it.
Obviously you have not used the database properly: it does not follow the 'protocol/subject/datatype' organizartion. I think your data were not imported into a valid location, ie not using the red magnifying glass icons.
Please read the documentation, especially:
- the manual included in BV and browsabre directly from BV, data organization and data importation, and the use of green/red magnifying class icons
- the 'lessons' also in BV, accessible from the introduction page.

All the docs are also on the web site.

Denis