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"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></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>
> * Our code file contain several small inline function that are all in one .cxx file.<br>
> 1 - Can we keep all the function into one file? Is there already<br>
one such file in ITK that already >gather small inline function?<br>
> 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 <<a href="mailto:ulysse.rigaud@gmail.com">ulysse.rigaud@gmail.com</a>> wrote:<br>
> Hi everybody,<br>
><br>
> 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>
> like to integrate into ITK, and we are currently starting to merge them into<br>
> our fork version of ITK to test.<br>
> We have two questions, concerning the integration into the different module<br>
> of ITK and on code design in ITK<br>
><br>
> * To test the orientation of vectors, we are using a library in C that we<br>
> have wrap into some ITK function. This library is a single file, done by<br>
> 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>
> domain.<br>
> Where should we integrate this library in ITK?<br>
> 1 - In ThirdParty folder? As it is a third party library, external to ITK,<br>
> and not in C++. CONS: it may be too much for only 1 file.<br>
> 2 - Directly in Core/Mesh | Core/QuadEdgeMesh? This library is only on<br>
> file and is use for geometrical exact orientation product mainly to be used<br>
> into Mesh or QuadEdgeMesh filters. CONS: it is not an ITK/C++ files.<br>
> 3 - Or we could integrate all the library into our wrappers class and then<br>
> integrate our class into ITK (Mesh or QuadEdgeMesh folder for the reason<br>
> explained in 2).<br>
><br>
> * Our code file contain several small inline function that are all in one<br>
> .cxx file.<br>
> 1 - Can we keep all the function into one file? Is there already one such<br>
> file in ITK that already gather small inline function?<br>
> 2 - Keep the aspect of 1 file = 1 class, and do one class for each small<br>
> function in our code?<br>
><br>
> I hope my questions are clear enough.<br>
><br>
> Thanks.<br>
> Regards,<br>
> --<br>
> Stephane<br>
><br>
</div></div>> _____________________________________<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>
><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>