[root]/mrUtilities/File/Nifti

| Author | Changes | Lines of Code | Lines per Change |
|---|---|---|---|
| Totals | 76 (100.0%) | 4259 (100.0%) | 56.0 |
| justin | 62 (81.6%) | 4092 (96.1%) | 66.0 |
| eli | 9 (11.8%) | 145 (3.4%) | 16.1 |
| shani | 4 (5.3%) | 15 (0.4%) | 3.7 |
| david | 1 (1.3%) | 7 (0.2%) | 7.0 |
Returing sliceIndex of the files (this is used for checking l/r of anatomy)
18 lines of code changed in 1 file:
allow for hard links
3 lines of code changed in 1 file:
minor: print help info instead of crashing when you call with no arguments
9 lines of code changed in 2 files:
Adding mlrImage directory and the start of some functions that should serve as a wrapper around cbiReadNifti functions. THis will give us more flexibility in the future to be nifti independent -- for example, we can write read/write wrappers so that we aren't limited by the 16bit image width/height parameters, which is a problem for the surface images that.
Also, fixed cbiReadNiftiHeader so that it doesn't dump an error when it can't load a header, but returns gracefully with a warning and an empty header structure
11 lines of code changed in 1 file:
Added checks for correct extension and to check for file existence
15 lines of code changed in 2 files:
Now copies associated .mat file as well (i.e. .mat file with same stem name)
10 lines of code changed in 1 file:
optional paramter to allow linking rather than copying
14 lines of code changed in 1 file:
function to copy one nifti file to another location -- it handles the dual files correctly and checks for existence of files etc.
61 lines of code changed in 1 file:
Added functionality to support 1xn images where n is greater than a 16bit int width. This is useful for the surface curvature files that MLR saves. It now writes them out as a kx65535 image in which the description field holds the actualy width of the image (n). cbiRead/Write nifti can now read and write this out. Also, the old surface nifti files were based on a bit of a hack -- if the image width was 65535 it would just continue to load data, but there was no explicit setting as to what the width actually was. Those files still correctly open but the user gets an option to resave it in the new format (which is advised).
81 lines of code changed in 2 files:
Some slice perscriptions were getting weird results for what happens when you click the coronal/sagittal/axial radio buttons. I think this is because the slices are tilted backwards, and the permutation logic assigns what should really be the coronal view to the axial view. I have added a fix in here, which looks for slices that are rotated in this way and fixes the permutation matrix accordingly. I am not 100% sure that this will work for all slice orientations.
30 lines of code changed in 1 file:
print out of how much coordinates have been shifted by
3 lines of code changed in 1 file:
didn't need another +1 offset for C to matlab since jonas' xform from mlrXformFromHeader handles that
0 lines of code changed in 1 file:
implemented changes needed to handle the world2array xform that jonas' surfrelax tools assume. Basically the analyze header had fields pixdim(6:8) which is an offset and that needs to shift the origin of the coordinates in the surfaces to get them into array coordinates. This is now handled by a function xformSurfaceWorld2Array which also handles the necessary 0 to 1 based coordinate frame change. We also removed all x/y swaps which were unnecessary. loadSurfOFF was swapping xy and then we later swapped them back in loadSurface and loadFlatOFF.
6 lines of code changed in 1 file:
function from jonas which does world2array xform for surfaces. Note that there is a minor change that allows passing in a header instead of a filename
93 lines of code changed in 1 file:
*** empty log message ***
42 lines of code changed in 1 file:
if sform_Code is set then use sform rather than qform for extracting permutation matrix
6 lines of code changed in 1 file:
Switch to doing eventRelated analysis with single precision if there is not enough memory for doing double precision with a single slice at a time.
10 lines of code changed in 1 file:
suppressed qfac==0 warning, according to the nifti documentation this shouldn't happen, but specifies that it is correct to set the qfac=1 for this case. The warning crops up often--perhaps from Analyze files converted to Nifti. But, since this is defined behavior in the standard it seems better just to do it. The warning has only served to confuse people and has never indicated anything wrong with the qforms....
11 lines of code changed in 1 file:
chanded error call to mrErrorDlg
52 lines of code changed in 2 files:
errors for when fopen fails
4 lines of code changed in 2 files:
(24 more)