<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Thanks Rodrigo.
<div class=""><br class="">
</div>
<div class="">I don't know much about TrackVis but the Camino streamline format is documented here:</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://camino.cs.ucl.ac.uk/index.php?n=Main.Fileformats#toc11" class="">http://camino.cs.ucl.ac.uk/index.php?n=Main.Fileformats#toc11</a></div>
<div class=""><br class="">
</div>
<div class="">It's big-endian, 32-bit floats, which should be readable directly into Matlab if needed. You need to read them iteratively. The first value tells you how many points follow. The next is an integer index (but still stored as float) indicating which
 point is the seed point. Then the points themselves follow. Repeat until EOF.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div style="">
<blockquote type="cite" class="">
<div class="">On Nov 13, 2017, at 11:14 AM, Perea Camargo, Rodrigo Dennis &lt;<a href="mailto:RPEREACAMARGO@mgh.harvard.edu" class="">RPEREACAMARGO@mgh.harvard.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Hi Mahmoud,<span class="Apple-converted-space">&nbsp;</span><o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
In case this helps, I am currently working on some of these tools to read *.trk and *.trk.gz files in matlab (coming from trackvis/dsi_studio, it will be interesting to see if they also work with camino output).<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
The function to read these tracts is here:<span class="Apple-converted-space">&nbsp;</span><a href="https://github.com/Drigomaniac/rotrk_landmarks/blob/master/rotrk_read.m" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">https://github.com/Drigomaniac/rotrk_landmarks/blob/master/rotrk_read.m</a><o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
The Information was extracted from:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.trackvis.org/docs/?subsect=fileformat" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">http://www.trackvis.org/docs/?subsect=fileformat</a><o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Hope this helps,<span class="Apple-converted-space">&nbsp;</span><o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Rodrigo<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class="">&nbsp;</o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class="">&nbsp;</o:p></div>
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><span style="font-size: 12pt;" class="">From:<span class="Apple-converted-space">&nbsp;</span></span></b><span style="font-size: 12pt;" class="">&lt;<a href="mailto:camino-users-bounces@www.nitrc.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">camino-users-bounces@www.nitrc.org</a>&gt;
 on behalf of Mahmoud &lt;<a href="mailto:zeydabadi@gmail.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zeydabadi@gmail.com</a>&gt;<br class="">
<b class="">Date:<span class="Apple-converted-space">&nbsp;</span></b>Monday, November 13, 2017 at 11:06 AM<br class="">
<b class="">To:<span class="Apple-converted-space">&nbsp;</span></b>&quot;<a href="mailto:camino-users@www.nitrc.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">camino-users@www.nitrc.org</a>&quot; &lt;<a href="mailto:camino-users@www.nitrc.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">camino-users@www.nitrc.org</a>&gt;<br class="">
<b class="">Subject:<span class="Apple-converted-space">&nbsp;</span></b>[Camino-users] Bfloat to Matlab<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div class="">
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Hello all,<o:p class=""></o:p></div>
</div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I used the following commands to do tractography with camino. Could someone please let me know whether I did it right and if it's correct how can I read that bfloat file in MATLAB? My goal is to have the coordinate of fiber tracts in MATLAB.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><i class="">fslmaths&nbsp; $1/$sub/data/data_FA.nii.gz -thr 0.3 -bin $1/$sub/tract/data_FA_thr03.nii.gz</i></b><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><i class="">cp $1/$sub/data/nodif_brain_mask_trimmed.nii.gz $1/$sub/tract/nodif_brain_mask_trimmed.nii.gz</i></b><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><i class="">TVFromEigenSystem -basename $1/$sub/data/data -type FSL -out $1/$sub/tract/data_tensor.nii.gz</i></b><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><i class="">/camino/bin/nii2dt -inputfile $1/$sub/tract/data_tensor.nii.gz -bgmask $1/$sub/tract/nodif_brain_mask_trimmed.nii.gz -uppertriangular &gt; $1/$sub/tract/tensor.Bdouble</i></b><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><i class="">cat $1/$sub/tract/tensor.Bdouble | track -inputmodel dt -seedfile $1/$sub/tract/data_FA_thr03.nii.gz -outputroot $1/$sub/tract/WB_one_tensor -curvethresh 80 -anisthresh 0.3</i></b><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><i class="">camino_to_trackvis -i $1/$sub/tract/WB_one_tensor1.Bfloat -o $1/$sub/tract/WB_one_tensor.trk --nifti $1/$sub/tract/nodif_brain_mask_trimmed.nii.gz --phys-coords</i></b><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class="">&nbsp;</o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Thank you!<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Mahmoud<o:p class=""></o:p></div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<br class="webkit-block-placeholder">
</div>
<p style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
The information in this e-mail is intended only for the person to whom it is<br class="">
addressed. If you believe this e-mail was sent to you in error and the e-mail<br class="">
contains patient information, please contact the Partners Compliance HelpLine at<br class="">
<a href="http://www.partners.org/complianceline" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">http://www.partners.org/complianceline</a><span class="Apple-converted-space">&nbsp;</span>. If the e-mail was sent to you in error<br class="">
but does not contain patient information, please contact the sender and properly<br class="">
dispose of the e-mail.</p>
<span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<span style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">Camino-users
 mailing list</span><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<a href="mailto:Camino-users@www.nitrc.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">Camino-users@www.nitrc.org</a><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<a href="https://www.nitrc.org/mailman/listinfo/camino-users" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">https://www.nitrc.org/mailman/listinfo/camino-users</a><br style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>