1. 21 Aug, 2018 1 commit
  2. 08 Aug, 2018 1 commit
  3. 07 Aug, 2018 2 commits
  4. 03 Aug, 2018 1 commit
  5. 02 Aug, 2018 2 commits
  6. 19 Jul, 2018 1 commit
  7. 18 Jul, 2018 2 commits
    • Victor Poughon's avatar
      REFAC: remove unnecessary calls to c_str · ee124eea
      Victor Poughon authored
      This was done with this script:
          set -eou pipefail
          # Use C++11 sstream constructor from string
          # Exclude 'ThirdParty' because it uses ossimFilename type
          find Modules/ Examples/ -not -iwholename "*ThirdParty*" -type f -print0 | xargs -0 sed -i -E "s/std::ifstream (.*)\((.*)\.c_str\(\)/std::ifstream \1\(\2/"
          find Modules/ Examples/ -not -iwholename "*ThirdParty*" -type f -print0 | xargs -0 sed -i -E "s/std::ofstream (.*)\((.*)\.c_str\(\)/std::ofstream \1\(\2/"
          # Use C++11 ::open(const std::string&) of ifstream, ofstream, etc.
          # Exclude ThirdParty because of ossimFilename type
          find Modules/ Examples/ -not -iwholename "*ThirdParty*" -type f -print0 | xargs -0 sed -i -E "s/\.open\((.*).c_str\(\)/\.open\(\1/"
          # No need for c_str when outputing to std::cout and such
          find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/\.c_str\(\) ?<</ <</"
          # Use itk::ExceptionObject::SetDescription and SetLocation string versions
          find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/e\.SetDescription\((.*)\.c_str\(\)\)/e\.SetDescription\(\1\)/"
          find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/e\.SetLocation\((.*)\.c_str\(\)\)/e\.SetLocation\(\1\)/"
          # Use itksys::SystemTool:: string versions
          find Modules/ Examples/ -type f -print0 | xargs -0 sed -i -E "s/itksys::SystemTools::(.*)\((.*)\.c_str\(\)/itksys::SystemTools::\1\(\2/"
          # Exclude otbLogger because it uses GetCurrentDateTime which does not have a string version
          git checkout --  Modules/Core/Common/src/otbLogger.cxx
          # Exclude test/otbOGRLayerStreamStitchingFilter.cxx because there's a double use which is not compatible with the regex
          git checkout -- Modules/Segmentation/OGRProcessing/test/otbOGRLayerStreamStitchingFilter.cxx
    • Victor Poughon's avatar
      COMP: add missing string includes · fc923078
      Victor Poughon authored
      Before this commit, many files are using std::string without including
      <string>. It can work accidentally but causes issues when refactoring,
      especially if using operator <<() which is included implicitly by some
      To find guilty header files, I used:
          grep -l "^ *std::string" $(grep -L "#include <string>" $(find . -type f -name "*.h"))
      which finds all files containing "std::string" at the beginning of a line
      (usually a member or variable declaration), but not "#include <string>".
      And then this script to add the includes (plus some manual ediing):
          #!/usr/bin/env python3
          import re
          import argparse
          def fix_file(filename, header):
              with open(filename, "r") as f:
                  content = f.read()
              matches = list(re.finditer(r"(#include .*\n)\n", content))
              if len(matches) == 0:
                  print("no include!")
              pos = matches[-1].end(1)
              open(filename, "w").write(content[:pos] + "#include <{}>\n".format(header) + content[pos:])
          if __name__ == "__main__":
              parser = argparse.ArgumentParser()
              parser.add_argument('--header', type=str, required=True)
              parser.add_argument('files', type=str, nargs='+')
              args = parser.parse_args()
              for filename in args.files:
                  fix_file(filename, args.header)
  8. 13 Jul, 2018 1 commit
  9. 12 Jul, 2018 3 commits
  10. 10 Jul, 2018 1 commit
  11. 09 Jul, 2018 1 commit
  12. 06 Jul, 2018 4 commits
  13. 05 Jul, 2018 4 commits
  14. 04 Jul, 2018 1 commit
  15. 03 Jul, 2018 3 commits
    • Victor Poughon's avatar
    • Rashad Kanavath's avatar
      ENH: install descriptors in share/otb/description · a5bd3a21
      Rashad Kanavath authored
      share/otb directory contains i18n and maybe other data files for OTB.
      This allows to simply some code.
      * avoid search and install of i18n files in package scripts
      * use of OTB_INSTALL_DESCR cmake variable for storing qgis description
      * install qgis description to share/otb/description in all cases:
       ** build directory, otb, superbuild, remote modules?
       ** generate of missing description file when loading qgis plugin. (This
       always goes to share/otb/description)
       ** packaging in debian, ubuntu and binary packages
      * unversioned otb doc folder. share/doc/OTB-X.Y -> share/doc/otb. This is where all VERSION , LICENSE are kept.
    • Victor Poughon's avatar
      ENH: better for loop (!150 code review) · d2e711c5
      Victor Poughon authored
  16. 29 Jun, 2018 1 commit
  17. 26 Jun, 2018 1 commit
  18. 25 Jun, 2018 4 commits
    • Victor Poughon's avatar
    • Manuel Grizonnet's avatar
    • Manuel Grizonnet's avatar
      ENH: rename files with txx extension to hxx · 3a1fd1fc
      Manuel Grizonnet authored
      OTB followed since the beginning the ITK convention and use .txx extension for all
      template classes. Nevertheless, some development tools do not recognize .txx
      file extension. Other tool like GitHub can't do in-browser syntax highlighting for
      txx files I think.
      The root problem is the use of the txx which should be changed to hxx (or hpp).
      In 2011, after an in-depth discussion near April 20, 2011 on the
      Insight-Developers mailing list, ITK rename all txx files to hxx (and event
      prevent the push of .txx files with a pre-commit hook). It happens is major release v4.
      You can find some arguments in the discussion about the change and also in other
      projects related to ITK which applied the same modification, see for instance VXL:
      This commit apply now the same modification for OTB.
      I understand that it will change some habit for developers and don't bring new
      features but I think that in general it is better to stay align with ITK guidelines.
      In my opinion, it always facilitate the use of OTB and ITK together if we share
      when we can the same code architecture, directory organization, naming
    • Victor Poughon's avatar
  19. 21 Jun, 2018 1 commit
  20. 20 Jun, 2018 5 commits