[ITK] SimpleITK: ITKStripTsImageFilter filter/function

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Sat Mar 19 22:50:43 EDT 2016


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<mailto: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<mailto:a.tunde.szilagyi at gmail.com>]
Sent: Friday, March 18, 2016 7:58 PM
To: community at itk.org<mailto: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160320/4ea38eed/attachment.html>


More information about the Community mailing list