Coder Social home page Coder Social logo

remote-module-template's Introduction

General

Build Status

This is a template module for the ORFEO Toolbox(https://www.orfeo-toolbox.org/). It is designed to work with OTB >= 5.0 modular system. The module can be clone/copied in OTB/Module/Remote and compiled along with other OTB modules. However, it is also possible to build it as a standalone module.

This module is filled with a few templates to be used as a starting point for a module with actual content. It contains the templates for:

  • a library (cxx source in src folder)
  • headers and templated classes (include folder)
  • a OTB Application (app folder)
  • tests for C++ sources, applications and python wrappers (test folder)

This module also has its own continuous integration scripts (using Travis CI).

Getting Started

The official OTB Wiki documentation on adding an external module is here.

Remote Module

After a module has been created as a git repository it can be included as a remote module, which enables automatic fetching. Add a file in "OTB/Modules/Remote" called "YourModule.remote.cmake", for this module it would be "ExternalExample.remote.cmake" with the followlowing contents:

otb_fetch_module(ExternalTemplate
  "A template for a module."
  GIT_REPOSITORY https://github.com/orfeotoolbox/otbExternalModuleTemplate
  GIT_TAG master
  )

Editing

The files CMakeLists.txt and otb-module.cmake need to be modified with the name of the module, something along the following:

sed 's/ExternalTemplate/MyModule/g' CMakeLists.txt otb-module.cmake

There is the inplace option to sed, but it's not portable, so do this change by hand or look up the option in sed.

Then hack away at you code in include, src, test and app folders.

Continuous Integration

This module contains default files to enable Continuous Integration on Travis-CI:

  • travis-ci.yml : this is the backbone of the CI process in Travis-CI, it defines the different jobs to run, and their environment
  • ci.cmake : this CTest script drives the build and test process.
  • vcvars_proxy.py : this script is used on Windows to export variables from vcvarsall.bat to the Git-Bash executor.

The README.md starts with a Travis-CI badge, you can change it to match your own module.

If you need to access data file from OTB/Data, you can tune the file ci.cmake which will download them for you before building:

  • RM_GET_FULL_DATA: this flag will download all files under OTB/Data
  • RM_DATA_PATTERNS: this variable allows to download only the files you need. Set this variable to a list of patterns (for instance Data/Input/QB_Toulouse_*.tif). This method should be faster.

License

This software is distributed under the Apache License. Please see LICENSE for details.

Authors

Manuel Grizonnet Guillaume Pasero

Thanks

It is a fork of the ITK template module provided by Bradley Lowekamp (https://github.com/blowekamp/itkExternalTemplate.git) which was adapted for the ORFEO ToolBox.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.