MRIcro and MRIcroN information MRIcro is an excellent free viewer for medical images written by Chris Rorden. It has many facilities, most notably ROI drawing and analysis. The newer version of. MAC gui version is user friendly but it can convert one data set at a time. Therefore, I wrote an applescript to convert multiple DICOM data sets to NIfTI/Analyze format at one instance using dcm2nii command. Click below to download script. Download mricron mac for free. Education downloads - mricron by NITRC and many more programs are available for instant and free download.
Introduction
MRIcro is a small program that runs on Apple OSX for viewing the NIfTI format of medical images popular with scientists (medical DICOM images can be converted to NIfTI using tools like my free dcm2nii). This software can be used to inspect images from many different modalities including Magnetic Resonance Imaging (MRI), Computerized Axial Tomography (CAT, CT), Positron Emission Tomography (PET), Scanning Electron Microscopes (SEM) and 3D ultrasounds. This can help scientists visualize data or students learn anatomy.Requirements, Downloading and Installation
This software is available for Macintosh OSX 10.7 and later with 64-bit Intel CPUs. Users of other operating systems should consider MRIcroGL. Users with older versions of OSX should consider MRIcron. The software uses the computers graphics card, so computers with better cards and drivers will be able to view higher resolution images as described in the troubleshooting section.- Click here for the beta version (included with MRIcroGL for OSX). This adds an 'Import' menu to convert DICOM images to the NIfTI format using dcm2nii. If your computer does not allow you to open this program you will have to explicitly allow it to run using your ‘Security & Privacy' system preferences control panel.
Supported Formats
This software can display the following formats: NIfTI (.nii, .nii.gz, .hdr/.img), Bio-Rad Pic (.pic), NRRD, Philips (.par/.rec), ITK MetaImage (.mhd, .mha), AFNI (.head/.brik), Freesurfer (.mgh, .mgz), DICOM (extensions vary)Getting Started
To load an image, you can drag the image to the application icon, drag the image to an open window, or use the File/Open command. The software also provides a File/OpenRecent menu item for reloading images. You can view multiple images simultaneously. Here are some simple commands for adjusting the view:- Toolbar adjustments (you can hide or show the toolbar with the View menu)
- The 'Color Scheme' pulldown menu allows you to adjust the colors used to display image intensity. Initially, this is set to black-white, but you have many options such as blue-green.
- The 'Darkest' and 'Brightest' number values allow you to display the range for image intensity. For example, in Figure 2 the color range for the blue-green overlay is from 2 to 5.
- The 'I'nformation button displays basic information about your image (e.g. image resolution).
- The 'View' pull down menu allows you to set whether you want to see only 2D slices, only 3D renderings or both (the default).
- Mouse/Touchpad adjustments
- Click on any location on a 2D slice to jump to that location.
- Drag the 3D rendering to rotate the object.
- Roll the scroll wheel up and down (or pull two fingers up and down on a touch pad) to adjust the clipping depth of the 3D rendering (for example, in Figure 2 we have clipped the top of the brain from the rendering).
- Right-click and drag over the 3D rendering to adjust the position of the clipping plane (for example, in Figure 2 we have set the clip plane to remove the top of the head).
- If you have an overlay loaded (described below), right-click and drag over the 2D slices to adjust the transparency of the overlay.
- If you have a 4D dataset loaded (described below), roll the scroll wheel left and right (or swipe left and right with two fingers) to adjust which volume is displayed.
- Menu adjustments
- The View/RemoveHaze command removes ‘dust' from the air around an object (described below).
- The View/ChangeBackground switches the background between black and white.
- The Window/YokeWindows option allows you to link different images so they display the same location.
Loading Overlays
MRIcro viewer can load additional images on top of your initial (background) image. This is useful for interpreting the anatomical coordinates of statistical maps. For example, Figure 2 shows a scalp-stripped high resolution MRI scan in grayscale with a statistical map on top. To achieve this, first open your background image, then choose File/Add to select your overlay maps. Note that overlay maps must be aligned (in register with) your background image – however they do not have to have the same dimensions (the overlay images will be automatically resliced to the resolution of the background image). You can independently adjust the color scheme and contrast of the background and overlays by selecting the layer from the rightmost drop down menu (e.g. in Figure 2, 'Overlay 1' is selected) and then setting the color scheme (e.g. blue-green) and color range (in this case 2.5). For statistical maps, these numbers typically refer to Z-scores or T-scores, and your analysis software should suggest good thresholds. You can also adjust the transparency of your overlay on the background image by right-dragging your mouse up and down over one of the 2D slices (though be careful – the same gesture over the 3D rendering adjusts the clip angle of the rendering).Removing Haze
Working with multiple images: Yoking Images
MRIcro viewer can display multiple images simultaneously. Sometimes we want to see if different images are aligned to each other ('in register'). For example, is an individual's T1 scan aligned to their fMRI data, or have two individuals' T1 scans been accurately normalized to have the same shape? If you select Window/YokeWindows clicking on one slice on any image will cause all the other images to jump to the same location. For example, in Figure 4 we have shown coordinate -44x-36x50mm on the high resolution T1 and the lower resolution T2* (functional MRI, fMRI) images.Working with 4D datasets: Timelines and swiping
Many datasets are four dimensional: for example with functional MRI we often collect hundreds of images, one every second or so. Likewise, with diffusion images we often collect dozens of different gradient directions. MRIcro viewer allows you to quickly load and inspect the 4D datasets. To select a different timepoint, roll the mouse scroll wheel left or right (or swipe the touchpad left or right with two fingers). Figure 4 also shows a timeline – you can change the size of the timeline by pulling the horizontal scroll bar up and down. The timeline shows the image intensity at the selected location for all 232 volumes. Often we want to see if there are any huge outliers in the volume and then swipe to the unusual volumes to determine if they are due to reconstruction errors, poor shim or dramatic head movements. The file menu allows you to save timelines in PDF format, or to export them as text (so you can import them into your favorite spreadsheet).Figure 5: A diffusion tensor image.
Displaying Diffusion Tensor Imaging (DTI) data
Diffusion Tensor Imaging acquires images that are sensitive to the spontaneous, random motion of water in our tissues. Water diffuses faster in large compartments (like the ventricles of our brains) than small compartments (e.g. inside the cells of our brain). Further, diffusion can have a preferred direction (it can be 'anisotropic') – for example in the fiber tracts of our brain water diffuses faster along the axis of the axons. These properties allow us to measure the integrity of white matter in the brain and to detect acute injury (as diffusion changes rapidly). You can view any NIfTI format DTI image just like an image from any other modality – just drag and drop it. However, MRIcro viewer has a handy tool for combining fractional anisotropy maps (FA: which shows whether regions have a preferred direction) and principle vector maps (V1: which shows the preferred direction). Select the File/OpenDTI option and select either a V1 or FA image- the software will load both and display an image where the colors reveal the preferred direction and the brightness displays the magnitude of this preference. TheDcm2nii
sample imagesTroubleshooting
MRIcro should just work. However, in order to generate fluid graphics it relies on hardware accelerated graphics. If you attempt to load images that are beyond the capability of your graphics card and graphics driver, the images may look scrambled. For example, Figure 6 illustrates that a high-resolution image appears scrambled on my MacBook (using a Sandy Bridge processor with integrated GPU). There are four solutions to this problem. First, you can ensure that your graphics driver is up-to-date: Intel integrated graphics were crippled in versions of OSX between 10.6.6 and 10.8. However, with OSX 10.8 or later (or 10.6.6 and earlier) the Intel Sandy Bridge and Ivy Bridge MacBooks and MacBook Airs should be able to render images up to 256x256x256 voxels (press the round ‘header information' button in MRIcro's toolbar to see the resolution of an image). Second, you could use a different computer – computers with a modern dedicated graphics cards should be able to display high resolution scans flawlessly. Third, you could use MRIcron instead – MRIcron does not use the graphics card so it runs on any computer (though it is slower and therefore the interface is not as fluid). Finally, you can reslice your data to a lower resolution (for example using one of my 'reslice' scripts. for SPM and Matlab). IntroductionImportant note: By default, MRIcron has the lesion drawing tools switched off. To turn on the lesion drawing features of MRIcron, select Help/Preferences and make sure the 'Show drawing menu and tools' checkbox is selected.
Flash videos, scripts and sample data are available to help users master these techniques.
MRIcron is designed to relate lesion location to behavioral performance. For example, it can help identify brain regions that are crucial to language production. To conduct an analysis, we will need to conduct four steps:
Mricron Manual
- Lesion Mapping: For each individual, we need to map the extent of brain injury.
- Specify design: We need to design our experiment, creating a spreadsheet that links each individual's lesion map to their performance
- Compute results: We need to conduct a voxelwise statistical analysis.
- Viewing results: We need to interpret the results.
- A copy of MRIcron: the version will include a folder named 'examplelesions' with the sample dataset described here.
- A copy of NPM (installed when you install MRIcron)
Right: A sample lesion map (9.voi) overlayed ontop of the ch2 template showing injury to the left temporal lobe. To view this map, launch MRIcron and choose File/Template/Ch2, then choose Overlay/Add.. and choose the image 9.voi included with the sample dataset. |
Lesion Mapping
Loading Overlays
MRIcro viewer can load additional images on top of your initial (background) image. This is useful for interpreting the anatomical coordinates of statistical maps. For example, Figure 2 shows a scalp-stripped high resolution MRI scan in grayscale with a statistical map on top. To achieve this, first open your background image, then choose File/Add to select your overlay maps. Note that overlay maps must be aligned (in register with) your background image – however they do not have to have the same dimensions (the overlay images will be automatically resliced to the resolution of the background image). You can independently adjust the color scheme and contrast of the background and overlays by selecting the layer from the rightmost drop down menu (e.g. in Figure 2, 'Overlay 1' is selected) and then setting the color scheme (e.g. blue-green) and color range (in this case 2.5). For statistical maps, these numbers typically refer to Z-scores or T-scores, and your analysis software should suggest good thresholds. You can also adjust the transparency of your overlay on the background image by right-dragging your mouse up and down over one of the 2D slices (though be careful – the same gesture over the 3D rendering adjusts the clip angle of the rendering).Removing Haze
Most raw medical images exhibit a little bit of noise. This can make renderings appear dusty or hazy. The View/RemoveHaze command attempts to eliminate this noise. This is illustrated in Figure 3. You can also use other tools that will attempt to extract the brain from the surrounding scalps – popular alternatives include FSL Brain Extraction Tool (BET), MNI Brain Extraction based on nonlocal Segmentation Technique (BEaST), and SPM using the Clinical Toolbox.Working with multiple images: Yoking Images
MRIcro viewer can display multiple images simultaneously. Sometimes we want to see if different images are aligned to each other ('in register'). For example, is an individual's T1 scan aligned to their fMRI data, or have two individuals' T1 scans been accurately normalized to have the same shape? If you select Window/YokeWindows clicking on one slice on any image will cause all the other images to jump to the same location. For example, in Figure 4 we have shown coordinate -44x-36x50mm on the high resolution T1 and the lower resolution T2* (functional MRI, fMRI) images.Working with 4D datasets: Timelines and swiping
Many datasets are four dimensional: for example with functional MRI we often collect hundreds of images, one every second or so. Likewise, with diffusion images we often collect dozens of different gradient directions. MRIcro viewer allows you to quickly load and inspect the 4D datasets. To select a different timepoint, roll the mouse scroll wheel left or right (or swipe the touchpad left or right with two fingers). Figure 4 also shows a timeline – you can change the size of the timeline by pulling the horizontal scroll bar up and down. The timeline shows the image intensity at the selected location for all 232 volumes. Often we want to see if there are any huge outliers in the volume and then swipe to the unusual volumes to determine if they are due to reconstruction errors, poor shim or dramatic head movements. The file menu allows you to save timelines in PDF format, or to export them as text (so you can import them into your favorite spreadsheet).Figure 5: A diffusion tensor image.
Displaying Diffusion Tensor Imaging (DTI) data
Diffusion Tensor Imaging acquires images that are sensitive to the spontaneous, random motion of water in our tissues. Water diffuses faster in large compartments (like the ventricles of our brains) than small compartments (e.g. inside the cells of our brain). Further, diffusion can have a preferred direction (it can be 'anisotropic') – for example in the fiber tracts of our brain water diffuses faster along the axis of the axons. These properties allow us to measure the integrity of white matter in the brain and to detect acute injury (as diffusion changes rapidly). You can view any NIfTI format DTI image just like an image from any other modality – just drag and drop it. However, MRIcro viewer has a handy tool for combining fractional anisotropy maps (FA: which shows whether regions have a preferred direction) and principle vector maps (V1: which shows the preferred direction). Select the File/OpenDTI option and select either a V1 or FA image- the software will load both and display an image where the colors reveal the preferred direction and the brightness displays the magnitude of this preference. TheDcm2nii
sample images available from this web page include a set of FA/V1 images you can practice with. Figure 5 illustrates this view: red fibers are oriented left-right, green are anterior-posterior and blue are superior-inferior.Troubleshooting
MRIcro should just work. However, in order to generate fluid graphics it relies on hardware accelerated graphics. If you attempt to load images that are beyond the capability of your graphics card and graphics driver, the images may look scrambled. For example, Figure 6 illustrates that a high-resolution image appears scrambled on my MacBook (using a Sandy Bridge processor with integrated GPU). There are four solutions to this problem. First, you can ensure that your graphics driver is up-to-date: Intel integrated graphics were crippled in versions of OSX between 10.6.6 and 10.8. However, with OSX 10.8 or later (or 10.6.6 and earlier) the Intel Sandy Bridge and Ivy Bridge MacBooks and MacBook Airs should be able to render images up to 256x256x256 voxels (press the round ‘header information' button in MRIcro's toolbar to see the resolution of an image). Second, you could use a different computer – computers with a modern dedicated graphics cards should be able to display high resolution scans flawlessly. Third, you could use MRIcron instead – MRIcron does not use the graphics card so it runs on any computer (though it is slower and therefore the interface is not as fluid). Finally, you can reslice your data to a lower resolution (for example using one of my 'reslice' scripts. for SPM and Matlab). IntroductionImportant note: By default, MRIcron has the lesion drawing tools switched off. To turn on the lesion drawing features of MRIcron, select Help/Preferences and make sure the 'Show drawing menu and tools' checkbox is selected.
Flash videos, scripts and sample data are available to help users master these techniques.
MRIcron is designed to relate lesion location to behavioral performance. For example, it can help identify brain regions that are crucial to language production. To conduct an analysis, we will need to conduct four steps:
Mricron Manual
- Lesion Mapping: For each individual, we need to map the extent of brain injury.
- Specify design: We need to design our experiment, creating a spreadsheet that links each individual's lesion map to their performance
- Compute results: We need to conduct a voxelwise statistical analysis.
- Viewing results: We need to interpret the results.
- A copy of MRIcron: the version will include a folder named 'examplelesions' with the sample dataset described here.
- A copy of NPM (installed when you install MRIcron)
Right: A sample lesion map (9.voi) overlayed ontop of the ch2 template showing injury to the left temporal lobe. To view this map, launch MRIcron and choose File/Template/Ch2, then choose Overlay/Add.. and choose the image 9.voi included with the sample dataset. |
Lesion Mapping
Dropbox download for mac. MRIcron provides simple tools for drawing a region of brain injury. However, it is crucial that all of our lesion maps are drawn with the same image dimensions and orientation. Therefore, we should either draw all the lesions on a standard template (e.g. File/OpenTemplates/CH2), or we need to first normalize all the scans so they are coregistered and then open each scan using File/Open.
- Launch MRIcron and open your scan (File/Open or File/OpenTemplate)
- Select your drawing tool (these are listed at the bottom of the Draw menu, e.g. the 'Pen' tool).
- Draw your region - for example if you use the 'Autoclose Pen' tool, simply click and draw the border of the brain injury. To fill in an enclosed region, simply shift+click in the center of the region. To erase part of your drawing, hold down the Shift key.
- Repeat step 3 for all slices where a lesion is present (e.g. you can adjust the X,Y,Z numbers that appear on the top left to select the desired slice. Note you can also use a mouse scroll-wheel to select slices.
- When you are done drawing the region of brain injury, choose Draw/SaveVOI to save a copy of the lesion map.
- Repeat steps 1-5 for each individual, save the lesion maps from all the individuals in a single folder.
Pen Tool | Closed Pen Tool | Fill Tool | Circle Tool | 3D Fill Tool | |
Left click | Draw line | Draw closed line | Fill region | Draw ellipse | see web page |
Shift+ left click | Erase line | Erase closed line | Erase region | Erase ellipse | |
Ctrl+ left click | Draw thick line | Draw thick closed line | 3D Bubble Fill | Draw rectangle | |
Ctrl+shift+ left click | Erase thick line | Erase thick closed line | Erase 3D region | Erase rectangle | |
right click | Fill region | Fill region | Fill region | - | |
Shift+ right click | Erase region | Erase region | Erase region | - | |
Alt+ left click | Change view | Change view | Change view | Change view | Change view |
Specify the Design
Lets famialize ourselves with the dataset we will analyze.- Launch NPM and open the design window (VLSM/Design..). A speadsheet will appear. Select File/Open and view the file continuous.val. Each row shows the performance of each patient, for example the patient 1 identified 2 items, while patient 2 detected 44 items. Note that with this software higher scores reflect better performance. If you have binomial data (where performance falls into two discrete categoris), you should denote the presence of a deficit with a 0 and healthy performance with a one. Note that the filename listed in the left column and the performance in the right column always correspond to the same patient.
- We need to first describe the lesion maps and name the behavioral performance measures. Select View/Design to bring up the description window.
- Predictors: shows the number of behavioral measures - here we are only examining the letter cancelation performance.
- Predictor names: for each predictor, insert an easy to remember name, e.g. 'cancel' for our letter finding task.
- You can select the file names of your lesion maps by pressing the 'Select Images' button to select the lesion maps from all your participants. You should select all the images simultaneously, and all the images should be placed in a single folder (e.g. your lesion maps might be C:dataset1.voi, C:dataset2.voi, etc). The lesion images can be in MRIcron VOI, NIfTI .nii, compressed NIfTI .nii.gz or Analyze (.hdr/.img) format. If you do select images, make sure the filenames match the patient performance, as noted in step 1.
- You can also set an a priori minimum lesion density threshold. For example, setting a value of 10% when you analyze 22 people means that statistics will only be computed for voxels damaged in more than 2 people. A large number for this threshold can increase your statistical power, as you will only compute statistics for voxels that are commonly injured. However, larger values will fail to detect rarely damaged regions that are reliable predictors of deficit. Note that this value is based on the total incidence of lesions in a voxel, regardless of behavioral performance.
Compute results
Next, we we compute our statistical results. You can conduct some statistics by choosing items in the Draw/Statistics menu of MRIcron. However, here we describe using some of the new features in NPM that are not yet available in MRIcron - specifically, NPM can conduct permutation thresholding and the Brunner and Munzel test. To conduct these statistics, you need to download and install npm.exe - this only works on the Windows operating system.
- First go to the 'Options' menu and set the permutations to None. Permutation thresholding can be useful, but it will take at least 1000 times longer than a normal False-Discovery Rate corrected threshold, and is typically less sensitive. Therfore, for you first glance at your data, turn this feature off.
- For analyzing the continuous data:
- Go to 'Option' menu and click 'Tests' - make sure the 'Brunner Munzel' is checked and the t-test is unchecked. Our data is not normally distributed, so we will use a non-parametric test (using the permuted Brunner Munzel rank order statistic).
- Click the VLSM/BinaryImagesContinuousGroups command. Select the continuous.val file.
- For analyzing the binomial data:
- Click the VLSM/BinaryImagesBinaryGroups command. Select the binomial.val file. This will use the Liebermeister measure (a more sensitive binomial test than Chi-Squared or Fisher's Exact test, see Seneta and Phipps, 2001; Phipps, 2003).
- NPM will now compute the requested tests. It will create overlap images of all your patients (e.g. sum.nii.gz) and a statistical map (BM.nii.gz for continuous data, L.nii.gz for binomial data).
Viewing results
We can open up the statistical maps generated and place them on top of an anatomical scan. New mac powerbook. If your lesion maps were aligned to stereotaxic MNI space, you can open them on top of one of the standard templates (File/OpenTemplates/ch2). Here is a quick guide:
- Launch MRIcron and choose File/OpenTemplates/ch2bet as our background image
- Choose Overlay/Add and choose the statistical map created in the previous step (e.g. C:datasetbinL.nii.gz).
- When MRIcron detects a statistical map, it calculates the p-values for each test in order to determine the false discover rate (FDR) threshold - e.g. how much robust signal is present in your data. MRIcron displays a histogram of the Z-scores. Note in the example below, most of the data has positive Z scores suggesting a robust signal (if our data was merely noise, we should see a bell-shaped distribution with a mean of 0, instead the mean Z score is around 2).
- Next, MRIcron displays the overlay. Note at the bottom of the screen the software reports the critical values: the p05/p01 values correspond to uncorrected p<0.05 and p<0.01 values that are very liberal (these tests will make many false alarms, e.g. here we have conducted 16082 tests, so p05 should result in many false positives). The fwe05 and fwe01 values correspond to the Bonferroni-corrected values: this test is very conservative, and you will often fail to detect real effects. The FDR05 and FDR01 results reflect the False Discover Rate - e.g. a FDR05 should show around 20 real activations for every false positive. Note that when there is very little or no signal, FDR is as conservative as Bonferroni, but it is adaptive to the actual signal in your dataset. Note that you can select the image thresholding and cutoff for your overlay. Note that by default, my software loads statistical maps with thresholds from FDR05 to FDR01, unless there is insufficient signal, in which case it uses the uncorrected 0.05..0.01 values. Also note that the current overlay is set to appear in a monochromatic red color scheme.
The image below shows how changing a threshold can change the appearance of a statistical overlay. Consider the raw statitical map shown in the left panel, while the middle panel has been thresholded to only show voxels with Z-scores greater than 2.5 (with three regions surviving this threshold), the right panel shows a more conservative threshold of Z>4.5 - with only a single peak surviving. - We can repeat steps 2.4 to load multiple overlays, to compare different statistical tests. For example, clicking on the 'tutorialfmri.bat' icon will launch MRIcron and load to overlapping regions of interest. By using the Overlay/TransparencyOnOtherOverlays command we can view both of these overlays simultaneously.