Importation of DW data

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
User avatar
Olivier Coulon
Posts: 176
Joined: Fri Feb 27, 2004 11:48 am
Location: MeCA research group, Institut de Neurosciences de La Timone, Marseille, France
Contact:

Importation of DW data

Post by Olivier Coulon »

Hi everybody,
I have developed a brainvisa importation module for the Bruker images we have in Marseille. I get the proper T2 image and raw diffusion weighted image, but when I plug them into the diffusion pipeline the distortion correction reject them because they are not "square", meaning that X and Y dimension are different.
Why do they need to be ? How do you do for your data. SHould I use a resampling at some point ?

Thanks,

Olivier
Olivier Coulon
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org
cpoupon
Posts: 5
Joined: Fri Mar 05, 2004 1:30 pm

importing Bruker data

Post by cpoupon »

Hello Olivier,

in fact, the reason for this is stupid. It is because correction of EPI distortions was
originally developped with GEMS Signa data that are always square. So the command
line rejects any non square image. Moreover, it helped programming the
multithreaded algorithm (not sure for this), but, of course, it could be done with a non square image.
The quickest way at the moment is adding a border for creating "square-like" image.
In fact, we are in a process of rewriting distortion corrections in order to merge
Eddy current distortions and Susceptibility distortions correction. But this will be
available at the end of june. So except, if you want to do the modification on your side,
it is quicker to add borders.

Cyril
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Re: importing Bruker data

Post by NicolasW »

Hello DTI-ers!

I face exactly the same problem of non-squared DT and T2 images when trying to use the DTI distorsions correction, and therefore have 2 related questions:

- Cyril, is the new release you are talking about ready? (I have the Linux BrainVISA 3.0.0 version, but it seems to me the distorsions correction has not changed)

- Olivier, do you have any code doing automatically the images squaring (I confess: I'm lazy around this point...) ?

Thank you very much,
Nicolas.
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Hi,

sorry, having a closer look at what's available, I could answer my question 2) from previous post: Olivier's Brucker importation python script squares the images while importing them.

But it lead me to another problem:
the .mat files information attached to the diffusion weighted images seems lost in this importation process, which is a problem as the diffusion directions are not anymore exact with respect to the images, thus biasing the following tensor estimations.

I first tried a reslicing using reslice_mat.m (from J.Ashburner) to apply and remove the .mat files (which therefore introduces a first interpolation of the original images) before the importation process, but this program strangly cuts my images, implying a loss of information.

I could also convert the *.mat files into *.trm, but how can I then apply this transformations to the images?
The ideal would be to apply this *.mat/*.trm transformation and square the (x,y) plane voxels size and dimensions in a single step, to perform "only" a single interpolation step of the data.

Any hint would be very helpfull.
Nicolas.
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

What .mat are you talking about ? Is it from SPM ?
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Yann Cointepas wrote:What .mat are you talking about ? Is it from SPM ?
Excuse me, I was not clear.
It is *.mat associated with the *.hdr and *.img files (Analyze format).

Nicolas.
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

There is no .mat in Analyze format (otherwise this format would be only accessible to Matlab programs since .mat can only br read by Matlab). Usually a .mat file is associated to an Analyse image if it has been processed by a software written in Matlab such as SPM.
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Right.

But still, the "original" data I get from the Bruker 3T scanner from La Timone, Marseille, have an associated .mat file (like SPM-processed images indeed).

How can I apply this transformation properly (minimizing interpolations) to get rid of it for further processings within Brainvisa?

Nicolas.
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

I answer my own post ;-)

I should actually not apply this .mat file before the tensor estimation, as the diffusion directions are linked to the image without applying the .mat.

I nonetheless face a new problem now, losing the coregistration between the diffusion images after the processings in Brainvisa and the original anatomical image...but I will try to cope with this using spm based sofwares to handle those .mat specific problems.

Nicolas.
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

There is a process in BrainVISA to convert a .mat file to a *.trm that you can use in Anatomist and in the tracking pipeline. Each time you need to visualize images in the "T1 anatomy" referential and the "diffusion" referential, you can use a transformation in Anatomist. For tracking, any set of starting point can be entered with a transformation matrix which is used for each point. For example, you can define starting points on the T1 and directly use it for the tracking if you have a transformation between "T1 anatomy" and "diffusion".


You can have a look at
brainvisa process:
converter/automatic/SPM to AIMS transformation converter
registration/Registration Mutual Information Method
AimsInvertTransformation
AimsComposeTransformation
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Ok, thank you for your answer Yann.

I have already tried the *.trm conversion, but could not successfully apply it to reslice my image...
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

To apply a .trm, you can use the brainvisa process: toolbox/resampling but it doesn't have all options. Otherwise you can directly use the commandline, AimsResample, it has options to switch between several modes (nearest neighbour, linear, spline up to order 7), and you can specify output image dimensions/voxel sizes.
Denis
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Ok, thank you very much.
Nicolas.
Post Reply