<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">Hi Philip,</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">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.</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">I used the following steps for the diffusion data:</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">Convert Dicoms to Nifty with Mricron creating C6.nii file</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"
class="">fsl2scheme -bvecfile C6.bvec -bvalfile C6.bval >C6scheme.txt</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">image2voxel -4dimage C6.nii -outputfile C6.Bfloat</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial;
background-position: initial; background-repeat: initial;" class="">dtfit C6.Bfloat C6scheme.txt >diffTenC6.Bdouble</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">track -inputmodel dt -seedfile all_brain_t.nii -anisthresh 0.2
-curvethresh 60 -inputfile diffTenC6.Bdouble > Alltracts.Bfloat</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">(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)</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">conmat -inputfile Alltracts.Bfloat -targetfile new_segmentation.nii
-outputroot mymatrix5</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">(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)</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">Regarding the FA and MD:</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">When I used FSL to view
these file they looked aligned.</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span lang="EN" style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">for PROG in fa md; do<o:p class="" style=""></o:p></span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span lang="EN" style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">
cat diffTen.Bdouble | ${PROG} | voxel2image -outputroot ${PROG} -header C6.nii<o:p class="" style=""></o:p></span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span lang="EN" style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">done<o:p class="" style=""></o:p></span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">(C6.nii is the nifty file from Mricron for the entire diffusion data)</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">Using: "niftiheader
-readheader <image>" on the MD
and FA produce similar results except from different row affine transform
values.</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><br></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span lang="EN" style="font-family: 'Segoe UI', sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;" class="">conmat -inputfile
Alltracts.Bfloat -targetfile new_segmentation.nii -scalarfile r_fa.nii -tractstat
median -outputroot mymatrix1</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">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? </div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">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:
</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-size: 10pt; font-family: 'Courier New';" class="">nii.hdr.dime.dim(1)=3;</span><span style="font-family:"Courier New"" class=""> % 3 dim instead of 4<o:p class="" style=""></o:p></span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-size: 10pt; font-family: 'Courier New';" class="">nii.hdr.dime.dim(5)=1; % reducing
the 4 dim size to 1</span><span style="font-family:"Courier New"" class=""><o:p class="" style=""></o:p></span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><span style="font-family:
"Courier New"" class=""><o:p class="" style=""> </o:p></span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"><o:p class="" style=""> </o:p></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;">Thank you very much!</div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"> Oren </div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"> </div><div class="" style=""><span class="" style="">
</span></div><div class="" dir="LTR" style="direction: ltr; unicode-bidi: embed;"> </div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div dir="ltr" class="" style=""> <font size="2" face="Arial" class="" style=""> On Thursday, July 31, 2014 5:59 PM, Philip A Cook <cookpa@mail.med.upenn.edu> wrote:<br class="" style=""> </font> </div> <br class="" style=""><br class="" style=""> <div class="" style="">Hi,<br clear="none" class="" style=""><br clear="none" class="" style="">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<br clear="none" class="" style=""><br clear="none" class="" style=""> niftiheader -readheader <image><br clear="none" class="" style=""><br clear="none" class="" style="">to get a printout of the header information for the images involved. <br clear="none" class="" style=""><br clear="none" class="" style="">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. <br clear="none" class="" style=""><div class="" id="yqtfd96078" style=""><br clear="none" class="" style="">On Jul 29, 2014, at 9:14 AM, Oren Geri <<a shape="rect"
ymailto="mailto:oren_geri@yahoo.com" href="mailto:oren_geri@yahoo.com" class="" style="">oren_geri@yahoo.com</a>> wrote:<br clear="none" class="" style=""><br clear="none" class="" style="">> Hi,<br clear="none" class="" style="">> I have a few questions about creating connectivity matrix with Camino and Freesurfer labels.<br clear="none" class="" style="">> <br clear="none" class="" style="">> First, I followed the tutorial instructions to create fa.nii and md.nii files.<br clear="none" class="" style="">> 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).<br clear="none" class="" style="">> <br clear="none" class="" style="">> 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.<br clear="none" class="" style="">> 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.<br clear="none" class="" style="">> Thanks a lot,<br clear="none" class="" style="">> Oren</div><br clear="none" class="" style="">> <br clear="none" class="" style="">> _______________________________________________<br clear="none" class="" style="">> Camino-users mailing list<br clear="none" class="" style="">> <a shape="rect" ymailto="mailto:Camino-users@www.nitrc.org" href="mailto:Camino-users@www.nitrc.org" class="" style="">Camino-users@www.nitrc.org</a><br clear="none" class="" style="">> <a shape="rect"
href="http://www.nitrc.org/mailman/listinfo/camino-users" target="_blank" class="" style="">http://www.nitrc.org/mailman/listinfo/camino-users</a><div class="" id="yqtfd99703" style=""><br clear="none" class="" style=""></div><br class="" style=""><br class="" style=""></div> </div> </div> </div> </div></body></html>