<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;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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:"Calibri",sans-serif;color:#1F497D">Sorry Rob, I made a mistake…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">My problem is that:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">filter_tracks is doing an OR operation rather than AND, when I use two combined ROIs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">+<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I don’t get any filtering when I use </span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-include roi1 -include roi2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",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:"Calibri",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:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Ilaria<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> mrtrix-discussion-bounces@www.nitrc.org [mailto:mrtrix-discussion-bounces@www.nitrc.org]
<b>On Behalf Of </b>Ilaria Sani<br>
<b>Sent:</b> Tuesday, June 13, 2017 3:21 PM<br>
<b>To:</b> Robert Smith <robert.smith@florey.edu.au><br>
<b>Cc:</b> mrtrix-discussion@www.nitrc.org<br>
<b>Subject:</b> Re: [Mrtrix-discussion] filter_tracks<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Rob,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",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:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">that is:
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">filter_tracks -invert -include
<i>my-combined-rois</i> <i>my-input-connectome</i> <i>output.tck</i><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",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:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",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:"Calibri",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:"Calibri",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:"Calibri",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:"Calibri",sans-serif;color:#1F497D">filter_tracks
<i>my-intput-connectome</i> -include roi1 -include roi2 -invert <i>output.tck<o:p></o:p></i></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">or<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">filter_tracks -include roi1 -include roi2 -invert <i>my-intput-connectome</i>
<i>output.tck<o:p></o:p></i></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",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:"Calibri",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:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Ilaria<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Robert Smith [<a href="mailto:robert.smith@florey.edu.au">mailto:robert.smith@florey.edu.au</a>]
<br>
<b>Sent:</b> Monday, June 12, 2017 9:05 PM<br>
<b>To:</b> Ilaria Sani <<a href="mailto:isani01@rockefeller.edu">isani01@rockefeller.edu</a>><br>
<b>Cc:</b> <a href="mailto:mrtrix-discussion@www.nitrc.org">mrtrix-discussion@www.nitrc.org</a><br>
<b>Subject:</b> Re: [Mrtrix-discussion] filter_tracks<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi <span style="font-size:9.5pt">Ilaria,</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </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> of the two ROIs is being removed.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </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> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Courier New"">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> </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> 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> </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: +61 3 9035 7128<br>
Fax: +61 3 9035 7301<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.florey.edu.au_&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&s=azRcMvKDTbK_t1OtNcmpCVjII20tAA99t5Sr3yu4Jq4&e=" target="_blank">www.florey.edu.au</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </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_&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&s=hPkZWFiRlkAopMx3WsLeANC99YUEkTBc4tHENjhzZJg&e=" target="_blank">Website</a>
- <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mrtrix.org_blog_&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&s=gEf4eHJ21qIW_lpQImNlPP8EdjUcCSia7-ecw-Hd0CY&e=" target="_blank">
Blog</a> - <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_MRtrix3_mrtrix3&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&s=48EQDWs-nHYYCnkgaJQ3hpcXHR5WhpOKgpVK50mXvYo&e=" target="_blank">
Repository</a> - <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__community.mrtrix.org_&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&s=CUiQWQ8ND7m-y9_G9tTqj19USd5e-7VReXeZUdnCvEM&e=" target="_blank">
Community forum</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Mon, Jun 12, 2017 at 4:18 AM, Ilaria Sani <<a href="mailto:isani01@mail.rockefeller.edu" target="_blank">isani01@mail.rockefeller.edu</a>> 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&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=YP6hL_RiH1GzLni5-fQIc9iVR40St75EyTMGejOj-k4&m=Vu67mF4YNrX2iO4rwrovBrbhXAwd-oou9Cr88dECwo0&s=UD94m_2Uuz6CbYnaYaw3aR0t6FUHjL-FbrtKDdj4pOg&e=" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>