dprice80 / mni2fs

MNI2FS: Surface Rendering of MNI Space Volumes for MATLAB
GNU General Public License v3.0
15 stars 6 forks source link

Prepare for fork to hand over back to Darren #4

Closed tomfrankkirk closed 6 years ago

tomfrankkirk commented 6 years ago

Code changes I have modified mni2fs_brain a lot, and then ended up dumping most of it in my main script anyway and interacting directly with the code there. It should function pretty much as before but just to be sure don’t expect it to be behave identically, regardless the important stuff is in the script.

I started modifying mni2fs_overlay but in the end decided to simply copy and paste the whole lot into the main script anyway, as above. So any changes in mni2fs_overlay can be ignored, and at any rate it’s not being called at all. Once the script works that can be become mni2fs_overlay_individual I guess.

I did create mni2fs_extract_individual, the only main change there is deciding what transforms are appropriate. This is called from the plotSurface script.

The main script is simply plotSurface. The paths are set up at the start and the desired end point is functional data interpolated onto the LH pial surface and rendered onto the inflated surface.

Data (in the /custom surf folder) The functional data I am using is called perfusion.nii. This is a NIFTI 3D volume (no time, because this dimension has already been processed down into a single image). Voxel intensities simply correspond to CBF. This is straight out of FSL and is in patient’s own structural space.

The surfaces have been generated from the patient’s T1 anatomical image via FS. I then did the conversion steps you suggested (mris-convert etc) to get them into .gii format. Right now I’m only interested in the LH, just to get things working, so the RH data can be ignored (it might not be complete).

There’s no inflation steps (I used recons-all in FS to generate these, and the output from that is either inflated or not, no steps). I want to use the pial as the lookup surface (because I am interested in cortical grey matter perfusion, so pial makes sense) and the inflated as the render surface.

The curv.mat is also generated from the FS surfaces, not exactly sure which one (js there an important difference?).

Ultimately the script should be able to run totally independently of the /surf directory, but right now because of the transformations it in theory calls for transmats (though bear in mind I commented that line out).

If you run the whole lot you should see colour overlay on roughly 30% of the brain surface. Its a start but I would expect the whole brain to be coloured, even those areas with low activity!