[Insight-users] Code integration and code design - Question
Alexandre GOUAILLARD
agouaillard at gmail.com
Mon Nov 12 11:31:35 EST 2012
Dear matt,
thank you for your suggestions.
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.
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).
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?
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?
We know already in which module the itk Classes should be.
best regards,
alex.
On Mon, Nov 12, 2012 at 11:56 PM, Matt McCormick <matt.mccormick at kitware.com
> wrote:
> Hi Stephane,
>
> Thanks for making contributions to the ITK community.
>
> Regarding how to contribute new code, unless it is modifications to
> existing classes, the preferred method is the creation of
> External/Remote modules as described here:
>
>
> http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/ITK/ConstructITKModule/index.html
>
> http://www.itk.org/Wiki/ITK/Policy_and_Procedures_for_Adding_Remote_Modules
>
> This is preferred as opposed to forking the main repository for a
> number of reasons.
>
> Regarding the third party library usage: the general process is to
> create a new Module for each third party library. If the library is
> very small, it may be worthwhile to re-write it in ITK style instead.
>
> > * Our code file contain several small inline function that are all in
> one .cxx file.
> > 1 - Can we keep all the function into one file? Is there already
> one such file in ITK that already >gather small inline function?
> > 2 - Keep the aspect of 1 file = 1 class, and do one class for each
> small function in our code?
>
> ITK uses an C++ object-orientated design, so re-factoring to be
> consistent with ITK style may be necessary.
>
> HTH,
> Matt
>
> On Mon, Nov 12, 2012 at 8:56 AM, Steffan <ulysse.rigaud at gmail.com> wrote:
> > Hi everybody,
> >
> > We have an insight journal (http://hdl.handle.net/10380/3329) that we
> would
> > like to integrate into ITK, and we are currently starting to merge them
> into
> > our fork version of ITK to test.
> > We have two questions, concerning the integration into the different
> module
> > of ITK and on code design in ITK
> >
> > * To test the orientation of vectors, we are using a library in C that we
> > have wrap into some ITK function. This library is a single file, done by
> > Jonathan Shewchuk (http://www.cs.cmu.edu/~quake/robust.html) under
> public
> > domain.
> > Where should we integrate this library in ITK?
> > 1 - In ThirdParty folder? As it is a third party library, external to
> ITK,
> > and not in C++. CONS: it may be too much for only 1 file.
> > 2 - Directly in Core/Mesh | Core/QuadEdgeMesh? This library is only on
> > file and is use for geometrical exact orientation product mainly to be
> used
> > into Mesh or QuadEdgeMesh filters. CONS: it is not an ITK/C++ files.
> > 3 - Or we could integrate all the library into our wrappers class and
> then
> > integrate our class into ITK (Mesh or QuadEdgeMesh folder for the reason
> > explained in 2).
> >
> > * Our code file contain several small inline function that are all in one
> > .cxx file.
> > 1 - Can we keep all the function into one file? Is there already one
> such
> > file in ITK that already gather small inline function?
> > 2 - Keep the aspect of 1 file = 1 class, and do one class for each
> small
> > function in our code?
> >
> > I hope my questions are clear enough.
> >
> > Thanks.
> > Regards,
> > --
> > Stephane
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121113/20461a79/attachment.htm>
More information about the Insight-users
mailing list