<div dir="ltr"><font color="#3d85c6" face="arial, helvetica, sans-serif">Hi Brad,</font><div><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#3d85c6" face="arial, helvetica, sans-serif">Many thanks for this. No, I have not built SimpleITK from source. I have installed through Python (Win 10) as follows:</font></div><div><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#3d85c6" face="arial, helvetica, sans-serif">Installed VS 2015, ITK SNAP, CMake, ImageJ and Python 2.7, then from the command line:</font></div><div><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#3d85c6" style="background-color:rgb(255,255,255)" face="arial, helvetica, sans-serif"><span style="font-size:13.3333px"><code>setx SITK_SHOW_COMMAND "c:\Program Files (x86)\ImageJ\ImageJ.exe"</code></span><br></font></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif">and</font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(204,204,204)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></code></span></div><div><font face="arial, helvetica, sans-serif"><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6">conda update conda<br>conda update ipython<br>conda update spyder-app<br>conda install vtk <br>conda install --channel SimpleITK SimpleITK</font></code></span><b style="color:rgb(0,0,0);font-size:13.3333px;background-color:rgb(204,204,204)"><code><br></code></b></font></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif">Then I have run some examples from the spyder interface to verify is working.</font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif">[I have built ITK (not SimpleITK) through CMake earlier on OSx El Capitan. If I build ITK Toolkit on Win 10 via CMake, would it suffice to place the cmake file generated by You in the CMake folder, then re-run the whole process above with Python?] </font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></code></span></div><div><span style="color:rgb(61,133,198);font-family:arial,helvetica,sans-serif;font-size:13.3333px">Otherwise, how can I set-up SimpleITK from source on Win 10 with the new cmake file added?</span><br></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif"><br></font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif">Many thanks in advance.</font></code></span></div><div><span style="font-size:13.3333px;background-color:rgb(255,255,255)"><code><font color="#3d85c6" face="arial, helvetica, sans-serif">Tunde</font></code></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 March 2016 at 19:50, Lowekamp, Bradley (NIH/NLM/LHC) [C] <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hello,
<div><br>
</div>
<div>Have you built SimpleITK from the source code before?</div>
<div><br>
</div>
<div>I created a branch where I quickly created a json file for this filter, and modified the Superbuild to enable this remote module in ITK. You can find it on github here [1].</div>
<div><br>
</div>
<div>HTH,</div>
<div>Brad</div>
<div><br>
</div>
<div><br>
</div>
<div>[1] <a href="https://github.com/blowekamp/SimpleITK/tree/AddSkullStrip" target="_blank">https://github.com/blowekamp/SimpleITK/tree/AddSkullStrip</a></div>
<div><br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Tünde Szilágyi [<a href="mailto:a.tunde.szilagyi@gmail.com" target="_blank">a.tunde.szilagyi@gmail.com</a>]<br>
<b>Sent:</b> Saturday, March 19, 2016 6:06 AM<br>
<b>To:</b> Lowekamp, Bradley (NIH/NLM/LHC) [C]; <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br>
<b>Subject:</b> Re: [ITK] SimpleITK: ITKStripTsImageFilter filter/function<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Hi Brad,
<div><br>
</div>
<div>Thank you, I went through the suggested material. They indeed describe what a JSON file is and how that links into filter generation. This is informative, but for me does not give enough information to generate the filters that I would like to use from
within Python. </div>
<div><br>
</div>
<div>What is not clear to me is the following. Given that I have the following files available:</div>
<div><br>
</div>
<div>1. SkullStripping.cxx</div>
<div>2. itkStripTsImageFilter.h</div>
<div>2. itkStripTsImageFilter.hxx</div>
<div><br>
</div>
<div>How do I generate the filter file that can be accessed from within Python where I use SimpleITK. I would like to know what the exact steps are in order that I could perform this task.</div>
<div><br>
</div>
<div>Additionally, is it possible to use both ITK and SimpleITK included within the same Python script? If yes, how?</div>
<div><br>
</div>
<div>Many thanks in advance?</div>
<div><br>
</div>
<div>Tunde</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 18 March 2016 at 18:14, Lowekamp, Bradley (NIH/NLM/LHC) [C]
<span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hello,
<div><br>
</div>
<div><br>
</div>
<div>SimpleITK was not initially designed to be extendable, but we are looking to improve on that as some point in the future.</div>
<div><br>
</div>
<div>Each of the filters in SimpleITK has a JSON file describing it. You should be able to fork the SimpleITK repository and add a JSON file describing this filter. When you recompile SimpleITK along with a version of ITK with this remote module enabled it
should be there.</div>
<div><br>
</div>
<div>You can find some introductory documentation here [1]. But you really should just copy one that is close to get started. As the SkullStripping filter just has 3 image inputs I think the DemonsRegistrationFilter may be a good place to start [2].</div>
<div><br>
</div>
<div>HTH,</div>
<div>Brad</div>
<div><br>
</div>
<div>[1] <a href="http://www.itk.org/SimpleITKDoxygen/html/FilterTemplatesPage.html" target="_blank">
http://www.itk.org/SimpleITKDoxygen/html/FilterTemplatesPage.html</a></div>
<div>[2] <a href="https://github.com/SimpleITK/SimpleITK/blob/cf52abf1370f753d471d2add8e27754b4bf64b24/Code/BasicFilters/json/DemonsRegistrationFilter.json" target="_blank">https://github.com/SimpleITK/SimpleITK/blob/cf52abf1370f753d471d2add8e27754b4bf64b24/Code/BasicFilters/json/DemonsRegistrationFilter.json</a></div>
<div><br>
</div>
<div><br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Tünde Szilágyi [<a href="mailto:a.tunde.szilagyi@gmail.com" target="_blank">a.tunde.szilagyi@gmail.com</a>]<br>
<b>Sent:</b> Friday, March 18, 2016 7:58 PM<br>
<b>To:</b> <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br>
<b>Subject:</b> [ITK] SimpleITK: ITKStripTsImageFilter filter/function<br>
</font><br>
</div>
<div>
<div>
<div></div>
<div>
<div dir="ltr">Dear All,
<div><br>
</div>
<div>I have started experimenting with SimpleITK in Python. It appears to me that not all ITK functions are available in SimpleITK. I would like to use the skull stripping algorithm noted in the title. I have managed to compile this with CMake and apply to
3D brain volume and it worked :-).</div>
<div><br>
</div>
<div>My specific question is how could I use this in Python where I am using the SimpleITK functions right now? Is there a way I could pre-compile and use it the same way as SimpleITK functions are used?</div>
<div><br>
</div>
<div>Many thanks in advance.</div>
<div>
<div><br>
</div>
<div>
<div dir="ltr">--
<div>Tunde</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">--
<div>Tunde</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">--<div>Tunde</div></div></div>
</div>