[ITK] SimpleITK: ITKStripTsImageFilter filter/function

Tünde Szilágyi a.tunde.szilagyi at gmail.com
Sun Mar 20 00:41:20 EDT 2016


Hi Brad,

Many thanks for this. No, I have not built SimpleITK from source. I have
installed through Python (Win 10) as follows:

Installed VS 2015, ITK SNAP, CMake, ImageJ and Python 2.7, then from the
command line:

setx SITK_SHOW_COMMAND "c:\Program Files (x86)\ImageJ\ImageJ.exe"

and

conda update conda
conda update ipython
conda update spyder-app
conda install vtk
conda install --channel SimpleITK SimpleITK

Then I have run some examples from the spyder interface to verify is
working.

[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?]

Otherwise, how can I set-up SimpleITK from source on Win 10 with the new
cmake file added?

Many thanks in advance.
Tunde

On 19 March 2016 at 19:50, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
blowekamp at mail.nih.gov> wrote:

> Hello,
>
> Have you built SimpleITK from the source code before?
>
> 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].
>
> HTH,
> Brad
>
>
> [1] https://github.com/blowekamp/SimpleITK/tree/AddSkullStrip
>
> ------------------------------
> *From:* Tünde Szilágyi [a.tunde.szilagyi at gmail.com]
> *Sent:* Saturday, March 19, 2016 6:06 AM
> *To:* Lowekamp, Bradley (NIH/NLM/LHC) [C]; community at itk.org
> *Subject:* Re: [ITK] SimpleITK: ITKStripTsImageFilter filter/function
>
> Hi Brad,
>
> 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.
>
> What is not clear to me is the following. Given that I have the following
> files available:
>
> 1. SkullStripping.cxx
> 2. itkStripTsImageFilter.h
> 2. itkStripTsImageFilter.hxx
>
> 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.
>
> Additionally, is it possible to use both ITK and SimpleITK included within
> the same Python script? If yes, how?
>
> Many thanks in advance?
>
> Tunde
>
> On 18 March 2016 at 18:14, Lowekamp, Bradley (NIH/NLM/LHC) [C] <
> blowekamp at mail.nih.gov> wrote:
>
>> Hello,
>>
>>
>> SimpleITK was not initially designed to be extendable, but we are looking
>> to improve on that as some point in the future.
>>
>> 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.
>>
>> 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].
>>
>> HTH,
>> Brad
>>
>> [1] http://www.itk.org/SimpleITKDoxygen/html/FilterTemplatesPage.html
>> [2]
>> https://github.com/SimpleITK/SimpleITK/blob/cf52abf1370f753d471d2add8e27754b4bf64b24/Code/BasicFilters/json/DemonsRegistrationFilter.json
>>
>>
>> ------------------------------
>> *From:* Tünde Szilágyi [a.tunde.szilagyi at gmail.com]
>> *Sent:* Friday, March 18, 2016 7:58 PM
>> *To:* community at itk.org
>> *Subject:* [ITK] SimpleITK: ITKStripTsImageFilter filter/function
>>
>> Dear All,
>>
>> 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 :-).
>>
>> 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?
>>
>> Many thanks in advance.
>>
>> --
>> Tunde
>>
>
>
>
> --
> --
> Tunde
>



-- 
--
Tunde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160319/0d981570/attachment-0001.html>


More information about the Community mailing list