MRIcroN - tips
Bounding box
You can get voxel and bounding box information from mricron using the header information. From mricron, open the image, and go Ctrl^I or Window, Information.The voxel dimensions are under Length(1), and the x/y/z voxel size in mm are under Spacing (2).
The x/y/z offsets are the right-most column of the Affine parameters, under the Reorient tab.
4D timetrends
MRIcroN can display timetrends when you click on a brain location, so it's great for exploring data.
Open and view
- Open a background file in MRIcron
- Can be anatomical, template, individual
- Window => 4D Traces
- Click "Open Data" button; this will ask for 3 files:
1) select data in 4D *.nii.gz format (see below)
2) Optionally, select an events file (to show red lines where challenges start, and to do averaging); Cancel to skip
Note: if you select an events file, you cannot extract values (below).
3) Cancel or optionally, select a VOI file (or multiple files); this will show timetrends from the voi's only
- Enter the TR in the menubar
Now if you double-click on the image (assuming you did not select a VOI), it will show the timetrend at that voxel.
Extract Values
- Open and view a timetrend without including events (i.e., do not select the events file after the 4D data are opened)
- Open a blank Excel spreadsheet
- In the timetrend window, once you have the timetrend displayed, click "Text"
- The values will be displayed in the Descriptive Statistics window; either save as a text file, or Edit => Copy and paste into Excel
- In Excel, you can put into a column by copying the row of values, and Paste Special (little arrow under "Paste"), transpose.
Important!!
The data are shown without reslicing, which nearly always means L/R flipped. Further, you should not have any image yoked, otherwise it gets muddled trying to yoke voxel data to MNI space coordinates.
To turn off yoking: View, Yoke (deselect)
Another option if you really want to yoke is to turn off reslicing ("Help" => "Preferences" => deselect "Reorient", restart MRIcroN) - but remember that the all images need to be in the same space with the same slice orientations/locations etc for yoking to work (you can use the coregister, reslice option to create say a T1 file in the same space as an fMRI file).
Creating files
You make the 4D file using CSPM in two steps: 1) Create 4D file: "Image" => "Convert 3D to 4D" (note that the 3D files will be replaced, so you may want to copy them to a new folder first). 2) Convert the 4D *.nii file to *.nii.gz: "Image" => "Convert nii.gz <=> nii" (change the file type to "nii" so you can see the 4D file you created)
The events files are text files with the time, duration (both in seconds) and event number recorded row-by-row, in time sequence - e.g.: 70 40 1 150 40 1 230 40 1 (save as something like events.txt).