Changeset 555


Ignore:
Timestamp:
Feb 6, 2015, 5:14:27 PM (9 years ago)
Author:
djay
Message:

Fixes for OTB support. Add --with-itk and --with-itk-version options.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/thirds/otb2zcfg/otb2zcfg.cxx

    r550 r555  
    130130    for (std::vector<std::string>::const_iterator it = list.begin(); it != list.end(); ++it){
    131131      std::string filename= *it + ".zcfg";
    132       std::ofstream out(filename);
     132      std::ofstream out(filename.c_str(),std::ofstream::out);
    133133      std::streambuf *coutbuf = std::cout.rdbuf();
    134134      std::cout.rdbuf(out.rdbuf());
  • trunk/zoo-project/zoo-kernel/Makefile.in

    r550 r555  
    4646
    4747service_internal_otb.o: service_internal_otb.c service.h
    48         g++ ${OTBCFLAGS} ${CFLAGS} -c service_internal_otb.c
     48        g++ ${XML2CFLAGS} ${OTBCFLAGS} ${CFLAGS} -c service_internal_otb.c
    4949
    5050otbRunner.o: otbRunner.cxx otbRunner.h service.h
  • trunk/zoo-project/zoo-kernel/configure.ac

    r551 r555  
    8787# ===========================================================================
    8888
     89AC_ARG_WITH([itk],
     90        [AS_HELP_STRING([--with-itk=PATH], [specify an alternative location for the itk library])],
     91        [ITKPATH="$withval"], [ITKPATH=""])
     92
     93AC_ARG_WITH([itk-version],
     94        [AS_HELP_STRING([--with-itk-version=VERSION], [specify an alternative version for the itk library])],
     95        [ITKVERS="$withval"], [ITKVERS=""])
     96
    8997AC_ARG_WITH([otb],
    9098        [AS_HELP_STRING([--with-otb=PATH], [specify an alternative location for the otb library])],
     
    98106        OTB_ENABLED=""
    99107else
    100 
     108    if test -z "$ITKVERS"
     109    then
     110        ITKVERS="4.5"
     111    fi
    101112        OTB_ENABLED="-DUSE_OTB"
    102         OTB_LDFLAGS="-L$OTBPATH/lib/otb -lOTBIO -lOTBCommon -lOTBApplicationEngine -lITKBiasCorrection-4.5 -lITKCommon-4.5 -lITKIOImageBase-4.5 -lITKKLMRegionGrowing-4.5 -lITKLabelMap-4.5 -lITKMesh-4.5 -lITKMetaIO-4.5 -lITKOptimizers-4.5 -lITKPath-4.5 -lITKPolynomials-4.5 -lITKQuadEdgeMesh-4.5 -lITKSpatialObjects-4.5 -lITKStatistics-4.5 -lITKVNLInstantiation-4.5 -lITKWatersheds-4.5 -litkNetlibSlatec-4.5 -litksys-4.5 -litkdouble-conversion-4.5 -litkv3p_lsqr-4.5 -litkv3p_netlib-4.5 -litkvcl-4.5 -litkvnl-4.5 -litkvnl_algo-4.5 -litkzlib-4.5"
    103         OTB_CPPFLAGS="-I$OTBPATH/include/otb/ApplicationEngine -I$OTBPATH/include/otb/Common -I$OTBPATH/include/otb/Utilities/ITK -I$OTBPATH/include/otb/ -I$OTBPATH/include/otb/IO -I$OTBPATH/include/otb/UtilitiesAdapters/OssimAdapters -I$OTBPATH/include/otb/UtilitiesAdapters/CurlAdapters -I$OTBPATH/include/otb/Utilities/BGL -I$OTBPATH/include/otb/UtilitiesAdapters/ITKPendingPatches -I$OTBPATH/include/otb/Utilities/otbconfigfile"
     113        OTB_LDFLAGS="-L$OTBPATH/lib/otb -lOTBIO -lOTBCommon -lOTBApplicationEngine -L$ITKPATH/lib -lITKBiasCorrection-$ITKVERS -lITKCommon-$ITKVERS -lITKIOImageBase-$ITKVERS -lITKKLMRegionGrowing-$ITKVERS -lITKLabelMap-$ITKVERS -lITKMesh-$ITKVERS -lITKMetaIO-$ITKVERS -lITKOptimizers-$ITKVERS -lITKPath-$ITKVERS -lITKPolynomials-$ITKVERS -lITKQuadEdgeMesh-$ITKVERS -lITKSpatialObjects-$ITKVERS -lITKStatistics-$ITKVERS -lITKVNLInstantiation-$ITKVERS -lITKWatersheds-$ITKVERS -litkNetlibSlatec-$ITKVERS -litksys-$ITKVERS -litkdouble-conversion-$ITKVERS -litkv3p_lsqr-$ITKVERS -litkv3p_netlib-$ITKVERS -litkvcl-$ITKVERS -litkvnl-$ITKVERS -litkvnl_algo-$ITKVERS -litkzlib-$ITKVERS"
     114        OTB_CPPFLAGS="-I$OTBPATH/include/otb/ApplicationEngine -I$OTBPATH/include/otb/Common -I$ITKPATH/include/ITK-$ITKVERS -I$OTBPATH/include/otb/Utilities/ITK -I$OTBPATH/include/otb/ -I$OTBPATH/include/otb/IO -I$OTBPATH/include/otb/UtilitiesAdapters/OssimAdapters -I$OTBPATH/include/otb/UtilitiesAdapters/CurlAdapters -I$OTBPATH/include/otb/Utilities/BGL -I$OTBPATH/include/otb/UtilitiesAdapters/ITKPendingPatches -I$OTBPATH/include/otb/Utilities/otbconfigfile $GDAL_CFLAGS"
    104115        OTB_FILE="service_internal_otb.o" #otbZooWatcher.o otbRunner.o"
    105116       
     
    110121        LDFLAGS_SAVE="$LDFLAGS"
    111122        LDFLAGS="$OTB_LDFLAGS"
    112         for i in otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h; do
    113             AC_CHECK_HEADERS([$i],
     123        AC_CHECK_HEADERS([otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h],
    114124                        [], [AC_MSG_ERROR([could not find header file $i related to OTB])])
    115         done
    116125        AC_LANG_POP([C++])
    117         ##,otbWrapperInputImageListParameter,otbFilterWatcherBase.h,itksys/SystemTools.hxx,itkCommand.h,itkProcessObject.h,itkTimeProbe.h
    118126fi
    119127AC_SUBST([OTB_CPPFLAGS])
  • trunk/zoo-project/zoo-kernel/service_internal_otb.c

    r550 r555  
    2424
    2525#include "service_internal_otb.h"
    26 #include "otbWrapperInputImageListParameter.h"
    2726#include <vector>
    2827#include <string>
     
    4039
    4140int zoo_otb_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){
    42   char *pythonpath;
    43   char *python_path;
    4441  maps* m=*main_conf;
    4542  maps* inputs=*real_inputs;
    4643  maps* outputs=*real_outputs;
    47   map* tmp0=getMapFromMaps(*main_conf,"lenv","cwd");
    48   char *ntmp=tmp0->value;
    4944  map* tmp=NULL;
    5045  int res=-1;
     
    182177                    int len=atoi(tmpPath->value);
    183178                    for(int k=1;k<len;k++){
    184                       char tmp[10];
     179                      char tmp[15];
    185180                      sprintf(tmp,"cache_file_%d",k);
    186181                      map* tmpVal=getMapFromMaps(inputs,paramKey.c_str(),tmp);
  • trunk/zoo-project/zoo-kernel/service_internal_otb.h

    r550 r555  
    3030#include "otbWrapperApplication.h"
    3131#include "otbWrapperApplicationRegistry.h"
     32#include "otbWrapperInputImageListParameter.h"
    3233#include "service_internal.h"
    3334#include "service.h"
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png