[Camino-users] FA and MD alignment, registration of Freesurfer labels

Oren Geri oren_geri at yahoo.com
Fri Aug 1 03:10:29 PDT 2014


Hi Philip,
 
I still think there is a problem with the results I get when calculating
connectivity matrix. I tried calculating five area matrixes using the brain
stem, the left and right precentral gyri, and the left and right postcentral
gyri for 18 subjects. I got very large inconsistencies between subjects and
between hemispheres within subjects in the number of streamlines connecting
areas.  In some subjects the right gyri
are connected to the brainstem while the left gyri aren't.
 
I used the following steps for the diffusion data:
 
Convert Dicoms to Nifty with Mricron creating C6.nii file
 
fsl2scheme -bvecfile C6.bvec -bvalfile C6.bval >C6scheme.txt
 
image2voxel -4dimage C6.nii -outputfile C6.Bfloat
 
dtfit C6.Bfloat C6scheme.txt >diffTenC6.Bdouble
 
track -inputmodel dt -seedfile all_brain_t.nii -anisthresh 0.2
-curvethresh 60 -inputfile diffTenC6.Bdouble > Alltracts.Bfloat
 
(all_brain_t is a template of the entire image, not only the brain. I'll
probably change it to a brain mask in the future)
 
conmat -inputfile Alltracts.Bfloat -targetfile new_segmentation.nii
-outputroot mymatrix5
 
(I created the new_segmentation.nii labels with Freesurfer and SPM to
register the labels file "aprac+aseg.nii" using "orig.nii"
(the structural file) as source and the B0 data as reference)
 
Regarding the FA and MD:
 
When I used FSL to view
these file they looked aligned.
 
for PROG in fa md; do
 
cat diffTen.Bdouble | ${PROG} | voxel2image -outputroot ${PROG} -header C6.nii
done
 
(C6.nii is the nifty file from Mricron for the entire diffusion data)
 
Using:  "niftiheader -readheader <image>" on the MD
and FA produce similar results except from different row affine transform
values.

conmat -inputfile
Alltracts.Bfloat -targetfile new_segmentation.nii -scalarfile r_fa.nii -tractstat
median  -outputroot mymatrix1
 
I had to register the FA to the B0 image for this line to work. I
suppose that's because I used the entire diffusion data header to create the
FA? Perhaps if I use only B0 file instead it will also solve the SPM apparent registration
problem? 
 
To create the B0 files I manually erased the other values from the Nifti
image. I didn't change the header since SPM registration seems to work fine that
way. I suppose these two lines in Matlab are sufficient to change the header also: 
 
nii.hdr.dime.dim(1)=3;% 3 dim instead of 4
nii.hdr.dime.dim(5)=1; % reducing
the 4 dim size to 1
 
 
Thank you very much!
 Oren 
 
  


On Thursday, July 31, 2014 5:59 PM, Philip A Cook <cookpa at mail.med.upenn.edu> wrote:
 


Hi,

If you created the nii for FA and the MD with the same reference header, they ought to produce the same output. Can you send me the commands you ran? You can also run

  niftiheader -readheader <image>

to get a printout of the header information for the images involved. 

The Paraview problem is a longstanding issue with inconsistency between VTK and NIfTI data in that software. In general a Nifti image loaded into Paraview won't overlap with the same image in VTK format. I should at least make note of this in the tutorial. I would like to find a fix but I think there are heuristics inside the Paraview NIFTI code to determine how to orient things, so I've not found a single transformation that has worked consistently. 


On Jul 29, 2014, at 9:14 AM, Oren Geri <oren_geri at yahoo.com> wrote:

> Hi,
> I have a few questions about creating connectivity matrix with Camino and Freesurfer labels.
>  
> First, I followed the tutorial instructions to create fa.nii and md.nii files.
> I checked these files using SPM8 display command. The images didn't seem to be aligned, also I got different "Origin" and "Dir Cos" values for the images and a warning : "shears involved" message (This problem doesn’t occur using the tutorial data).
>  
> Second, I used Freesurfer for labeling different volumes and SPM to register the labels file "aprac+aseg.nii" using "orig.nii" (the structural file) as source and the B0 data as reference.
> I viewed some of the streamlines created by Camino (following the tutorial using dtfit) and volumes from the registered image of labels with Paraview. It seems that there is a registration problem since the streamlines appear shifted from the place they should be.
> Thanks a lot,
>  Oren
> 
> _______________________________________________
> Camino-users mailing list
> Camino-users at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/camino-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.nitrc.org/pipermail/camino-users/attachments/20140801/a9f5e066/attachment.html>


More information about the Camino-users mailing list