Showing 101-200 of 456 posts
Display:
Results per page:

< Previous   1   2   3   4   5   Next >
Apr 24, 2018  08:04 PM | Chris Rorden
RE: problem opening T2 images
This reflects your acquisition. Since T2 scans require a long TE and TR, it was common for them to be acquired with high resolution in plane, but very thick slices. This reduced the number of slices required and therefore kept the acquisition time reasonable. In brief, your images are anisotropic. If you are acquiring new images, you may want to explore modern sequences like SPACE, which provide high-resolution isotropic scans in a reasonable time by exploiting variable flip angles.

If you go to the MRIcron "Preferences" panel, the top two check boxes influence how anisotropic data is loaded: it can either be resliced which provides nicely scaled images but can look very blurry, it can be rotated to the nearest orthogonal, or if neither button is checked the image is displayed as saved on disk.

You may also want to try out MRIcroGL
  https://github.com/neurolabusc/MRIcroGL/releases
which scales the images in plane. 

Again, this reflects an attribute of your source data, and if the between-slice resolution is too coarse, there may be no suitable way to visualize these images across slices.
Apr 24, 2018  08:04 PM | Chris Rorden
RE: Covarying for volume in NPM
Whenever you run NPM is recommends you use NiiStat. NPM is deprecated and will not be included in future releases. 


With NiIStat, you can add "2=regress lesion volume" in the "Special" field:
  https://www.nitrc.org/plugins/mwiki/inde...
Apr 24, 2018  08:04 PM | Chris Rorden
RE: dcm2nii reverses time series !?
I would carefully heed the warning whenever you run dcm2nii that you should use dcm2niix. dcm2nii is deprecated and will not be included in future releases. I would only recommend it for archival studies that pre-date DICOM (e.g. proprietary Elscint, Siemens and GE image formats). The vendors are continuously evolving their implementation of DICOM, so you need to continuously upgrade your DICOM software. If you have issues, file an issue on github   https://github.com/rordenlab/dcm2niix/issues
Since I do not have access to PET images, we are necessarily dependent on samples from the community.
Apr 24, 2018  09:04 PM | Chris Rorden
RE: dcm2niigui not working (macOS Sierra)
I would suggest using dcm2niix. You can use this from the command line or from MRIcroGL (Import/ConvertDICOMToNIfTI). You can also try the pre-release of the upcoming MRIcron
  https://github.com/neurolabusc/MRIcron/releases
which includes dcm2niix and a graphical wrapper in the "Import" menu.
Apr 25, 2018  01:04 PM | Kaitlyn Tagarelli
RE: Access violation copying from render window
Thanks!
May 18, 2018  07:05 PM | Kaitlyn Tagarelli
RE: Access violation copying from render window
I downloaded the pre-release and this is not working. I don't get the access violation error, but the "Edit --> Copy" function does not actually copy anything to the clipboad.
May 19, 2018  02:05 AM | Chris Rorden
RE: Access violation copying from render window
I have submitted a bug report for you. This is specific to the MacOS version and may not be fixed in the next major release. In the mean time, use the File/SaveAsBitmap option.
Jun 1, 2018  04:06 AM | jumatay - University of Saskatchewan
extract multiple slices from a 3D dataset at one time in PNG\JPG format
Hello,


I am using MRIcron to convert my images Nifty (.nii) to PNG manually. However, it took me so much time to get 160 slices from the original 192 slices. And I tried to get multiple slices at one time on Matlab, but the image quality is different (the one from MRIcron looks better).

Does this difference matter? I am using these images for image classification via deep learning CNN network. (Please check the two images for the same slice converted from both MRIcron and Matlab).

Also, Could someone please tell me the easiest and fastest way to extract multiple slices from a 3D dataset at one time in PNG format. 

Cheers,

Jumatay
Attachment: 1.docx
Jun 1, 2018  10:06 AM | Chris Rorden
RE: extract multiple slices from a 3D dataset at one time in PNG\JPG format
For scripting you should use MRIcroGL. The pre-release includes the ability to program in Python (in addition to Pascal) and the ability to creates orthongonal-slices with lines showing where the other slices come from. However, if you just want single slices you can use a classic "for" loop to generate each slice. The issue I see with your Matlab output is that you have not set the window center and window width (image brightness and contrast). The "wobble" script that comes with MRIcroGL shows a for loop. The Python and Pascal scripts below illustrate how to generate the attached image :

#PYTHON
import gl
gl.resetdefaults()
gl.colorbarvisible(0)
gl.loadimage('mni152_2009_256')
gl.overlayload('motor')
gl.overlayminmax(1, -4, -4)
gl.mosaic('h -0.2 a -24 -16 40 50 60 70 s x r 20')
gl.savebmp('cutoutPython.png')

#PASCAL SCRIPT
begin
resetdefaults();
colorbarvisible(false);
loadimage('mni152_2009_256');
overlayload('motor');
overlayminmax(1, -4, -4);
mosaic('h -0.2 a -24 -16 40 50 60 70 s x r 20');
savebmp('cutoutPascal.png');
end.
Attachment: cutaway.png
Jun 1, 2018  11:06 PM | jumatay - University of Saskatchewan
RE: extract multiple slices from a 3D dataset at one time in PNG\JPG format
Hello Rorden,

That's very kind of you!

Cheers,

Jumatay
Jun 2, 2018  10:06 PM | jumatay - University of Saskatchewan
Convert several MRI slices into one slice image
Dear Rorden,

If you don't mind, I would like to ask some questions.

My data matrix size is 192*192*160, and it has 192 slices in the coronal plane.

Now, first I need to delete some slices, which are noise images and non-tissue images, and this part differs in scans. (for each patient, the number of removed slices are different). Second, I wanna divide the rest slices into 20 stacks of images and convert all slices into one image within each stack. (Please check the one example case in the attachment: if I remove 32 slices, and I left 160 slices to be divided into 20 stacks with 8 slices in each stack, then convert all 8slice into one image).

My question is:

(a) remove noise images and non-tissue images
(b) divide the rest slices into 20 stacks, and convert all images into one image within each stack

I am just familiar with MRIcron, therefore, could you please give me some suggestions on software and methods?

Cheers

Jumatay
Jun 2, 2018  10:06 PM | Chris Rorden
RE: Convert several MRI slices into one slice image
For simple visualization you can simply only list the slices that you want to save to your bitmap, this allows you to skip whichever noisy slices you want.

Take a look at the second example here
  https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage#Mosaic_Views
which you can generate with this script

begin
 resetdefaults;
 colorbarvisible(false);
 loadimage('mni152_2009_256');
 overlayload('motor');
 overlayminmax(1, -4, -4);
 mosaic('h -0.2 a -24 -16 40 50 60 70 s x r 20');
end.

Remember that the bitmap images saved use the popular PNG format with 8-bit per color precision. For analyses you will want to stick with your raw data and not down sample the precision. If you have multiple people, you could normalize the images from each individual using SPM - this will get them to be the same size and have the same bounding box. Then you can view similar slices with different people without there being a different number of noisy slices for different people.
Jun 3, 2018  02:06 AM | jumatay - University of Saskatchewan
RE: Convert several MRI slices into one slice image
Dear Rorden,

Thanks for your fast and helpful answers!

Jumatay
Jun 4, 2018  02:06 AM | jumatay - University of Saskatchewan
MRIcrogl Installing issue
Dear Rorden,

I'm sorry for asking so many questions. I appreciate your time in responding to whatever you can when you are able to find the time.

Thanks for recommending me to use MRIcrogl, and I am new to MRIcrogl. I was trying to use scripting to get 20 slabs via the "exploded brain" method, however, I was not able to run the MRicrogl software and also the dcm2niix.  I've tried with different versions of MRIcrogl, but it shows the same error each time.

Please check my installation error in the attachment. By the way, my lab computer has Win 7, 64-bit Operating system.

Beast regards,

Jumatay
Attachment: mricrogl.PNG
Jun 4, 2018  10:06 AM | Chris Rorden
RE: MRIcrogl Installing issue
MRIcroGL requires OpenGL 2.1 (which was released in 2006) or later. Typically, if you see an earlier version it is because you are running a virtual machine (which only supports immediate mode). I suggest you try a modern Windows, MacOS or Linux machine and run MRIcroGL locally from the computer not via a virtualized environment. If you are running a virtualized environment you might want to check the settings, for example VirtualBox has an option "Enabled 3D acceleration" that allows you to use modern OpenGL if selected.
Jun 4, 2018  07:06 PM | jumatay - University of Saskatchewan
RE: MRIcrogl Installing issue
Dear Rorden,

Thanks for your kind help.

Best wishes,

Jumatay
Jun 6, 2018  08:06 PM | Emily Stern
Postdoctoral position: fMRI in OCD at Nathan Kline Institute (New York)
Please see the below advertisement for a postdoctoral position studying the neural mechanisms of obsessive-compulsive disorder using fMRI at the Nathan Kline Institute!

Post-doctoral Fellowship in Neuroimaging in Obsessive-Compulsive and Related Disorders
Psychiatric NeuroCognition Lab
The Nathan S. Kline Institute for Psychiatric Research (Orangeburg, NY)


The Psychiatric NeuroCognition laboratory, under the direction of Dr. Emily Stern at the Nathan S. Kline Institute for Psychiatric Research, is seeking a post-doctoral fellow to work on projects investigating brain function and structure in obsessive-compulsive disorder (OCD) using task-based fMRI, resting-state functional connectivity, and diffusion imaging approaches. Broadly speaking, the lab's work uses a cognitive neuroscience approach to investigating brain function in psychiatric disorders, with a focus on using fMRI to tap into core constructs relevant for OCD and related disorders including interoception, rumination, decision-making, and reward processing. The person in this position will primarily work on two ongoing NIMH funded projects using fMRI to investigate neural mechanisms of sensory and other key symptoms in OCD, including a clinical trial in OCD and Tourette's Disorder testing the effects of a novel treatment on symptoms and brain function. In addition to working on these funded studies, there will also be opportunity for the fellow to develop new studies and/or analyses relevant to the lab's work and to obtain pilot research funding offered through the institute.

NKI is a research facility of the New York State Office of Mental Health, one of only two state-funded research institutes in the U.S. dedicated entirely to investigating biological mechanisms and treatments for psychiatric disorders. NKI was founded in 1952 by Dr. Nathan Kline, whose pioneering research into psychopharmacological management of schizophrenia and major depression revolutionized treatments for serious mental illness. The Psychiatric NeuroCognition lab is part of the Clinical Research Department at NKI, which contains several investigators, trainees, and staff working on studies examining treatments and biomarkers in a variety of disorders (depression, schizophrenia, autism spectrum disorder). Research facilities at NKI include a 3T Siemens MRI scanner for human neuroimaging, an MRI-compatible EEG system, and equipment for advanced neuromodulation techniques including transcranial magnetic stimulation and transcranial direct current stimulation. NKI also has an active animal research program with a 7T small animal scanner. For the past 30 years, NKI's academic affiliate has been the New York University School of Medicine (NYUSoM) located in midtown Manhattan, and investigators and trainees at NKI have access to many of NYUSoM's research tools and resources.

Approximately 20 miles north of Manhattan, NKI is located in suburban Rockland County (in Orangeburg, NY), home to many beautiful hiking and cycling trails overlooking the Hudson River. Although several towns in Rockland County are accessible to Manhattan via public transportation on New Jersey Transit, a driver's license and access to a car is highly recommended for anyone considering this position.
Interested candidates should meet the follow criteria:

Required:
" Ph.D. in experimental psychology, clinical psychology, or cognitive neuroscience
" Moderate or better proficiency with functional MRI data analysis and presentation

Other desirable qualifications:
" Strong interest in psychiatric disorders and applying cognitive neuroscientific techniques to OCD and related disorders
" Track record of publishing and presenting fMRI data
" Experience with 2 or more standard fMRI packages for data processing (SPM, FSL, AFNI, Conn, Freesurfer, DPABI/DPARSF, C-PAC) and/or experience with both task-based and resting-state functional connectivity methods
" Experience with task programing software such as EPrime, Presentation, or PsychoPy
" Good knowledge of basic statistical concepts and approaches
" Experience with (or desire to learn) basic programming in MATLAB, bash, and/or python
" Knowledge or experience in psychiatric/psychological assessment and diagnosis would be a plus but is not required

Duties of the position include:
" Managing and analyzing task-activation and functional connectivity data, programming fMRI and behavioral experiments, running subjects through experimental protocols
" Reading the literature and publishing behavioral and neuroimaging findings in top tier journals
" Presenting results at conferences and seminars
" Developing new studies or analyses relevant for the ongoing work in the lab and applying for pilot and post-doctoral grants to support this work
" Assisting with grant applications, NIH progress reports, and IRB applications
" Assisting in the training of junior lab members including research coordinators and interns

Salary is competitive and commensurate with experience. Fellows would be employed by the Research Foundation for Mental Health (RFMH), which offers a full benefits package with medical and dental benefits. The position starts immediately and is for 1 year initially, with the opportunity to extend based on performance. Applications should be emailed to fmripostdocnki@gmail.com ('fmri' and 'postdoc' and 'nki') and include a cover letter, CV, and the names and contact information for two referees.
Jun 6, 2018  11:06 PM | Sonja Findlater
Multislice view only showing 2 slices
Hello!

I am making some multislice figures to go with some that I made several months ago. (I know that MRIcroGL is a great tool, but I've been using the MRIcron multislice to make comparison figures over time with my data and would like to continue with it!)

I am aiming to make a standard figure with 7 transverse slices overlapping 20%. I am using the May 2016 64BIT version on my Mac (OS 10.13.4 High Sierra). When I select the multislice option, the two most superior of the 7 slices that I have specified (via view -> slices ) appear on the very left of the multislice window. I am pretty sure that when I last tried this in ~Feb of this year, it worked fine. I've attached a screenshot, in case that helps.

Thank you,

Sonja
Jun 7, 2018  05:06 PM | Chris Rorden
RE: Multislice view only showing 2 slices
Sonja-
  Do things look correct if you use the MRIcron pre-release ?
Jun 7, 2018  06:06 PM | Sonja Findlater
RE: Multislice view only showing 2 slices
Hi Chris,

Thanks for that...
When I try to look at the multi slice with the newer (April 2018) release that you just posted, it the two superior slices appear (same as with the Oct 2016 release). However, this time when I try to add more slices, a message pops up that reads "MRIcron Access violation. Press OK to ignore and risk data corruption [I did press OK and nothing happened]. Press abort to kill the program."
With the Oct 2016 version, I am able to input other slices (though they do not display).
Thanks,
Sonja
Jun 11, 2018  10:06 AM | Shengjie Xu
How to run realignment with dcm2niix-converted nifti file?
Hi,

I am new to dcm2niix, so it might be a silly question. I found when I converted dicom into nifti, there was only one output nifti file. I wonder how to run realignment in SPM since I only got one nifti file. Btw, does scm2niix correct slice timing during conversion? I appreciate it much if someone could help me answer these questions!

best,
Shengjie
Jun 11, 2018  11:06 AM | Chris Rorden
RE: How to run realignment with dcm2niix-converted nifti file?
In SPM, you can select individual 3D volumes from a 4D dataset by setting the volume selector in the SPM image selection box (the box just below the filter). As noted in my tutorial, you can type "1:9999" into this box to see the first 9999 volumes of a file. The screenshot below is from the dataset included with the tutorial:
 http://people.cas.sc.edu/rorden/tutorial/index.html
Jun 11, 2018  05:06 PM | Shengjie Xu
RE: How to run realignment with dcm2niix-converted nifti file?
Hi Chris,

Thanks for your explanation!

I have a following question about slice timing correction with multi-band EPIs. My EPI's TR is 1.62 sec and multiband factor is 3. After conversion, I checked generated JSON file, and found in slice timing tag there was an array with 57 time points. However, in 3d format of my EPI, it was 307 files but why only 57 time points were given? Then I tried another group of EPI with different numbers of 3d nii file, but got the same number (57) of time points in slice timing tag. I also noticed in this array, first 19 values were the same as second 19 ones and the last 19 ones, eg 1,2,...19,1,2...19,1,2...19.

Is 57 a default number of slice timing values?  if I wanna run slice timing correction in SPM12, is it correct to use this 57-value array, or I should use 19 values as slice timing factor, or I should skip slice timing correction due to this problem? I searched many online websites but still can't figure out why.

Thanks so much and apologize for my questions!

Best,
Shengjie
Jun 11, 2018  05:06 PM | Chris Rorden
RE: How to run realignment with dcm2niix-converted nifti file?
Multi-band allows you to acquire a 3D volume of the brain more rapidly by acquiring multiple distant 2D slices simultaneously. In your example, your 3D volume has 57 slices, acquired in ascending order with slice 1, 20 and 39 acquired simultaneously. This is revealed in the "SliceTiming" BIDS tag which generates one entry for each of your 57 slices, revealing the time of acquisition of that slice (in seconds) relative to the first slice in that volume. It sounds like you acquired 307 volumes with a TR of 1.62s. Therefore, if your first 3D volume was acquired at time = 0, the acquisition of the second volume began 1.62s later. Since the TR is constant (as changing the TR will change your image contrast, e.g. T1 and T2 signal), my software stores just one value in the BIDS file "RepetitionTime": 1.62,. Therefore, the SliceTiming Tag reveals the timing of individual 2D slices that compose a 3D volume, and the RepetitionTime Tag reveals the timing between successive 3D volumes that compose a 4D volume. You can use the SliceTiming tag to perform Slice Timing Correction, but with multiband the TRs tend to be very brief and therefore the temporal derivative should be able to soak up most/all the variability described by slice timing differences. I encourage you to look at the PowerPoint files from my course for more details.
Jun 11, 2018  08:06 PM | Chris Rorden
RE: Multislice view only showing 2 slices
Can you give me a recipe to replicate your problem. For example, this is what I tried, but it seems to work fine on my MacOS 10.11.6 computer:


1.) File/OpenTemplate/ch2Better
2.) Choose Window/Multislice
3.) Choose View/Overslice/20%
4.) Make sure View/OrthogonalView is unchecked
5.) Make sure View/Orient/Axial is selected
5.) Choose View/Slices and enter the seven axial desired axial slices "76, 92, 108, 124, 140, 156, 172, 188, 204, 220, 240" (corresponding to MNI coordinates -32, -24, -16, -8, 0, 8, 16, 24, 32, 40, 50).
Jun 12, 2018  02:06 PM | Jean Logan
converting PET dynamic images from dicom to nifti
I converted a set of FDG dynamic  images from Siemens MR PET to nifti but the values are much too high.  Using our in house software the image values on the same structure are more than 3 times lower and in the range that I would expect. 
Any help would be greatly appreciated.
Jean
Jun 12, 2018  03:06 PM | Chris Rorden
RE: converting PET dynamic images from dicom to nifti
Can you check that you are using the latest release of dcm2niix
  https://github.com/rordenlab/dcm2niix/releases
If that does not work, I suggest you press the "Issue" button on dcm2niix's github page and create a new issue. Also, you may want to make sure that the software you are using to measure these values uses the NIfTI scl_slope and scl_inter values. The raw data in the NIfTI image is the same as in the DICOM image, and the scl_slope and scl_inter come from the DICOM header (rescale intercept (0028,1052), rescale slope (0028,1053)).
Jun 12, 2018  10:06 PM | Chris Rorden
RE: converting PET dynamic images from dicom to nifti
Jean-

Thanks for confirming that your software was ignoring the scale slope and intercept factors. For others who have similar issues, dcm2niix is a lossless converter.So if  the raw DICOM data is stored as 16-bit integers, the NIfTI data will be stored as 16-bit integers. The DICOM header values rescale intercept (0028,1052) and rescale slope (0028,1053) will be saved as the NIfTI header values scl_inter and scl_slope. Software that reads the image should apply these scaling factors to the image data (unless the image data is 64 bit float). 

If you have software that ignores these values, you can apply them by using
 fslmaths in.nii.gz -add 0.0 out.nii.gz
Since the default output format of fslmaths is 32-bit float, it will apply the scale factors to the image data. However, the resulting images will require more disk space and be slower to read and save. The influence of this conversion would look like this:


fslhd in.nii.gz
...
data_type INT16
...
scl_slope 1.000000
scl_inter -1024.000000
fslhd out.nii.gz
...
data_type FLOAT32
...
scl_slope 1.000000
scl_inter 0.000000
Jun 13, 2018  03:06 PM | Sonja Findlater
RE: Multislice view only showing 2 slices
Hi Chris,

I see what we are doing different!

I have been doing the same steps as you indicated, but I've been selecting the ch2bet template instead of ch2better!
My previous process (on the Oct 2016 MRIcron version):
1) File/open ch2bet
2) choose window/multislice
3) view/overslice -20%
4) ensure view/orthagonal view is unchecked
5) view/orient/axial =selected
6) view/slices - I get a pop up warning and am not able to adjust the slices (although 7 are showing): "MRIcron access violation. Press ignore and risk data corruption. Press abort to kill the program."
However, when I use ch2better in step 1 it works and I do not get the warning. So... out of years of habit of using ch2bet I didn't think to try ch2better...
As an aside, when I do the above steps with the 2018 pre-release you provided and select ch2bet as a template, I do not get the warning, but I still only get the 2 squished slices and am unable to change this.

Again, many thanks for providing MRIcron and thank you for your help with this!
Jun 13, 2018  10:06 PM | jumatay - University of Saskatchewan
Slice selection
Dear Chris,

Sorry for asking questions again, and thanks for your time.

In the attachment, I've put all 192 slices from an AD subject. Here is a couple of silly questions that I wanna make sure:

1: .imwirte function returns all black images with .png, does this matter? (the matrix is fine, I could use .imread to get back to original image.)
2: I wanna remove noisy slices and non-tissue slices, and is there any standard for removing those slices or do I have to remove?
3: When I open a new NifTI file on MRIcron, it returns a different initial Y value for the initial coronal slice. For example, Y=47 for subject A, and Y=59 for subject B. Does this different Y value refer that they have different brain size, but the corresponding initial slices (Y=47 & Y=59) come from the same or similar coronal plane position? Or how can I check my two slices have a similar plane position without (or before) doing normalization?

Thank you.

Jumatay
Attachment: MRI_Slices.pdf
Jun 14, 2018  12:06 PM | Chris Rorden
RE: Slice selection
These are general questions that are not specific to MRIcron. I would suggest you attend a FSL, SPM, FreeSurfer, etc workshop to learn more. You may also want to check out the powerpoints, demos, web pages and tutorials for my Image to Inference class.
  

1.) I have never of '.imwirte' or 'imread' - do you refer to the Matlab functions imread and imwrite or the Python SicPy functions imread and imwrite? Regardless, as I stated earlier I would only use PNG output for publication, as it downsamples your data to 8 bits (while MRI and CT typically have 16-bit precision). For Matlab you would use SPM's spm_vol and spm_read_vols to read the NIfTI data directly
 hdr = spm_vol('myimg.nii');
 img = spm_read_vols(hdr);
for Python you could use NiftiLib.

2.) Typically images outside the brain are removed when you normalize your data. This is an automated process, which will reslice your data to standard space. 

3.) The initial coordinates shown when you load an image in my software is the origin of the image as determined by the header S/QForm. For raw data this is the isocenter (MRI) or table center (CT), for normalized brains this should be near the anterior commissure. You can change the S/QForm to set this as you wish.
Jun 14, 2018  03:06 PM | Ali Amad
color intensity (new release ?) problem
Dear Chris,

first of all thank you for all those fantastic tools you have provided to the community and especially for mricrogl.

I have a simple about the color intensity of the overlay.

A few years ago, I previously used mricrogl to perform some figures with the overlay function and the "additive" option from the "transparency on background" menu. The results were (at least for me) really nice (see attached).

Since I am using the new release of mricrogl, the color of the overlay appears pretty pale (see the red blob in the picture attached) and I can't change the intensity of the color to get the same figure as previously.
So I am wondering if something has changed concerning the color intensity between previous and current releases.

Can't you let me know how I could get the same "contrast" and "intensity" as in my previous figures ? (i.e. like in picture 1)

Many thanks for your help.

All the best,

Ali
Attachment: intensity_color.jpg
Jun 14, 2018  04:06 PM | Chris Rorden
RE: color intensity (new release ?) problem
You can adjust this in the graphical user interface with Overlays/TransparencyOnBackground

you can also control this in a script with the overlaytransparencyonbackground() function:

begin
resetdefaults;
loadimage('mni152_2009bet');
overlayload('motor');
overlayminmax(1, 2.6, 4);
clipazimuthelevation(0.5, 180, 0);
shadername('edge_phong');
overlaytransparencyonbackground(0);
azimuthelevation(130,15);
end.
Jun 15, 2018  09:06 PM | jumatay - University of Saskatchewan
RE: Slice selection
Dear Chris,

Thank you so much and appreciate it.

Jumatay
Aug 8, 2018  07:08 PM | Yong Li
linux command of 'File/Save as Nifti'
Dear Chris,

I have to convert some hdr/img files to Nifti and found that 'File/Save as Nifti' function in MRIcron is the best choice. Would it be possible to call this function by command line in Ubuntu? Thank you in advance!

Kind regards,

Yong
Aug 9, 2018  10:08 AM | Chris Rorden
RE: linux command of 'File/Save as Nifti'
I would use a tool like fslmaths
  fslmaths fmri.hdr -add 0.0 xfmri.nii
Aug 10, 2018  03:08 AM | Yong Li
RE: linux command of 'File/Save as Nifti'
It works. Great. Thanks. fslmaths gives similar results as imcalc in SPM but mricron really saves identical image as hdr/img.

I just found that t1 images in hdr/img coregistered to native DTI images are oriented in ASL thus viewed strangely only in fsleyes. But mricron and SPM could view them in normal manner. The converted t1 images will be analyzed by fdt in fsl. Therefore, Do I have to convert the orientation of my t1 images from ASL to RPI (standard images in fsl)? Which tools would you recommend to perform these conversion to reliably set the 'qform or sform' matrix etc.? Thank you again.

Best regards,

Yong
Aug 10, 2018  12:08 PM | Yong Li
RE: linux command of 'File/Save as Nifti'
A follow-up question, could you please suggest a command to save a Nifti image again as Nifti format using "File/Save as Nifti" in mricron? In this way, I find that the 'quanternion and affine parameters' are reset to the current orientation settings. Really appreciate it, Chris!

Best regards,

Yong

Originally posted by Chris Rorden:
I would use a tool like fslmaths
  fslmaths fmri.hdr -add 0.0 xfmri.nii
Aug 14, 2018  09:08 PM | Kaitlyn Tagarelli
Overlay 3 maps additively
I'm trying to do an additive overlay with 3 maps/colors. I'm having a lot of trouble viewing the overlap for all three maps. Is this possible?

For example, I've tried using 3warm and 4cool, which have a nice, clear light pink overlay. When I add a third overlay with blue, it doesn't seem to show the overlap at all on the 3 warm, and there's no difference (at least not that I can see) between the 3warm/4cool overlay and the 3-way overlay. I thought maybe this has to do with it being in a different color group from the other 2, so I tried 1hot (instead of blue), which seems to work a little better but still doesn't really overlay on the 3warm (2 cold is worse).

I know that if, for example, I used red, blue, and green and set the scale to wash out any gradient, the 2-way and 3-way overlays are really clear. But then this is potentially problematic because I lose the gradient, which is informative.

I'd be interested to hear if anyone has encountered this issue or found a good solution for overlaying 3 maps.
Aug 16, 2018  10:08 AM | Chris Rorden
RE: Overlay 3 maps additively
When you use additive colors, it is best to use a Red, Green, Blue as the core color for each overlay - the warm and cool colors maps each have mixtures of these colors, making it harder to distinguish. Assuming you are using the latest version of MRIcroGL, the script below loades three overlays with red, green and blue colors. It then shows them as addititve so red+green=yellow and red+green+blue = white

import gl
import sys
gl.resetdefaults()
gl.loadimage('mni152_2009_256')
gl.overlayload('motor')
gl.overlayminmax(1, 1, 1)
gl.overlayload('motor')
gl.overlayminmax(2, 2, 2)
gl.overlayload('motor')
gl.overlayminmax(3, 4, 4)
#use negative value to specify additive overlays:
gl.overlaytransparencyonoverlay(-1)
gl.mosaic('A 40 50 60 S X R 0')
Attachment: mosaic.png
Aug 16, 2018  12:08 PM | Kaitlyn Tagarelli
RE: Overlay 3 maps additively
Great! Thank you!
Sep 5, 2018  12:09 PM | Dawn Jensen
Looking for non-skeletonised white matter atlas
Hi Everyone,

I'm trying to find a non-skeletonised white matter Altas that I can use in either MRIcron or FSL.  Thanks in advance

Dawn
Sep 11, 2018  07:09 PM | sjack
MATLAB and MRIcron flipped images
Hello,

I am having issues viewing scans in MATLAB vs MRIcron. I view images in MATLAB using the loadimage('scan.img') and I use the scan.hdr to view in MRIcron. The issue is that for some images, MRIcron will display the flipped version (ie the right half of the brain is now the left, and the left half of the brain is now the right). In MATLAB, the function interp3 will interpolate the image but also flip its orientation only in MRIcron and not MATLAB. This is the same for some other functions as well. As you can imagine, it is very frustrating to process images without seeing the correct orientation in MRIcron. This is also very problematic for drawing ROIs, as these may be drawn on the incorrect side. I am still getting used to MATLAB and MRIcron so I really do not know why this is the case. My only thought it that the .hdr file could contain different data than the .img file.

To sum up: Does anyone know why MRIcron is showing a flipped image as compared to in MATLAB? If so, how can I get it to read it correctly?

Thanks!
Sep 12, 2018  12:09 PM | Chris Rorden
RE: MATLAB and MRIcron flipped images
MRIcron is able to use the spatial rotation transform to re-orient images for consistent display. Use the Help/Preferences to decide if you want to view the raw data (rows, columns and slices as saved on disk, regardless of spatial orientation), rotated to nearest orthogonal, or resliced. 

If you want consistent spatial display in Matlab you will need to take the spatial transforms (S/Q Forms) into account. 

My personal favorite solution is Xiangrui Li's nii_viewer and nii_tool. This includes simple functions for reorienting data
  nii_viewer('nifti.nii')

Other solutions include

Matlab 2018: (see hdr.Transform.T)
hdr = niftiinfo('nifti.nii');
img = niftiread('nifti.nii');

SPM: (see hdr.mat)
hdr = spm_vol('nifti.nii');
img = spm_read_vols(hdr);

Jimmy Shen's Matlab tools.

Be aware that the NIfTI S-Form is indexed from zero (since the first element in a C array is v[0]), whereas the transforms shown by some of the tools above adjust this to be indexed from one (singe the first element in a Matlab array is v[1]). You need to keep this in mind when determining coordinates and saving NIfTI files.
Oct 2, 2018  05:10 PM | Priyanka Subash
binomial and continuous .val files
Hi team, 

Could someone explain how to create binomial and continuous .val files? I have normalized lesion tracings of my participants, but am unable to find proper documentation on how to create .val files for VLSM analysis.

Thanks!
Oct 2, 2018  05:10 PM | Chris Rorden
RE: binomial and continuous .val files
1.) One way to create a VAL file is with the spreadsheet designer built into NPM. This is shown in the "Specify the Design" section of the documentation
  http://people.cas.sc.edu/rorden/mricron/stats.html
2.) While the graphical editor is easy to use, these are simple text files, so you can edit a VAL file with your favorite text editor or generate them with your favorite scripting program.
3.) As noted whenever you run NPM, the NPM program is deprecated. While I hope it is robust and useful, active development has shifted to NiiStat that has a lot of new features. With NiiStat you design your experiment with an Excel spreadsheet:
  https://www.nitrc.org/plugins/mwiki/index.php/niistat:MainPage
Oct 2, 2018  06:10 PM | Priyanka Subash
RE: binomial and continuous .val files
Thanks for the quick response, Chris. Apologies for these elementary questions, but this is my first time using NPM. I've read the tutorial you sent before in the "Specify the Design" section, so just to confirm - I can build my variables into NPM as opposed to uploading a file as seen in the below statement from the guide:

"Launch NPM and open the design window (VLSM/Design...). A speadsheet will appear. Select File/Open and view the file continuous.val."

Best, 
Priyanka
Oct 11, 2018  01:10 PM | Fan Jiachen
How to convert dicoms into just one comprssed NifTi using dcm2nii in mricron?
Dear all ,

I am a graduate student from Southeast University .I found it difficult to convert Philips ingenia MRI dicom (EPI,DTI) into just one compressed Nifti.I used MRIConvert and mricron ( whcih has dcm2nii tool ) and I have also tried dcm2niix , which is inclued in mricrogl .However ,these tools were failed . I can't convert my dicoms into just one Nifti . For example ,when I convert my EPI dicoms (8275 images) into compressed FSL (4D NifTi nii) ,dcm2nii outputs 26 Niftis.It's ok to convert T1 3D dicoms into one NifTI .I hope you can give my some suggestions .Thank you.


Any help would be greatly appreciated !


Best,


Fan
Oct 11, 2018  02:10 PM | Chris Rorden
RE: How to convert dicoms into just one comprssed NifTi using dcm2nii in mricron?
Hello,
 I assume you are running the modern dcm2niix rather than the older dcm2nii. The DICOM standard has evolved a lot since dcm2niix replaced dcm2nii. I would reserve dcm2nii for archival analyses, in particular for proprietary formats that preceded the DICOM standard. I would heed the warning generated wheneve you run dcm2nii that you should consider moving to dcm2niix.

dcm2niix is provided with MRIcroGL
  https://www.nitrc.org/frs/?group_id=889
or you can get it as a standalone program
  https://github.com/rordenlab/dcm2niix/releases

If you do have problems, it would be helpful to know what version you are using - the is the first line displayed regarless of whether you use the graphical Import menu item from MRIcroGL or run the program from the command line:
 Chris Rorden's dcm2niiX version  v1.0.20180622 GCC6.1.0 (64-bit MacOS)
If your version is not the latest stable release (v1.0.20180622) please consider upgrading. You can also build a more recent developmental release (v1.0.20181009) by downloading and compiling the github code. If these do not work with your dataset, consider posting an issue on Github.
Oct 11, 2018  02:10 PM | Chris Rorden
RE: Looking for non-skeletonised white matter atlas
Dawn-

Have you looked at the natbrainlab.nii.gz image included with MRIcroGL
 https://www.nitrc.org/frs/?group_id=889
For more details see
  https://www.natbrainlab.co.uk/atlas-maps
Nov 2, 2018  11:11 AM | Paul Wright - King's College London
Tiny labels in one row mosaic
Hi Chris

When I save a PNG from mosaic view and there is only one row, the labels render very small. I tried adding in a slice on a second row, and the labels went back to normal size. I can use this as a workaround and crop the image, but thought I'd let you know about this feature.

Best wishes
Paul Wright
King's College London
Attachment: test4.png
Nov 2, 2018  11:11 AM | Paul Wright - King's College London
RE: Tiny labels in one row mosaic
Sorry, I should clarify this is MRIcroGL v 1.20180623
Here's the other image too (couldn't figure out how to attach more than one file).
Attachment: test5.png
Nov 2, 2018  01:11 PM | Chris Rorden
RE: Tiny labels in one row mosaic
Paul,

 When you save a mosaic image as a bitmap, the resolution is optimized for resolution of your MRI scan. The idea is to minimize interpolation artifacts. The font size is intentionally disregarded, and uses a rough algorithm based on minimum image dimension (so with long thin single row mosaics height becomes a constraint). I would suggest you save two copies of your mosaic - one with labels and one without. You can use the one without labels for any publications - either report the slice positions in the text legend or use a vector art editor to add high quality text lebels where you want them. 

In this respect, the mosaic view is different from the other views, where bitmaps are optimized for screen resolution at the expense of interpolation artifacts. 

Note you can go to Preferences and increase the bitmap zoom. This will apply an integer scale factor to the whole image. This often benefits the appearance of text labels on the MRI bitmaps, though obviously it creates larger files and does introduce subtle artifacts to the images.

In brief, this is a feature not a weakness of my software. There is a tradeoff between text quality and preserving the raw resolution of your images. When you save a mosaic the software is protecting the quality of your MRI scan at the cost of your text.
Nov 2, 2018  03:11 PM | Paul Wright - King's College London
RE: Tiny labels in one row mosaic
Got it. Thanks for your response.
Dec 6, 2018  01:12 PM | hannasofia - Gothenburg university
Error message "error in reaging NIFTI header.0"
To whom it may concern, 

I try to open a file named "BETA_Subject_001:condition001_source.nii" in MRIcron and receive this message: "error in reaging NIFTI header.0". It is still possible to open NIFTI anatomical Pictures named T1_3d_TRA.nii. Does somebody know what cpuld be wrong? Neither can I open files named "corr_subject001_condition001_Source001.nii":

Thank you in advance,
Hanna
Dec 6, 2018  02:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
1. What version of MRIcron are you using and what operating system are you using, e.g. MRIcron v1.0.20181114 on MacOS. 
2. If you are not using the latest version, does upgrading fix your problem?
3. Be aware that some file systems do not allow the ':'character in filenames.
4. Does fslhd report any problems with these images?
5. If the above does not fix your problems, you can share a copy with me for more feedback.
Dec 6, 2018  03:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi Chris, 

Thank you for your reply. I'm using the latest version of mricron on Mac. There are no ":" characters in file names. I'm not sure I understan n.4 of your points. But I haven't seen FSL or FSLHD report anything. The only information given can be seen in the screenshot I've attached. 

Best Regards, 
Hanna
Dec 6, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
I can not provide much more advice without seeing the image, but this error usually suggests a file permission error. I would suggest you run 'ls -l "filename.nii"' from the command line. You will want to make sure that you have read access permission for the file. Often you can fix this with a "chown" or "chmod" command.

Again, running 'fslhd "filename.nii"' from the command line is likely to provide more feedback (assuming you have installed fsl).
Dec 7, 2018  02:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hello again, thank you for your reply. 

I'm a beginner in using mricron and working with fmri-images. Could you please try to explain this in a simpler way? I'm not sure that I have the program fslhd, if its not downloaded per default together with mricron. And I cannot find where to download it. 

Thank you in advance, 
Hanna
Dec 7, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Hanna-
 Unix files have permissions associated with them, so a user may not have permission to open a particular file. 
 FSL is a popular and free tool for brain imaging. One of the many tools it includes is 'fslhd' that will read a brain imaging header and describe the contents. Check Google to find out how to install and use fsl.
 I strongly recommend the fsl training course - they not only describe their own tools, but provide an introduction in how to use Unix computers. It has a lot of useful information for beginners as well as experts (I went this year, even though I have been in the field for decades):
   https://fsl.fmrib.ox.ac.uk/fslcourse/
 I also suggest you look at Martin Lindquist's book and course
  http://www.biostat.jhsph.edu/~mlindqui/main.html
 Finally, all the material and slides for my own course is here
   https://www.mccauslandcenter.sc.edu/crnl/psyc589888
Dec 12, 2018  02:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi, 

Now I've installed fsl to figure out why I cannot open files with Mricron. I'm using Mac, so in Terminal I receive this info;

"ml-181128-006:~ Xerhad$ fslhd corr_Subject001_Condition001_Source001.nii
Image Exception : #63 :: No image files match: corr_Subject001_Condition001_Source001
No image files match: corr_Subject001_Condition001_Source001
ml-181128-006:~ Xerhad$"

Seems to me the problem isn't about permission, right? Could you help me further? I've never used Terminal before. 

Thanks in advance, 
Hanna
Dec 12, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Can I suggest you contact a local friend who is familiar with Linux. The fact that FSL can not open the file suggests the problem is not with MRIcron, but I am not even sure you are in the correct folder. You would want to run "ls -l" from the command line to make sure your terminal is in the correct folder and that you have permissions. Someone familiar with computers can help you out. The Unix handout here might be a good starting point.
https://fsl.fmrib.ox.ac.uk/fslcourse/
Dec 14, 2018  12:12 AM | Nina Mino
Can't Scroll in MRIcron on a MacBookPro-OS Sierra
Hello, 

I have MRIcron open on a MacBook Pro and it won't let me scroll up and down in the window. Any idea on how to fix this? 
I've tried going through accessibility and changing some default settings but nothing works. I've tried on other Macs as well with no luck. Unfortunately I do not have consistent access to a PC.

Thanks!
Dec 14, 2018  12:12 AM | Chris Rorden
RE: Can't Scroll in MRIcron on a MacBookPro-OS Sierra
Hello-
  I can not replicate your problem on my MacOS 10.13.6 using MRIcron v 1.0.20181114. Can you make sure you are using this version. You can get it here
  https://github.com/neurolabusc/MRIcron/releases
 If this does not resolve your problem, can you tell me what version of MacOS you are using.
Dec 14, 2018  01:12 AM | Nina Mino
RE: Can't Scroll in MRIcron on a MacBookPro-OS Sierra
It works! Thank you!
Dec 17, 2018  10:12 AM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi Chris, 

A friend helped me out in terminal (Mac) and made sure that permission was given to all files in the folder where my files are saved. Unfortunately it does´nt seem to solve the problem.

When I open a file named "corr_subject002_condition001_source001.nii" in Mricron it says "Error reading NIFTI header-0" followed by "File not open, press ok to ignore risk and data corruption. Press Abort to kill the program". 

What could be the problem then?

Thanks in advance, 
Hanna Eriksson
Dec 17, 2018  03:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Did you install fsl and see what the output of 'fslhd corr_subject002_condition001_source001.nii'. If you want to send me a copy of your image by email I can take a look. However, you may also want to chat to some of the experienced neuroimagers at your university.
Dec 20, 2018  12:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi, 


Please see attached files for terminal screen shot when typing ´fslhd corr_subject002_condition001_source001.nii'.

Thank you in advance, 
Hanna
Dec 20, 2018  02:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
Your screenshot only shows part of the output. Why don't you see if you can upload the .nii file or send it to me directly.
Dec 28, 2018  06:12 PM | hannasofia - Gothenburg university
RE: Error message "error in reaging NIFTI header.0"
Hi Chris, 

Please see attached corrupt file. 

This is the file permissions of the file:

-rw-r--r-- 1 Xerhad staff 3610868 Dec 28 18:56 corr_Subject001_Condition001_Source001.nii
And this is the result from fslhd:
filename corr_Subject001_Condition001_Source001.nii
size of header 348
data_type FLOAT32
dim0 3
dim1 91
dim2 109
dim3 91
dim4 1
dim5 1
dim6 1
dim7 1
vox_units mm
time_units s
datatype 16
nbyper 4
bitpix 32
pixdim0 -1.000000
pixdim1 2.000000
pixdim2 2.000000
pixdim3 2.000000
pixdim4 0.000000
pixdim5 0.000000
pixdim6 0.000000
pixdim7 0.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 1.000000
scl_inter 0.000000
phase_dim 0
freq_dim 0
slice_dim 0
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Aligned Anat
qform_code 2
qto_xyz:1 -2.000000 0.000000 -0.000000 90.000000
qto_xyz:2 0.000000 2.000000 -0.000000 -126.000000
qto_xyz:3 0.000000 0.000000 2.000000 -72.000000
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Posterior-to-Anterior
qform_zorient Inferior-to-Superior
sform_name Aligned Anat
sform_code 2
sto_xyz:1 -2.000000 0.000000 0.000000 90.000000
sto_xyz:2 0.000000 2.000000 0.000000 -126.000000
sto_xyz:3 0.000000 0.000000 2.000000 -72.000000
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip
aux_file

Could you help further? 

Best Regard, 
Hanna Eriksson
Dec 28, 2018  06:12 PM | sjack
How to open image + overlay with terminal command (Mac OS)
Hello- I am using MATLAB to open images on MRIcron with Mac OS with the following command:
status = system('osascript -e "tell application \"mricron\"" -e "open \"file_path:image.hdr\"" -e "end tell"');

In the Mac OS terminal, the command is just:
osascript -e "tell application \"mricron\"" -e "open \"file_path:image.hdr\"" -e "end tell"

Now, if I try and run the same code with the overlay (file_path:overlay.hdr), it just opens the overlay by itself and gets rid of the original image.

So- I am wondering if anyone knows a Mac OS terminal command to overlay an image on top of the currently open image, OR open them both together at once in the same window.

Thanks in advance!
Dec 28, 2018  08:12 PM | Chris Rorden
RE: Error message "error in reaging NIFTI header.0"
I just downloaded MRIcron (v1.0.20181114) on my MacBookPro11,1 using MacOS 10.13.6 and your sample image loaded just fine. By the way, if you press the shift key down while starting MRIcron it will ask you if you want to reset all of its default values - this can help if something unusual happens. Unfortunately, I can not replicate your issue.
Dec 28, 2018  08:12 PM | Chris Rorden
RE: How to open image + overlay with terminal command (Mac OS)
I am afraid that MRIcron is not very good with command line scripts. Particularly on MacOS. Furthermore, be aware that when you run system commands from Matlab you may not get all your user environment variables loaded, which makes scripting other programs with Matlab a little bit more challenging.

I would encourage you to upgrade to try MRIcroGL v1.2.20181114 if you are interested in scripting.
  • As noted on the home page, MacOS hides graphical applications as packages. This means that a command line script will look like this "/Users/rorden/MRIcroGL12/MRIcroGL.app/Contents/MacOS/MRIcroGL spm152 spmMotor -cm actc -dr 2 4". I tend to run the command "nano ~/.bash_profile" and add the line an alias that points to the application: "alias mricrogl='/Users/rorden/MRIcroGL12/MRIcroGL.app/Contents/MacOS/MRIcroGL'", with this in your profile, you can run shorter commands "mricrogl spm152 spmMotor -cm actc -dr 2 4" (just be aware that Matlab may ignore any settings in your bash_profile).
  • As shown in the comment above (and the home page), MRIcroGL 1.2 uses a lot of the same command line options as fsleyes. That way you can pick and choose the right tool for the task at hand.
  • MRIcroGL includes a full scripting language. Assuming you have v1.2, click on the Scripting/Templates menu to see a few samples to get you started. The core functions are described here.
  • The MRIcroGL Wiki and Surfice wiki  both describe how to execute scripts from Matlab, Python or any other language that lets you launch external programs. 
Below is an example Matlab script - once you set the path of your executable it should be able to load an image with an overlay. Choosing Script/Templates/Help generates a list of all the in-built functions. For external programs the "glsavebmp()" and "exit()" are important: you can have MRIcroGL generate images for you and then terminate when it is done.

function runGL(bg, overlay)
%launch MRIcroGL and display an image
% bg: name of background image to load
% overlay: name of overlay image
glExe = '/Users/rorden/MRIcroGL12/MRIcroGL.app/Contents/MacOS/MRIcroGL';
if ~exist(glExe,'file'), error('Unable to find %s', glExe); end
if ~exist('bg','var'), bg = 'spm152'; end
if ~exist('overlay','var'), overlay = 'spmMotor'; end

%create script
fnm = fullfile(fileparts(mfilename),'script.py');
fileID = fopen(fnm,'w');
fprintf(fileID, 'import gl\n');
fprintf(fileID, 'gl.resetdefaults()\n');
fprintf(fileID, sprintf('gl.loadimage("%s")\n', bg));
fprintf(fileID, sprintf('gl.overlayload("%s")\n', overlay));
fclose(fileID);
%run script
cmd = [glExe,' "', fnm ,'" &']
system(cmd);
Feb 5, 2019  11:02 PM | Luie Wang
Got Multiple Output files after conversion (dcm to nii), which one do I use?
Hi Dear experts, 

I was using MRIcron to convert fMRI image from dcm to nii format. However I got multiple output files starting with art_, swu and wu, which one should I import for analysis? 

Thank you!
Feb 6, 2019  12:02 PM | Chris Rorden
RE: Got Multiple Output files after conversion (dcm to nii), which one do I use?
More information would help. I assume you are using the version of dcm2niix that comes with the current MRIcron v1.0.20181114 https://github.com/neurolabusc/MRIcron/r... - if not I would suggest you upgrade.

Also, these do not sound like the raw images created by dcm2niix, but rather images that have been processed by SPM (s = smoothed, w = warped/normalized, u = undistorted), or the Automatic Registration Toolbox (art_). People often compute the pre-processing of undistortion, smoothing and warping with SPM prior to conducting a statistical analysis, but these stages have nothing to do with dcm2niix.
Feb 7, 2019  10:02 PM | Luie Wang
RE: Got Multiple Output files after conversion (dcm to nii), which one do I use?
Hi Chris,

Thank you so much for the clarification! I realized these were output saved directly within my original file after pre-processing. The outputs derived from dcm2niix actually starts with co, o and series of number (I was using an older version of MRIcron). I converted my images again using the current version and got one output file named the same way as my raw images. What were the difference between the three output files derived from the older version of MRIcron? Would it matters to use the output from older version vs. the current version?

Thanks a lot!
Feb 8, 2019  02:02 PM | Chris Rorden
RE: Got Multiple Output files after conversion (dcm to nii), which one do I use?
With the old dcm2nii it would convert a 3D acquisition (e.g. 't1.nii') and then losslessly apply orthogonal rotations so the image slices are roughly axial ('o') and then apply a crop ('co') to remove excess neck. The 'co' opften worked better with the contemporary SPM8 and FSL's BET. 

You can get a similar cropped image if you use dcm2niix's '-x y' option. However, recent FSL BET with the "robust" (-r) option and SPM12's clever built-in spm_maff8 function tend to be much more robust to excess neck signal. I doubt this is required for modern tools
Feb 11, 2019  04:02 PM | Luie Wang
RE: Got Multiple Output files after conversion (dcm to nii), which one do I use?
This is really helpful. Thanks so much!
Feb 21, 2019  03:02 PM | jconrad
Error when saving .voi lesion drawing
Hi,

I have a problem with saving my delineated lesions in MRIcron. Whenever I want to save the delineated lesion as a volume of interest (using draw -> save voi) I get an error message:
"Access denied - Press OK to ignore and risk data corruption. Press cancel to kill the program" (see also the file attached)

If I press OK the .voi is not saved to the folder.

I worked with MRIcron in the past and had not encountered any difficulties with saving the lesions / creating the SPM5 mask.

Can anybody help me with this?

Best regards,
J
Feb 21, 2019  03:02 PM | Chris Rorden
RE: Error when saving .voi lesion drawing
Feb 22, 2019  01:02 PM | jconrad
RE: Error when saving .voi lesion drawing
Dear Dr. Rorden,

thank you very much for your quick reply.

I am working on a Linux workstation with what appears to be version "mricron_0.20140804.1" ... (~dsfg.1-1_amd64.de)

I guess it is a 2014 version.

I imagine we should update ours then?

Best regards,

Julian
Mar 5, 2019  11:03 AM | soph
NiiStat and MRIcron (NPM)
Dear all,

I have some questions about NiiStat - MRIcron (NPM).
- If you want a continuous analysis with two predictors (behavioral data) and lesions ROIs, it's recommended to use NiiStat with Freedman-Lane permutation. In addition if you do a two-way analysis you set up "SVM" in the "Special" option.
If this is correct, your output will be "r" number and "r ^ 2" number, with also the p significance number. Which Z-number do you put on MRIcron for see your results (significant voxels correlates at two behavioral data)?

- only one confirmation: also in the NiiStat like NPM (by MRIcron) in the analysis you use the correct answers of behavioral data. But in NiiStat you look only the negatives numbers.

- I found it better to use the Classic NiiStatGUI. In case in MATLAB command line how do you set the "Special" options (e.g. SVM)?
e.g. NiiStat ('name.xlsx', 0,1, -8000,0.05,10, ... and then for SVM setting?)

- In cases with lesions files and 1 set of continuous behavioral data, is the voxelwise analysis with NiiStat (with Normal Permutation, voxels analysis, lesion modality) comparable / like NPM analysis?


Thank you for your help, best regards
Soph
Apr 10, 2019  07:04 PM | sjack
MRIcron overlay different slice numbers when exported from MIPAV
Hello-

I am having an issue with masks that are converted to niftii (from .xml) using MIPAV. When opening the mask by itself, it looks normal. However, when opening the mask as an overlay on top of another image, the slice number is one slice off. My thinking is that MIPAV starts from slice 0. So in MIPAV, a mask might have 0-39 slices, whereas in MRIcron it would be 1-40 slices. It looks like it is then overlaying slice 1 (instead of slice 0) on top of slice 1 of the other image. 

Any ideas on how to fix this? Not sure if this is somehow encoded in the image header, or if it is some setting I can change in MRIcron?

Thanks!
Apr 10, 2019  07:04 PM | Chris Rorden
RE: MRIcron overlay different slice numbers when exported from MIPAV
Have you checked the image and the mask with fslhd? For example, I would try 'fslhd img.nii' and 'fslhd mask.nii'. You will want to check the sform (or if that is not set, the qform). If both images are in identical space, the sform should be identical. I wonder if something got lost in translation. The coding of space is explicitly described in the NIfTI standard, you should get a spatial transformation matrix that looks like the following:

sform_code 1
sto_xyz:1 -3.250000 0.000000 -0.000000 104.000000
sto_xyz:2 0.000000 3.230991 -0.388798 -58.684311
sto_xyz:3 0.000000 0.350998 3.578943 -84.798035
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
Apr 21, 2019  12:04 AM | ningrong ye - City of hope diagnostic radiology department
Question about MRIcron image overlap method
Dear all,

Recently i'm using both MRIcron do the tumor segmentation.

For each patient we have 2 scans: coronal and sagittal.

I found that when i draw the tumor with MRIcron on the coronal scan, the segmentation(ROI) can be used on sagittal scan (only in MRIcron, the ROI from coronal scan cover the tumor area that shown in sagittal scan)
'''
In MRICron,
when load coronalImage as main image, load coronalROI as overlap image, the ROI cover the tumor area.
when load sagittalImage as main image, load coronalROI as overlap image, the ROI still cover the tumor area well.
'''

But when i try to extract tumor feature with ITK or other tools,
featureExtraction(coronalImage,coronalROI); it work ;
featureExtraction(sagittalImage,coronalROI); error shown up.
error message said that the ROI matrix shape is different from the Image matrix shape.

I'm wondering how MRIcorn do the overlapping process, especially between 2 images with different shape.

Thank you for your help, best regards.
Ningrong

Ps. I attached the a patient's coronalImage, coronalROI, and sagittalImage in the attachment.
Attachment: ImageAndROI.zip
Apr 22, 2019  06:04 PM | Chris Rorden
RE: Question about MRIcron image overlap method
Your coronal image has the resolution 208x11x320 voxels (in L/RxP/AxI/S dimensions), in contrast your sagittal scan is 9x224x324 voxels. Many tools require drawing masks to have a perfect one-to-one correspondence with the image they belong to. In contrast, my tools interpolate an image if it does match perfectly. Therefore, this is a limitation of the other tools you are using. 

If you use SPM, you can use the "coreg" function to warp estimate the transform from the coronal image to your sagittal image, and then apply this function to your segmented mask. 

If you use FSL's FLIRT, choose your segmented mask as the "Secondary image"
Apr 22, 2019  07:04 PM | ningrong ye - City of hope diagnostic radiology department
RE: Question about MRIcron image overlap method
Thank you Chris!
I will try those tools.
I'm just wondering how mricron do it without warp.
The result look perfect, i can impliment same method in other software.
Thank you
Ningrong
Apr 23, 2019  02:04 AM | nblauch - Carnegie Mellon University
MRIcron unable to read NIFTI datatype which is readable by other viewers
Hi. I have a nifti file which is a volumetric ROI mask output by nibabel. This file is viewable in Freeview and Mango, and is opened without issue using nifti functions in Matlab (nifti; load_untouch_nii) and Python (nibabel.load()). 

When I try to view it in MRIcron, it gives an error:
Unable to read this image format 256

256 is apparently intended to indicate uint8 but is not read by MRIcron. 

Using nibabel, with the file loaded as vol, i was able to do:
vol.header['datatype'] = 8 # was 256

and save the file. it is now loadable in MRIcron.

If compatibility for this datatype is an easy fix in MRIcron, it might save others some hassle. 

Best,
Nick
May 3, 2019  08:05 AM | Sarika C - NBRC
Making a lesion heat map
Hi all
   
       I am trying to make a lesion heat map from a group of patients. I have individual maps of the patients and I would like to create a heat map which will show which region on the brain has most overlap among the lesions. How do I do this? I have tried using Marsbar to combine my lesion ROIs but r1+r2 function simply shows all regions under both lesions instead of showing the overlap as a darker region. Pls help!!

Thanks in advance
May 3, 2019  08:05 AM | Isabelle Faillenot - university of Saint-Etienne (UJM)
Making a lesion heat map
> Hi !
you can add your binarised images of individual lesion with Im Calc in SPM menu or with fslmaths

the values of the result image will be the number of patients with a lesion in that voxel.

It helps ?
May 3, 2019  01:05 PM | Chris Rorden
RE: Making a lesion heat map
I use the MRIcron menu item Draw/Statistics/CreateOverlapImages
May 21, 2019  03:05 PM | hannasofia - Gothenburg university
Statistical significance
Hi Dr Nieto-Castanon

I took you course a few weeks ago in Boston, thank you for your time there. I didn't manage to ask you a question during the week so I hope that you might be able to answer it here.

In my project, I want to see if it is more likely that patients with an event have a significant difference in network connectivity between MPFC and PCC within the default mode network.

In 2nd lvl analysis: In Subjects effect have a variable called group, which are coded 1=event and 2=no event. I then choose Effect of group (Between subjects contrast). As seed I have MPFC, and target is PCC. For Subjects effects I have merged AllSubjects and group.

Please see attached file for a print screen.

Am I doing it right? I'm looking for the p-value to see if there's a significant difference in the connectivity between the two groups. I have already seen that the connectivity is different in the two group when I look at the groups separately. But perhaps I shouldn't do one analysis for the connectivity in now group, and then another analysis to receive the p-value when comparing the two groups?

Thank you in advance,
Hanna Eriksson
May 21, 2019  04:05 PM | Chris Rorden
RE: Statistical significance
I think you have posted this message to the incorrect forum.
May 21, 2019  07:05 PM | Elena de la Calle - Vall d'Hebron Institute of Research
How to best cite MRIcron 3D Painting Tool?
Dear developers,

Your powerful application is very useful, also beyond the field of neuroimaging. I've been working on some VOIs created with the 3D Painting Tool but located in different tissues of whole body rat acquisitions. I would like to cite this tool properly, so I'm asking you, what reference can I use for my paper?

I know this can be a repeated topic, but still I'm not sure because I already checked your paper on https://www.ncbi.nlm.nih.gov/pubmed/1156... . Is it still the best choice for my situation?

Thank you in advance
Jun 20, 2019  08:06 AM | bethparkin
background colour
How can I change the background colour to white in MRIcron when using the brain render function?
Jun 20, 2019  11:06 AM | Chris Rorden
RE: background colour
Hello

  With MRIcron the background color is part of the color scheme. Therefore, you can change the color scheme from the default "grayscale" to "spectrum", the background color will change. You can create your own color schemes by adding a new file to the "lut" folder (which stores the color "L"ook"U"p "T"ables).

An easier solution would be to use MRIcroGL 
  https://github.com/rordenlab/MRIcroGL12/releases
Choose the "Back Color" menu item from the "Color" menu to set the background color (hint: hold the "shift" key down while you select this menu item to toggle between white and black backgrounds).
Jul 29, 2019  09:07 PM | Barbara Ladisich
Voxel on x-axis contracted
HI everyone,

I'm new in using mricron for segmenting braintumors in different mri sequences (mostly in post gad MRT1, T2, FLAIR).

I exported the 3D sagittal series from our clinic's software (which represent the source data).
When I open them the x-axis seems to be contracted by half of the voxels in the axial and coronar view.

I couldn't find any option to change that in the settings of mricron.

Can anybody help me with this?

Thank you in advance!!!
Attachment: mr_icron_x.png
Jul 30, 2019  12:07 PM | Chris Rorden
RE: Voxel on x-axis contracted
This reflect a limitation of your acquisition: the spatial resolution between slices is thicker than the in-plane spatial resolution. MRIcron is showing you your raw data. With MRIcron, you can open up the Preferences and choose to reorient images when loading, which can reslice your images. 

Since you are just starting, maybe you want to try out MRIcroGL or Slicer. You may prefer their display of your anisotropic images.
Aug 13, 2019  07:08 PM | shir ben-zvi feldman - Tel-Aviv university
mricron "descriptive statistics" output
Hello,

When opening a lesion map on an atlas template and using descriptive statistics to show the regions involved in the lesion, one of the columns in the output is called FractNotZero. Do you know what this column means? is it the fraction of Structure Impacted by Lesion or the fraction of Lesion in each Structure?

Thanks,
Shir
Aug 28, 2019  07:08 PM | Chris Rorden
RE: mricron "descriptive statistics" output
An voxel without a drawing/overlay are considered to have a value of zero, those with some overlay are considered to have a value of 1. Therefore, if 90% of the region is marked with a drawing, the fraction would be 0.9.

You may want to consider trying out the more modern MRIcroGL. It will provide similar descriptives:

Background image: aal
Regions:
TotalVoxelsNotZero 291
Background image: aal
Index Name numVox numVoxNotZero fracVoxNotZero
1 "Precentral_L" 28174 291 0.010328671894967556

< Previous   1   2   3   4   5   Next >