<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Hi Rob,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">I’m using the syntax suggested in filter_tracks documentation:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:13.5pt;color:black">filter_tracks [ options ] input output</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">that is:
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">filter_tracks&nbsp;&nbsp;&nbsp; -invert&nbsp;&nbsp; &nbsp;&nbsp;-include&nbsp;&nbsp;&nbsp;
<i>my-combined-rois</i>&nbsp;&nbsp;&nbsp; <i>my-input-connectome</i>&nbsp;&nbsp;&nbsp; <i>output.tck</i><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">This is working, but it’s doing an AND operation rather than OR.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">I also tried to use –include twice, once for each roi.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">I don’t get any error, but no filtering is happening.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">For example, if my input connectome has 500k streamlines, the filtered output connectome will have 500k streamlines too.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Here is my syntax:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">filter_tracks&nbsp;&nbsp;&nbsp;
<i>my-intput-connectome</i>&nbsp;&nbsp;&nbsp; -include roi1&nbsp;&nbsp;&nbsp; -include roi2&nbsp;&nbsp;&nbsp; -invert <i>output.tck<o:p></o:p></i></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">or<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">filter_tracks&nbsp;&nbsp;&nbsp; -include roi1&nbsp;&nbsp;&nbsp; -include roi2&nbsp;&nbsp;&nbsp; -invert &nbsp;&nbsp;&nbsp;<i>my-intput-connectome</i>&nbsp;&nbsp;&nbsp;
<i>output.tck<o:p></o:p></i></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Is that working for you?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Am I doing something wrong/different?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Ilaria<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Robert Smith [mailto:robert.smith@florey.edu.au]
<br>
<b>Sent:</b> Monday, June 12, 2017 9:05 PM<br>
<b>To:</b> Ilaria Sani &lt;isani01@rockefeller.edu&gt;<br>
<b>Cc:</b> mrtrix-discussion@www.nitrc.org<br>
<b>Subject:</b> Re: [Mrtrix-discussion] filter_tracks<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Hi&nbsp;<span style="font-size:9.5pt">Ilaria,</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">If you combine the two ROIs into a single image, then filter_tracks will treat that singular image as a single ROI, and<br>
hence operate on any track that touches any highlighted voxel in that image.<br>
This is why any track touching <i>either</i>&nbsp;of the two ROIs is being removed.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">In order to perform your desired operation (remove all tracks that touch both ROIs), you want to use the following:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:&quot;Courier New&quot;">filter_tracks in.tck -include ROI1.mif -include ROI2.mif -invert out.tck</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">By providing the two ROIs separately to filter_tracks using separate -include options, you are specifying that you are</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">interested only in tracks that touch both ROIs. The -invert option then specifies that those streamlines elected by the</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">ROIs are to be <i>excluded</i>&nbsp;from the output, rather than being the only streamlines included in the output.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Cheers</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Rob</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><br>
--<br>
<br>
<b><span style="color:#FF6600">Robert Smith, Ph.D</span></b><span style="color:#FF6600"><br>
Senior Research Officer, Imaging Division</span><br>
<br>
The Florey Institute of Neuroscience and Mental Health<br>
Melbourne Brain Centre - Austin Campus<br>
245 Burgundy Street<br>
Heidelberg Vic 3084<br>
Ph: &#43;61 3 9035 7128<br>
Fax: &#43;61 3 9035 7301<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.florey.edu.au_&amp;d=DwMFaQ&amp;c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&amp;r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&amp;m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&amp;s=azRcMvKDTbK_t1OtNcmpCVjII20tAA99t5Sr3yu4Jq4&amp;e=" target="_blank">www.florey.edu.au</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><i>MRtrix3</i>: Advanced tools for the analysis of diffusion MRI data<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mrtrix.org_&amp;d=DwMFaQ&amp;c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&amp;r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&amp;m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&amp;s=hPkZWFiRlkAopMx3WsLeANC99YUEkTBc4tHENjhzZJg&amp;e=" target="_blank">Website</a>
 - <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mrtrix.org_blog_&amp;d=DwMFaQ&amp;c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&amp;r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&amp;m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&amp;s=gEf4eHJ21qIW_lpQImNlPP8EdjUcCSia7-ecw-Hd0CY&amp;e=" target="_blank">
Blog</a> - <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_MRtrix3_mrtrix3&amp;d=DwMFaQ&amp;c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&amp;r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&amp;m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&amp;s=48EQDWs-nHYYCnkgaJQ3hpcXHR5WhpOKgpVK50mXvYo&amp;e=" target="_blank">
Repository</a> - <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__community.mrtrix.org_&amp;d=DwMFaQ&amp;c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&amp;r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&amp;m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&amp;s=CUiQWQ8ND7m-y9_G9tTqj19USd5e-7VReXeZUdnCvEM&amp;e=" target="_blank">
Community&nbsp;forum</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Mon, Jun 12, 2017 at 4:18 AM, Ilaria Sani &lt;<a href="mailto:isani01@mail.rockefeller.edu" target="_blank">isani01@mail.rockefeller.edu</a>&gt; wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear All,<br>
<br>
I'm using Mrtrix 0.2<br>
<br>
I would like to remove some specific tracks from my connectome. Specifically all the tracks between two ROIs.<br>
<br>
The closest thing I found is filter_tracks.<br>
The ROI I’m using is the combination of the two ROIs.<br>
However filter_tracks removes all the streamlines touching one OR the other ROI.<br>
<br>
Is there a way to select only the streamlines touching both?<br>
Alternatively, is there any other tool that removes tracks between two ROIs from the connectome?<br>
<br>
Thanks!!<br>
<br>
Ilaria<br>
_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nitrc.org_mailman_listinfo_mrtrix-2Ddiscussion&amp;d=DwMFaQ&amp;c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&amp;r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&amp;m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&amp;s=UD94m_2Uuz6CbYnaYaw3aR0t6FUHjL-FbrtKDdj4pOg&amp;e=" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>