importing a mnc file: is there a database format?

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
MichelLeipzig
Posts: 42
Joined: Tue May 29, 2007 8:31 am

importing a mnc file: is there a database format?

Post by MichelLeipzig »

Hi all,

I'm playing around with Brainvisa after a year or so of neglecting it, based on a new release, and I'm seeing errors in trying to load mnc file.

I get the following
self._startProcess( self.process, executionFunction )
neuroProcesses.py (2003) in _startProcess:
apply( self._setArguments, (_process,)+args, kwargs )
neuroProcesses.py (1998) in _setArguments:
_process.checkArguments()
neuroProcesses.py (631) in checkArguments:
o.checkValue( p, getattr( self, p, None ) )
writediskitem.py (18) in checkValue:
Parameter.checkValue( self, name, value )
neuroData.py (95) in checkValue:
raise Exception( HTMLMessage(_t_('argument <em>%s</em> is mandatory') % name) )


which I've seen in other threads.

As I recall from my previous use of brainvisa, it was sensitive to the directory structure. Is this still the case? If so, can you remind me how to structure my database in manner that brainvisa can live with?

Cheers,

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

Re: importing a mnc file: is there a database format?

Post by riviere »

Hi Michel,

While reading you other post here, I think the problem is the same: you should use an importation process before doing anything with the data.

Denis
jinju
Posts: 20
Joined: Tue Nov 25, 2008 4:44 am

Re: importing a mnc file: is there a database format?

Post by jinju »

Hi,

I have a question about orientation of BV's result data processed whether in a neurologist convention or radiologist convention.

I have that mnc files have been normalized using MNI tool are in a neurologist convention.

Does it happen to change orientation during AimsFileConvert process?

BV's tools assume that images are in axial orientation and are in a radiological and indirect referential.

Does it mean that I should select a parameter "allow_flip_initial_MRI" (Prepare subject for Anatomical Pipeline) ??

Thank you in advance.

Merry Christmas!

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

Re: importing a mnc file: is there a database format?

Post by riviere »

Hi Jin-ju,
Normally the image orientation in MINC files should be read and taken into account. I cannot promit it really works well in all cases because we don't use MINC images so often, but it should. This means flipping will be done internally by Aims commands and it should work without specifying "allow_flip_initial_MRI". But of course you'd better test it before starting processing (typically by comparing the minc image in Anatomist wich will show it in radiological convention by default whatever its disk orientation, and the visualization using another software).
Feedback would be helpful on this topic...
Denis
MichelLeipzig
Posts: 42
Joined: Tue May 29, 2007 8:31 am

Re: importing a mnc file: is there a database format?

Post by MichelLeipzig »

Hi Denis,

I managed to set up the database properly, using the Convert Old Database command. The label of that command is a bit misleading. I didn't really have an old database, but doing this meant having a database set up, and meant also that when it comes time to import T1, the interface suggests an ima file as output, which meant that the rest of the sulcal identification process could take place without a hitch.

voxel size: [1, 1, 1, 1]
IH plane normal: [-0.97992450836414347, 0.19638163224301661, -0.034383316082952406]
image is axial
front is on the expected side
upside on the top. OK
Computing left hemisphere grey-white classification...
Computing right hemisphere grey-white classification...
...
Automatic recognition
config : /tmp/bv_6905403.cfg
Automatic recognition
config : /tmp/bv_6905409.cfg

Now, I need to find my way around to do 2 things.
1) I need to find the viewer that will illustrate the different labels over the brain surface.
2) I need to convert the output to some other image format, like minc, to do some meshing of my own. The meshing that I have in mind is a little different than the surface mesh done here: I want to emphasize 1-2 sulci at a time, and leave out the other sulci. How can I do this conversion?

Cheers,

Michel
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Re: importing a mnc file: is there a database format?

Post by Jean-Francois Mangin »

The main sulcus viewer is in the main features of brainVISA html page:
It is called "Anatomist Show Fold Graph". Use the search facility if you are lost.
And even simpler, the brainvisa processes generating the labelled sulcus
has the viewer plug there, you trigger it clicking on the eye.

You can generate an image of the labelled sulcus using: "Create Sulcus Label Volume"
in the Sulci/morphometry toolbox. You can do conversion to minc format
using AimsFileConvert I think, but I do not know what
you will as center and such stuff.
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Re: importing a mnc file: is there a database format?

Post by Yann Cointepas »

If you are lost with processes that you often use, you can create your own processes organization.
1) Start by right-clicking in the toolbox panel and choose New
2) Enter a name for the new item
3) Start drag-and-drop processes on this new "toolbox"
4) You can organize processes in the toolbox as a tree (select your "toolbox" and right-click in the processes panel).
MichelLeipzig
Posts: 42
Joined: Tue May 29, 2007 8:31 am

Re: importing a mnc file: is there a database format?

Post by MichelLeipzig »

Thanks so much, JF and Yann. I will give it a try. If this leads to a paper, and I think that it will, I'd like to include one or two of you as co-authors. I'll be in touch as things develop, although it's equally likely that I will have more lame questions along the way.

Best wishes,

Michel
MichelLeipzig
Posts: 42
Joined: Tue May 29, 2007 8:31 am

Re: importing a mnc file: is there a database format?

Post by MichelLeipzig »

Hi gents,

I managed to view the Fold Graph, as suggested by Jean-Francois, and illustrated below. For some reason, many of the sulci appear pink, towards the posterior side. Any idea why this is so?

I'll play around with AimsFileConvert next.

Michel
Attachments
brainVisaMNIPhantom.gif
brainVisaMNIPhantom.gif (252.91 KiB) Viewed 10108 times
MichelLeipzig
Posts: 42
Joined: Tue May 29, 2007 8:31 am

Re: importing a mnc file: is there a database format?

Post by MichelLeipzig »

Hi again,

I did manage to convert a roots volume to mnc format, which works like a charm.

What I would like however is to convert the labelled sulcal folds, which can be either in a labeled volume (albeit not subvoxel in accuracy), or better still, in a collection of labeled triangulated surfaces, to some external format like stl or vtk.

Is there a means for me to do this, and which specific file am I looking for, in either case? LphantomMni_default_session_auto.arg and RphantomMni_default_session_auto.arg?

Best wishes,

Michel
MichelLeipzig
Posts: 42
Joined: Tue May 29, 2007 8:31 am

Re: importing a mnc file: is there a database format?

Post by MichelLeipzig »

Found something... Graph To Volume Converter.

Getting a key error so far.

in Graph To Volume Converter 1 1

KeyError
neuroProcesses.py (2167) in _processExecution:
result = process.execution( self )
graphToVolume.py (76) in execution:
vol = graph[ self.extract_volume ]
__init__.py (641) in genobj__getitem__:
self.__oldgetitem__( item ) )

What should I enter as the extract_volume parameter?

Thanks again for your kind support.

Best wishes,

Michel
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Re: importing a mnc file: is there a database format?

Post by Jean-Francois Mangin »

It seems your specification of AC PC to go to Talairach is not working.
Then the sulcus recognition is doing whatever, and a part of the brain is not labelled because
too far from the normal places.

As I said somewhere above, there is a brainVISA process creating a volume of sulcus labelled,
it is in morphomety or sulci toolbox
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: importing a mnc file: is there a database format?

Post by riviere »

Hi,

The field extract_volume in the graphToVolume converter specifies which volume should be converted when several ones are present in a graph. Sulci graphs contain 6 different data which may be converted to volumes: aims_bottom (bottom or fundi voxels), aims_other (small parts), aims_ss (simple surfaces, the main sulcus parts), aims_junction (junction voxels between sulci), aims_plidepassage, aims_cortical (cortical or gyral lines between sulci). If you run it with the field 'extract_volume' empty on a suli graph, it will provide a clearer error:

Code: Select all

the ROI graph contains several volumes. Select the extract_volume parameter as one in ( aims_bottom, aims_other, aims_ss, aims_junction, aims_plidepassage, aims_cortical )
But for sulci graphs especially, there is another process which is more suitable: Sulcus Label Volume creation, in morphometry (you need to set userLevel as expert in the settings) - that is what Jean-François says. It offers the possibility to merge several of the above information in the same volume, and more importantly, it will create a volume with a different label (voxel value) for different sulci labels (or names), whereas the graphToVolume will provide an unique voxel value for each graph node (sulcus part).

Denis
Post Reply