open-discussion > INIA19 template label maps in MRIcron?
Showing 1-9 of 9 posts
Display:
Results per page:
Dec 19, 2013  07:12 PM | Torsten Rohlfing
INIA19 template label maps in MRIcron?
I agree that it would be nice to have the INIA19 template properly integrated in MRIcron. Unfortunately, no none here is really using MRIcron, so it's not really supported.

The .txt file you found is intended to work with 3D Slicer (www.slicer.org), not MRIcron, so it is not terribly surprising that it is apparently not in the correct format.

What does confuse me, though, is why MRIcron would look up xyz coordinates in the .txt file. My instinct would be to look up the label for a given location in the NIFTI, then look up that label in the .txt file to get the corresponding name.

Best,
  Torsten
After reading your 2012 paper on a non-human primate brain template, I wanted to use the template
in MRIcron. Placing the template files into the templates folder for
MRIcron, the templates are available for use. Unfortunately though,
MRIcron cannot find the names of the brain areas (listed in
inia19-NeuroMaps.txt) based on the xyz-coordinates.

I was
wondering if this should be possible with your template. I would think
so, judging by the contents of inia19-NeuroMaps.txt. Do I need to
perform an additional step to register the template data to the names of
the brain areas listed in the text file?
Dec 19, 2013  08:12 PM | Dirk Schuit
RE: INIA19 template label maps in MRIcron?
As I approached Dr. Rohlfing with this problem, allow me to elaborate a bit further.

Like stated in my quoted initial email, I have downloaded the INIA19 template. Similar to many MRIcron templates, the INIA19 templates come with the TXT and NII files. (Other templates have a LUT file as well but I believe that only changes the colour schemes.)

However, there's a difference between, for example, the AAL (anatomical area labels) template and the INIA19 template. Whereas the MRIcron templates link the selected 3-dimensional location in MRIcron to brain areas listed in the template's text files, the INIA19 templates do not. I've tried to show this in the attached screen shot. As you can see in the image, I have to MRIcron screens open: the left with the AAL template, the right being INIA19 NeuroMaps. At the bottom left of each window (enclosed in a red frame), you can see the difference. The AAL template shows that, at MNI coordinates x=55, y=-17, z=-27 you are looking at the right inferior temporal gyrus. MRIcron does not do the same for the INIA19 template--despite the list of brain areas in the text file, they are not linked to brain regions that you point to in MRIcron.

I approached Dr. Rohlfing hoping he could help me. However, since he does not use MRIcron, the template is not supported for MRIcron. I wonder if someone managed to get this template working in MRIcron. In particular seeing the brain areas at the bottom left corner of your window would be really helpful.

I will try to make this template work as it should in MRIcron. I will keep this thread updated with approaches that did not work, and (hopefully) a solution.

(I've picked the INIA19-NeuroMaps template as an example but the 'problem' appears in all INIA19 templates when used in MRIcron.)

All the best,
Dirk.
Dec 19, 2013  09:12 PM | Torsten Rohlfing
RE: INIA19 template label maps in MRIcron?
So... I looked into this, and I found that MRIcron's documentation does not seem to contain any instructions on how one would make a .txt file to go with a template to enable label lookup.

Simply making one that looks like AAL's and putting it into the same folder does not actually appear to do anything.

Dirk, if you can point me to a resource that elaborates on how to integrate custom templates into MRIcron, then I'll be happy to give it a shot for the INIA19, but for now I am at a loss as to what to do.

Best,
  Torsten
Dec 20, 2013  04:12 PM | Dirk Schuit
RE: INIA19 template label maps in MRIcron?
I've found a webpage that makes it sound pretty simple. On one of McCausland's Brain Imaging pages, they mention the process at the very bottom of the page:

You can also create your own anatomical template. The AALimage that is included is a nice example of how a custom template can be created. To create a template you should have:

- An 8-bit Analyze format image of the regions (e.g. a *.hdr file that describes the image dimensions, plus a *.img file that contains one byte of data for each voxel. There can be up to 255 different labelled portions (1..255, 0 is reserved for air and other non-cortical regions). Also, when first creating your header, it is important to adjust the header to denote that this image is a Template. To do this, open the 'Header Information' command from the 'Header' menu, set the 'regular [114]' value to 97 and then choose 'Save header' from the 'Header' menu. E.G.: AAL.hdr, AAL.img.
- A color lookup table [LUT, optional]. You can create a 768-byte RGB lookup table to describe the color of different regions (sequentially, 256 bytes of Red, followed by 256 bytes of green, and then 256 bytes of blue). This file must have the extension *.lut, must be placed in the same folder as the MRIcro executable, and should have the same name as the *.img file. E.G. AAL.lut.
- A text lookup table [optional]. Each line should start with the number index, and after a space have the name of the region, e.g. ...45 Cuneus_L, 46 Cuneus_R, 47 Lingual_L, 48 Lingual_R... This file should be in the same folder as the *.img file, with the same name except with the extension *.txt. E.G. AAL.txt.

I do not know how similar this process is to 3D Slicer (since I have little familiarity with that application), but that might be helpful. The INIA19 text file looks extremely similar to the text file McCausland's Brain Imaging webpage mentions. It might be as simple a process as updating the header information to something compatible with MRIcron.
Dec 20, 2013  05:12 PM | Torsten Rohlfing
RE: INIA19 template label maps in MRIcron?
Dirk:

Reading this, I think the problem here may not be with the .txt file at all, but with the fact that the INIA19 label map has more than 255 labels (and, consequently, is stored as 16-bit numbers per pixel, not 8 bits).

I am going to check with the MRIcron developer(s) to see whether it is still possible to integrate our label map properly.

Thanks for looking this up!

Torsten
Dec 20, 2013  07:12 PM | Dirk Schuit
RE: INIA19 template label maps in MRIcron?
Yes, that seems very likely. As I mentioned earlier, the text file seems to adhere to the format MRIcron can work with. Hopefully, it will not pose too much trouble translating your INIA19 template to MRIcron. If there is anything I can do to help, please let me know.
Dec 22, 2013  11:12 PM | Torsten Rohlfing
RE: INIA19 template label maps in MRIcron?
Here's what Chris Rorden said about the problem:
To get MRIcron to recognize an image is an indexed template you need to change the “Regular” value in the header from 114 to 98. You can do this with MRIcron - Window/Information, choose the optional tab, change the “Regular” value to 98 and next choose File/Save to overwrite your header. Now MRIcron will look for a txt file and color lookup table for your image.

I'll give this a shot when I get a chance, but maybe you want to try yourself right away... :)

TR
Feb 9, 2014  01:02 AM | Li-Ann Leow
RE: INIA19 template label maps in MRIcron?
Dear Torsten,

Thank you for your reponse on this! Chris Rorden said that there might be some slight errors in the text file. If following template conventions, the first column is the index, followed by a name, followed by red, green, blue and alpha values.

However, some rows only have the red values, e.g.,:
"234 l_ 1 188 folium-tuber 255"
Unlike other rows, eg "242 l_simple_lobule 27 151 223 255"
Similar errors appear for 282, 299, 320, 377, 380, 385, 400, 407, 422, 423, 440, 442,443, 468, etc.

Were those values meant to be read as zeros?

Using Slicer however, I can make the labels appear, so there must be differences in the way Slicer and MRICron are reading the text files.It may also still be the differences in filetype- MRICron is made for reading 256 labels while the template was made with many more labels.

Best,
Li-Ann
Mar 12, 2014  06:03 PM | Torsten Rohlfing
RE: INIA19 template label maps in MRIcron?
Hi Li-Ann -

Sorry for the late response. Apparently I wasn't monitoring this forum ;)

Indeed, the txt file was incorrect, and we released a fix on Feb 10 (Release 1.0.1) to address that.

Also Chris is currently finalizing (as far as I can tell) work on integrating INIA19 straight into MRIcron, so that should ensure the atlas works well with the software.

Best,

Torsten