[root]/mrUtilities/File/Nifti

| Author | Changes | Lines of Code | Lines per Change |
|---|---|---|---|
| Totals | 83 (100.0%) | 4269 (100.0%) | 51.4 |
| justin | 67 (80.7%) | 4098 (96.0%) | 61.1 |
| eli | 11 (13.3%) | 149 (3.5%) | 13.5 |
| shani | 4 (4.8%) | 15 (0.4%) | 3.7 |
| david | 1 (1.2%) | 7 (0.2%) | 7.0 |
Check for problem opening file
2 lines of code changed in 2 files:
This function would not let you save a nifti xform set to identity. This seems like a bad assumption. It is now changed so that it will set the xform as long as the qform_code or sform_code is not set to 0.
2 lines of code changed in 1 file:
Minor, remove ver output of fileparts to avoid warning
2 lines of code changed in 2 files:
modified call to fileparts on line 35 b/c the fourth output, VERSN, of FILEPARTS will be removed in a future release.
3 lines of code changed in 1 file:
changed the call to fileparts on line 35 to only have three outputs, since fourth output, VERSN, of FILEPARTS will be removed in a future release.
1 lines of code changed in 1 file:
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:
(29 more)