SCM

CEP New

From Forge Wiki

Jump to: navigation, search
CEP Logo

When working with CamiTK, you will either work on already existing CEP or you will create yours (for your whole thesis projects for instance) and work on it. This page deals with the creation of a new CEP to work with.

Contents

Create a new CEP

If you want to work from another CEP, you may use the Wizard application in order to generate your basic CEP architecture.

Else, you may want to download the CEP structure

Open the src/CmakeList.txt file and fill the NAME, CONTACT and DESCRIPTION tags in the following lines :

camitk_extension_project(NAME "" # Either remove this option or fill the quotes
                         CONTACT "GivenName.FamilyName@imag.fr" # TODO update this
                         DESCRIPTION "CEP Skeleton. Once copied you should really update this line..." # TODO update this
                         ENABLED
)


This information are your basic CEP information, and are required for the next configuration step.

Configure a CEP

CEP source structure

Working on another CEP will lead you to work in a directory with the following architecture.

As for the CamiTK opensource framework configuration, you will use CMake tool to configure your source file into the build directory.

  • Launch the cmake tool, and provide the src and build directories of your CEP structure.
  • Click on the configure button. Your CEP will look for the camitk-config application installed on your platform. One of the goal of this application is to look for the latest install version of the CamiTK opensource framework on your computer.
  • Generate your solution.
  • Open your cep_name.sln Visual Studio solution file to work with it.

Host your CEP

To host your own CEP in a specific place, called incubator and wait for its maturation, first, please take a look CEP page, especially regarding CEP incubators.The given explanations will help you create your own CEP and host it in the corresponding servers.

Including a new library to your CEP

This page summarize the questions you should ask yourself when you consider using a library in a CEP.

There is two cases:

  • the considered library is your own, you started it from scratch (or using other libraries, then you should ask the same questions for all dependencies)
  • the considered library already exists.

If you are writing your own library, and the action or component extensions that acts as a glue to CamiTK, the easiest thing is to include your code in your CEP libraries subdirectory of your CEP. This way it will be easy to control the way your library is built and the dependencies of your action and component extensions. This also means, you can then one day easily integrates the whole or part of your CEP to higher level of private or open-source CEP. You don't need to decide yet if your library is to be included in CamiTK Open-Source, but it won't hurt to start thinking about it.

If you want to use an already existing library, then you will have to consider the following points:

  1. if it is a widely used/famous open-source library and you just need to build it any specific way, then this will be an external dependency, the source code should not be inserted in libraries. It should be easy enough to install this dependency using a package (on Linux), setup installer (windows or mac), or in the worst case consider gives instructions to build this pre-requisite. For example: the open-source imaging CEP depends on ITK, which is considered as an external dependency. To check the availability of your library as a package, check the debian package database here.
  2. if there is no package/installer available, check first if there is no alternative for it available as a package (google and the debian package database are your friends).
  3. if still there is nothing, then you can include the library code in your CEP libraries subdirectory. Please consider at that stage the license that is used by the library. It should be DFSG (Debian Free Software Guidelines) compatible.
  4. if the considered library or any alternative are not available under any DFSG (Debian Free Software Guidelines) compatible license, try harder! It is strongly recommended to use open-source libraries.
  5. If you are completely 100% sure that nothing can replace your proprietary licensed library and you have the source code, then include the library code in your CEP libraries subdirectory.
  6. if the proprietary licensed library source code is not available, put the binary files (dll for instance) in your CEP libraries subdirectory (you can then organize it as you wish)

Note on Copyright and License

If you have a different copyright than the default CamiTK project copyright (i.e. LGPL-v3), do not forget to edit the CEP top-level COPYRIGHT file in order to reflect your copyright.

Note on CMake

If you have the library source code, you will need to CMake-ify the build process.

Powered By FusionForge