Dear matt,<div><br></div><div>thank you for your suggestions.</div><div><br></div><div>What stephane meant to say is that the external third party library is made of only 1 file of C Code which include many functions. Those functions manipulate points coordinates.</div>
<div><br></div><div>ITK wrappers have been written as templated function to allow to re-use Mesh / Cells / Points types and call those C functions. However, we do not have written classes for that (functors).</div><div>Our questions boils down to: shall we take a VTK style approach with a bunch of static inlined function laying inside one single class (vtk::Math), or an ITK approach where we will need to have one functor class (and thus a separate file) for each?</div>
<div><br></div><div>Additionally, we were wondering if it would be OK to just copy the C code in the corresponding functor file, to avoid having an external library with a single file? What is preferred in this case?</div>
<div><br></div><div>We know already in which module the itk Classes should be.</div><div><br></div><div>best regards,</div><div><br></div><div>alex.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 12, 2012 at 11:56 PM, Matt McCormick <span dir="ltr">&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Stephane,<br>
<br>
Thanks for making contributions to the ITK community.<br>
<br>
Regarding how to contribute new code, unless it is modifications to<br>
existing classes, the preferred method is the creation of<br>
External/Remote modules as described here:<br>
<br>
  <a href="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/ITK/ConstructITKModule/index.html" target="_blank">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/ITK/ConstructITKModule/index.html</a><br>

  <a href="http://www.itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules" target="_blank">http://www.itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules</a><br>
<br>
This is preferred as opposed to forking the main repository for a<br>
number of reasons.<br>
<br>
Regarding the third party library usage: the general process is to<br>
create a new Module for each third party library.  If the library is<br>
very small, it may be worthwhile to re-write it in ITK style instead.<br>
<div class="im"><br>
&gt;  * Our code file contain several small inline function that are all in one .cxx file.<br>
 &gt; 1 - Can we keep all the function into one file? Is there already<br>
one such file in ITK that already &gt;gather small inline function?<br>
&gt;  2 - Keep the aspect of 1 file = 1 class, and do one class for each small function in our code?<br>
<br>
</div>ITK uses an C++ object-orientated design, so re-factoring to be<br>
consistent with ITK style may be necessary.<br>
<br>
HTH,<br>
Matt<br>
<div><div class="h5"><br>
On Mon, Nov 12, 2012 at 8:56 AM, Steffan &lt;<a href="mailto:ulysse.rigaud@gmail.com">ulysse.rigaud@gmail.com</a>&gt; wrote:<br>
&gt; Hi everybody,<br>
&gt;<br>
&gt; We have an insight journal (<a href="http://hdl.handle.net/10380/3329" target="_blank">http://hdl.handle.net/10380/3329</a>) that we would<br>
&gt; like to integrate into ITK, and we are currently starting to merge them into<br>
&gt; our fork version of ITK to test.<br>
&gt; We have two questions, concerning the integration into the different module<br>
&gt; of ITK and on code design in ITK<br>
&gt;<br>
&gt; * To test the orientation of vectors, we are using a library in C that we<br>
&gt; have wrap into some ITK function. This library is a single file, done by<br>
&gt; Jonathan Shewchuk (<a href="http://www.cs.cmu.edu/~quake/robust.html" target="_blank">http://www.cs.cmu.edu/~quake/robust.html</a>) under public<br>
&gt; domain.<br>
&gt; Where should we integrate this library in ITK?<br>
&gt;   1 - In ThirdParty folder? As it is a third party library, external to ITK,<br>
&gt; and not in C++. CONS: it may be too much for only 1 file.<br>
&gt;   2 - Directly in Core/Mesh | Core/QuadEdgeMesh? This library is only on<br>
&gt; file and is use for geometrical exact orientation product mainly to be used<br>
&gt; into Mesh or QuadEdgeMesh filters. CONS: it is not an ITK/C++ files.<br>
&gt;   3 - Or we could integrate all the library into our wrappers class and then<br>
&gt; integrate our class into ITK (Mesh or QuadEdgeMesh folder for the reason<br>
&gt; explained in 2).<br>
&gt;<br>
&gt; * Our code file contain several small inline function that are all in one<br>
&gt; .cxx file.<br>
&gt;   1 - Can we keep all the function into one file? Is there already one such<br>
&gt; file in ITK that already gather small inline function?<br>
&gt;   2 - Keep the aspect of 1 file = 1 class, and do one class for each small<br>
&gt; function in our code?<br>
&gt;<br>
&gt; I hope my questions are clear enough.<br>
&gt;<br>
&gt; Thanks.<br>
&gt; Regards,<br>
&gt; --<br>
&gt; Stephane<br>
&gt;<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.kitware.com/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" target="_blank">http://www.kitware.com/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" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div>