[MINC-users] MINC support in Brainstorm

Pierre Bellec pierre.bellec at criugm.qc.ca
Tue Jul 23 23:38:28 EDT 2013


Dear François (and Andrew),

>
>
> 2) The mnc2nii solution is not going to be a valid long-term solution for
> one specific reason: the import of the CIVET output surfaces in Brainstorm.
> By converting to NIfTI, we lose the initial MINC coordinate system, on
> which all the CIVET output is based. If I don't have access to the origin
> of the referential, I don't think I can register correctly the cortical
> envelopes generated by CIVET with the corresponding T1 MRI.
> Therefore we will need a different solution for importing the MINC volumes.
>
>
As Andrew said, the conversion from minc to nifti should retain the correct
voxel-to-world transformation. Hopefully this will be fixed once and for
all by Andrew with niftilib. Great to hear about that very useful future
development.


> 3) Since HDF5 and netCDF are formats that are fully supported in many
> platform-independent languages (Java, Matlab, Python), will there be at
> some point a MINC reader available that does not rely on any external
> compiled library?
> I looked at Pierre Bellec's Matlab functions (http://code.google.com/p/**
> mominc/ <http://code.google.com/p/mominc/>), but for what I understood it
> does the reading of the HDF5/netCDF contents and does not provide any tool
> to re-orient the the volume in another standard coordinate system (such as
> NIfTI).
> There is probably not much to add to get a Matlab-based (or Java-based)
> version of mnc2nii (that reads the MINC volume into a NIfTI-oriented volume
> but with the full MINC header information).
> Are there other solutions readily available to help us with this MINC
> import?
> Is anybody working on or interested in those aspects at the present time?
>
>
I have put some efforts in mominc from time to time, and I am confident a
reliable reader can be implemented for minc1 and minc2 in matlab, and minc1
for octave. I haven't prototyped the writer, but it should work. A lot of
what's left to do for the reader is to run some systematic test (with some
fancy slice-based intensity normalization) and finalize the fields of the
header to retain compatibility with the reader/writer in NIAK (which is a
different beast altogether based on system calls to the minc tools).
Regarding the limitation you mentioned on the re-orientation, I have added
a few features from NIAK in minc_read (for MINC1 files only for now, MINC2
will crash). If you download the head revision of the
code<https://code.google.com/p/mominc/source/checkout> (I'll
also send it to you by email) and run something like:

[hdr,vol] = minc_read('test.mnc');

you'll get a field hdr.info.mat which is a 4 x 4 transformation matrix from
voxel coordinates to world coordinates. If you want to get a list of world
coordinates for each voxel (and assuming vol is 3D):

ind = find(true(size(vol)));
[x,y,z] = ind2sub(size(vol),ind);
coord_w = minc_voxel2world([x,y,z],hdr.info.mat);

COORD_W is an array (nb_voxel x 3) where each row is the world coordinates
of one voxel in the volume. You can use MINC_WORLD2VOXEL to go the other
way around. If you want to have a volume that has been resampled such that
the first dimension is "left to right", the second is "caudal to rostral"
and the third is "ventral to dorsal", and the voxel to world transformation
has a diagonal matrix for rotation, with diagonal elements coding only for
voxel size, I can implement that as well.

Let me know if you think this could solve your problem and, if so, I'll
help wrap that up.

Best,

Pierre

Those would be very helpful tools for us and probably for the developers of
> other software packages as well. We would be willing to help for any new
> developments in this direction, and more generally support the integration
> between the different software environments at the Neuro.
>
> Thanks
> Francois
>
>
>
> --
> François Tadel, MSc
> MEG / McConnell Brain Imaging Center / MNI / McGill University
> 3801 rue University, Montreal, QC H3A2B4, Canada
>
> ______________________________**_________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/**mailman/listinfo/minc-users<http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users>
>


More information about the MINC-users mailing list