<div dir="ltr"><div><div><div><div>Hello Siming,<br><br></div>It looks like this publication is a little old (2007). A lot has changed in ITK since this article has been written. The registration and transformation framework has been greatly improved, and the ThinPlateSpline can now be used in the registration framework (see [1]). If it is what you were looking for, you may not need to integrate the code of the article you mention in ITK.<br></div>As for using the code that is available in the Insighe Journal article, one would need to first adapt the CMakeLists.txt file to be able to compile the code (see the quick adaptation of the CMakeLists.txt I wrote below). And then one would need to update the code to compile this project with a recent version of ITK.<br><br></div></div>Francois<br><div><div><br>cmake_minimum_required(VERSION 2.8.12)<br># This is based on the Insight Journal CMake Template
<br> <br>#Change PROJECT_NAME to the name of your project<br>PROJECT(KERNEL_TRANSFORM)<br> <br>ENABLE_TESTING()<br><br>find_package(ITK REQUIRED)<br>include(${ITK_USE_FILE})<br><br><br>#the following block of code is an example of how to build an executable in<br>#cmake.  Unmodified, it will add an executable called "MyExe" to the project.<br>#MyExe will be built using the files MyClass.h and MyClass.cxx, and it will<br>#be linked to all the libraries you specified above. <br>#You can build more than one executable per project<br>ADD_EXECUTABLE(itkSplineKernelTransform2Test itkSplineKernelTransform2Test.cxx) 
<br>TARGET_LINK_LIBRARIES(itkSplineKernelTransform2Test ${ITK_LIBRARIES})
<br> <br>ADD_EXECUTABLE(TPSDeformableRegistration TPSDeformableRegistration.cxx) 
<br>TARGET_LINK_LIBRARIES(TPSDeformableRegistration ${ITK_LIBRARIES})
<br><br>#the following line is an example of how to add a test to your project.<br>#Testname is the title for this particular test.  ExecutableToRun is the<br>#program which will be running this test.  It can either be a part of this<br>#project or an external executable.  After that list any args that are needed<br>#for this test.  Include as many tests as you like.  If your project doesn't have<br>#any tests you can comment out or delete the following line.<br>ADD_TEST(SplineKernelTransform2Test itkSplineKernelTransform2Test)
<br> <br>ADD_TEST(TPSDeformableRegistration TPSDeformableRegistration ${CMAKE_SOURCE_DIR}/data/transformpoints.txt ${CMAKE_SOURCE_DIR}/data/BrainProtonDensitySliceWarped.png ${CMAKE_SOURCE_DIR}/data/BrainProtonDensitySliceBorder20.png output.png diffafter.png diffbefore.png)
<br><br><br><div><br>[1] <a href="https://itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ThinPlateSplineWarp_8cxx-example.html">https://itk.org/Doxygen/html/Examples_2RegistrationITKv4_2ThinPlateSplineWarp_8cxx-example.html</a><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 5:15 PM, Sisi <span dir="ltr"><<a href="mailto:siming.bayer@gmail.com" target="_blank">siming.bayer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Francois,<br>
<br>
Thank you for your answer. In my case, I didn’t´t wrote any filter or module by myself. I just want to try a improved version of its::KernelTransform, developed by Brooks. The source code can be downloaded here (<a href="http://www.insight-journal.org/browse/publication/145" rel="noreferrer" target="_blank">http://www.insight-journal.<wbr>org/browse/publication/145</a> <<a href="http://www.insight-journal.org/browse/publication/145" rel="noreferrer" target="_blank">http://www.insight-journal.<wbr>org/browse/publication/145</a>>). So my question is really really too simple: How can I integrate those header files and .txx file into the ITK Framework? If this is a remote module, where can I find it and how can I build it?<br>
<br>
Sorry for this stupid question…<br>
<br>
Thanks for your help!<br>
best,<br>
Siming<br>
<span class="">> Am 11.08.2017 um 22:59 schrieb Francois Budin-3 [via ITK Insight Users] <<a href="mailto:ml%2Bs2283740n7590185h17@n2.nabble.com">ml+s2283740n7590185h17@n2.<wbr>nabble.com</a>>:<br>
><br>
> Hello Siming,<br>
><br>
> Welcome to ITK! I am not sure if you have had a chance to look at the ITKSoftwareGuide [1], but it is a great place to find a lot of information. The chapters that are the most relevant for you are probably Chapter 8 (How to write a filter) and Chapter 9 (How to create a module). To answer your question more specifically, the easiest way to integrate a new filter or new files to ITK is to develop an ITK module. This module can then either be compiled outside of ITK, or if you think it would be useful to the whole ITK community, it can be integrated to ITK as a remote module [2].<br>
><br>
> I hope this helps. Feel free to ask more questions.<br>
><br>
> Francois<br>
><br>
</span>> [1] <a href="https://www.itk.org/ItkSoftwareGuide.pdf" rel="noreferrer" target="_blank">https://www.itk.org/<wbr>ItkSoftwareGuide.pdf</a> <<a href="https://www.itk.org/ItkSoftwareGuide.pdf" rel="noreferrer" target="_blank">https://www.itk.org/<wbr>ItkSoftwareGuide.pdf</a>><br>
> [2] <a href="https://itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules" rel="noreferrer" target="_blank">https://itk.org/Wiki/ITK/<wbr>Policy_and_Procedures_for_<wbr>Adding_Remote_Modules</a> <<a href="https://itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules" rel="noreferrer" target="_blank">https://itk.org/Wiki/ITK/<wbr>Policy_and_Procedures_for_<wbr>Adding_Remote_Modules</a>><br>
<span class="">><br>
> On Fri, Aug 11, 2017 at 4:11 PM, Sisi <[hidden email] <x-msg://27/user/SendEmail.<wbr>jtp?type=node&node=7590185&i=<wbr>0>> wrote:<br>
> Dear all,<br>
><br>
> I am quite new with ITK. I would like to add some new .h file and .txx<br>
> files, which are not a part of the original ITK framework,  into the<br>
> original ITK Framework and use them together as library. How can I do it?<br>
><br>
> I will be very happy to get any Information/hint/guide about it.<br>
><br>
> best,<br>
> Siming<br>
><br>
><br>
><br>
><br>
> --<br>
</span>> View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/Integrate-new-h-and-txx-file-as-a-part-of-ITK-Framework-tp7590184.html" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>Integrate-new-h-and-txx-file-<wbr>as-a-part-of-ITK-Framework-<wbr>tp7590184.html</a> <<a href="http://itk-insight-users.2283740.n2.nabble.com/Integrate-new-h-and-txx-file-as-a-part-of-ITK-Framework-tp7590184.html" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>Integrate-new-h-and-txx-file-<wbr>as-a-part-of-ITK-Framework-<wbr>tp7590184.html</a>><br>
<span class="">> Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
> ______________________________<wbr>_______<br>
</span>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com/" rel="noreferrer" target="_blank">http://www.kitware.com/</a>><br>
<span class="">><br>
> Visit other Kitware open-source projects at<br>
</span>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> <<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a>><br>
<span class="">><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
</span>> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a> <<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a>><br>
<span class="">><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
</span>> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a> <<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a>><br>
<span class="">><br>
> Follow this link to subscribe/unsubscribe:<br>
</span>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a> <<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><wbr>><br>
<span class="">><br>
><br>
> ______________________________<wbr>_______<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
</span>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> <<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a>><br>
<span class="">><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
</span>> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a> <<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a>><br>
<span class="">><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
</span>> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a> <<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a>><br>
<span class="">><br>
> Follow this link to subscribe/unsubscribe:<br>
</span>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a> <<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><wbr>><br>
><br>
><br>
> If you reply to this email, your message will be added to the discussion below:<br>
> <a href="http://itk-insight-users.2283740.n2.nabble.com/Integrate-new-h-and-txx-file-as-a-part-of-ITK-Framework-tp7590184p7590185.html" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>Integrate-new-h-and-txx-file-<wbr>as-a-part-of-ITK-Framework-<wbr>tp7590184p7590185.html</a> <<a href="http://itk-insight-users.2283740.n2.nabble.com/Integrate-new-h-and-txx-file-as-a-part-of-ITK-Framework-tp7590184p7590185.html" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>Integrate-new-h-and-txx-file-<wbr>as-a-part-of-ITK-Framework-<wbr>tp7590184p7590185.html</a>><br>
> To unsubscribe from Integrate new .h and .txx file as a part of ITK Framework, click here <<a href="http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7590184&code=c2ltaW5nLmJheWVyQGdtYWlsLmNvbXw3NTkwMTg0fC0xNTI5Nzc4MTM3" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>template/NamlServlet.jtp?<wbr>macro=unsubscribe_by_code&<wbr>node=7590184&code=<wbr>c2ltaW5nLmJheWVyQGdtYWlsLmNvbX<wbr>w3NTkwMTg0fC0xNTI5Nzc4MTM3</a>>.<br>
> NAML <<a href="http://itk-insight-users.2283740.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>template/NamlServlet.jtp?<wbr>macro=macro_viewer&id=instant_<wbr>html%21nabble%3Aemail.naml&<wbr>base=nabble.naml.namespaces.<wbr>BasicNamespace-nabble.view.<wbr>web.template.NabbleNamespace-<wbr>nabble.naml.namespaces.<wbr>BasicNamespace-nabble.view.<wbr>web.template.NabbleNamespace-<wbr>nabble.naml.namespaces.<wbr>BasicNamespace-nabble.view.<wbr>web.template.NabbleNamespace-<wbr>nabble.naml.namespaces.<wbr>BasicNamespace-nabble.view.<wbr>web.template.NabbleNamespace-<wbr>nabble.naml.namespaces.<wbr>BasicNamespace-nabble.view.<wbr>web.template.NabbleNamespace-<wbr>nabble.view.web.template.<wbr>NodeNamespace&breadcrumbs=<wbr>notify_subscribers%21nabble%<wbr>3Aemail.naml-instant_emails%<wbr>21nabble%3Aemail.naml-send_<wbr>instant_email%21nabble%<wbr>3Aemail.naml</a>><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/Integrate-new-h-and-txx-file-as-a-part-of-ITK-Framework-tp7590184p7590186.html" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/<wbr>Integrate-new-h-and-txx-file-<wbr>as-a-part-of-ITK-Framework-<wbr>tp7590184p7590186.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div>