Re: [otb-users] ITK configuration file for cmake (Windows compilation)

2017-11-01 Thread Baptiste Lafabregue
Hi,

Sorry to respond that late. Your suggestion worked but I encountered some 
other problem afterwards.
Then I changed the xdk used to last one (the 5.9 was linked on the wiki), 
then everything went fine. 

Best regards,
Baptiste


On Monday, October 30, 2017 at 2:48:42 PM UTC+1, Guillaume Pasero wrote:
>
> Hi,
>
> Depending on your install of ITK, you can set the variable ITK_DIR in the 
> OTB build configuration. This variable should contain the path to the 
> folder containing ITKConfig.cmake. For instance, if you use OTB binary 
> package, it should be something like : 
> .../OTB-6.2.0-Win64/lib/cmake/ITK-4.12
>
> Regards,
>
> Guillaume
>
> On 10/30/2017 10:01 AM, Baptiste Lafabregue wrote:
>
> Hello, 
>
> I'm trying to compile OTB on windows (on a 64b machine). I followed the 
> steps from the wiki, but when I want to configure the build it stops with 
> the following message : 
>
> *CMake Warning at Modules/ThirdParty/ITK/otb-module-init.cmake:103 
> (find_package):*
> *  By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has*
> *  asked CMake to find a package configuration file provided by "ITK", but*
> *  CMake did not find one.*
>
> *  Could not find a package configuration file provided by "ITK" with any 
> of*
> *  the following names:*
>
> *ITKConfig.cmake*
> *itk-config.cmake*
>
> *  Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set 
> "ITK_DIR"*
> *  to a directory containing one of the above files.  If "ITK" provides a*
> *  separate development package or SDK, be sure it has been installed.*
> *Call Stack (most recent call first):*
> *  CMake/OTBModuleEnablement.cmake:394 (include)*
> *  CMakeLists.txt:326 (include)*
>
> From what I understood FindITK.cmake is no more provided with cmake 3.0 
> and above. On the other hand ITK comply to cmake 3.0+ only with version 
> 4.0+. 
> Is there a way to solve this ?
>
> Thank you,
> Baptiste 
>
> -- 
> -- 
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>  
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to otb-...@googlegroups.com 
> 
> To unsubscribe from this group, send email to
> otb-users+...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to otb-users+...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
>  *Guillaume PASERO*
> Responsable technique
> *Business Unit ESPACE & GeoInformation - Département Payload Data & 
> Applications*
>
> *CS Systèmes d'Information*
> Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
> 31506 Toulouse Cedex 05 - FRANCE
> +33 561 17 64 21 - guillaum...@c-s.fr  
>

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [otb-users] ITK configuration file for cmake (Windows compilation)

2017-10-30 Thread Guillaume Pasero

  
  
Hi,
Depending on your install of ITK, you can set the variable
  ITK_DIR in the OTB build configuration. This variable should
  contain the path to the folder containing ITKConfig.cmake. For
  instance, if you use OTB binary package, it should be something
  like : .../OTB-6.2.0-Win64/lib/cmake/ITK-4.12
Regards,
Guillaume


On 10/30/2017 10:01 AM, Baptiste
  Lafabregue wrote:


  Hello,


I'm trying to compile OTB on windows (on a 64b machine). I
  followed the steps from the wiki, but when I want to configure
  the build it stops with the following message :
  
  
  
CMake Warning at
Modules/ThirdParty/ITK/otb-module-init.cmake:103
(find_package):
  By not providing "FindITK.cmake" in
CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file
provided by "ITK", but
  CMake did not find one.

  
  Could not find a package configuration file
provided by "ITK" with any of
  the following names:

  
    ITKConfig.cmake
    itk-config.cmake

  
  Add the installation prefix of "ITK" to
CMAKE_PREFIX_PATH or set "ITK_DIR"
  to a directory containing one of the above files. 
If "ITK" provides a
  separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
  CMake/OTBModuleEnablement.cmake:394 (include)
  CMakeLists.txt:326 (include)
  
  
  
  From what I understood FindITK.cmake is no more provided
with cmake 3.0 and above. On the other hand ITK comply to
cmake 3.0+ only with version 4.0+. 
  Is there a way to solve this ?
  
  
  Thank you,
  Baptiste 
  
  

  
  -- 
  -- 
  Check the OTB FAQ at
  http://www.orfeo-toolbox.org/FAQ.html
   
  You received this message because you are subscribed to the Google
  Groups "otb-users" group.
  To post to this group, send email to otb-users@googlegroups.com
  To unsubscribe from this group, send email to
  otb-users+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/otb-users?hl=en
  --- 
  You received this message because you are subscribed to the Google
  Groups "otb-users" group.
  To unsubscribe from this group and stop receiving emails from it,
  send an email to otb-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.


-- 
  

  
  
  Guillaume PASERO
Responsable technique
Business Unit ESPACE & GeoInformation -
  Département Payload Data & Applications

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des
Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - guillaume.pas...@c-s.fr
  
  

  

  




-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
 
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[otb-users] ITK configuration file for cmake (Windows compilation)

2017-10-30 Thread Baptiste Lafabregue
Hello,

I'm trying to compile OTB on windows (on a 64b machine). I followed the 
steps from the wiki, but when I want to configure the build it stops with 
the following message :

*CMake Warning at Modules/ThirdParty/ITK/otb-module-init.cmake:103 
(find_package):*
*  By not providing "FindITK.cmake" in CMAKE_MODULE_PATH this project has*
*  asked CMake to find a package configuration file provided by "ITK", but*
*  CMake did not find one.*

*  Could not find a package configuration file provided by "ITK" with any 
of*
*  the following names:*

*ITKConfig.cmake*
*itk-config.cmake*

*  Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set 
"ITK_DIR"*
*  to a directory containing one of the above files.  If "ITK" provides a*
*  separate development package or SDK, be sure it has been installed.*
*Call Stack (most recent call first):*
*  CMake/OTBModuleEnablement.cmake:394 (include)*
*  CMakeLists.txt:326 (include)*

>From what I understood FindITK.cmake is no more provided with cmake 3.0 and 
above. On the other hand ITK comply to cmake 3.0+ only with version 4.0+. 
Is there a way to solve this ?

Thank you,
Baptiste 

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [otb-users] itk errors in python script

2017-04-25 Thread Natalie Verde
Hello,

it worked!!! Thank you very much Guillaume!!

Regards,
Natalie

On Monday, April 24, 2017 at 7:43:02 PM UTC+3, Guillaume Pasero wrote:
>
> Hi,
>
> Try to add this line before the SetParameterString("field",'cl') : 
>
> PolygonClassStatistics.UpdateParameters()
>
> Guillaume
> On 03/28/2017 02:18 PM, Natalie Verde wrote:
>
> Hello to all,
>
> I'm new to OTB and trying to write a classification script using python.
> I have an itk Error while trying to run some otbApplications. 
> Specifically, when trying to run the PolygonClassStatistics app, I get:
>
> "exceptions.RuntimeError:Exception thrown in otbApplication 
> Application_SetParameterString: 
> C:\dashboard\otb\scr\Modules\Wrappers\Applicatio...:
> itk::ERROR: ListViewParameter(062DC770):
> Cannot find cl"
>
> I've doubled checked that my class field is called "cl".
>
> Even if I run the PolygonClassStatistics GUI to extract the statistics 
> xml, and then try to run the SampleSelection app with the xml I extracted 
> before, I get another itk error:
>
> "exceptions.RuntimeError:Exception thrown in otbApplication 
> Application_ExecuteAndWriteOutput: 
> C:\dashboard\otb\scr\Modules\Wrappers\Applicatio...:267:
> itk::ERROR: Fatal error caught. Aborting..."
>
> The RadiometricIndices app I run on my script works fine.
>
> Thank you in advance
>
> Regards,
> Natalie
>
> -
> OS: Windows 10 64-bit OS
> OTB version: OTB-contrib-5.10.1-win64
> Scripter: PyScripter
>
> My script is:
>
> import sys
> import os
> import otbApplication
> import numpy as np
> import  commands
>
> #--1. Polygon Class 
> Statistics--
> # The following line creates an instance of the PolygonClassStatistics 
> application
> PolygonClassStatistics = 
> otbApplication.Registry.CreateApplication('PolygonClassStatistics')
> # We print the keys of all its parameter
> print PolygonClassStatistics.GetParametersKeys()
> # The following lines set all the application parameters:
> # First, we set the input image filename
> PolygonClassStatistics.SetParameterString("in", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Data\Dimou\2007\2007.tif")
> # input vector filename
> PolygonClassStatistics.SetParameterString("vec", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\samptriad.shp")
> #vector field name
> PolygonClassStatistics.SetParameterString("field", 'cl')
> # Set the output filename, using the algorithm to differentiate the outputs
> PolygonClassStatistics.SetParameterString("out", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\1triadsamples.xml")
> # This will execute the application and save the output file
> PolygonClassStatistics.ExecuteAndWriteOutput()
>
> #--2. Select 
> Samples
> # The following line creates an instance of the SampleSelection application
> SampleSelection = 
> otbApplication.Registry.CreateApplication("SampleSelection")
> # The following lines set all the application parameters:
> SampleSelection.SetParameterString("in", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Data\Dimou\2007\2007.tif")
> SampleSelection.SetParameterString("vec", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\samptriad.shp")
> SampleSelection.SetParameterString("instats", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\1triadsamples.xml")
> SampleSelection.SetParameterString("out", 
> r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\2triadsampselect.shp")
> # The following line execute the application
> SampleSelection.ExecuteAndWriteOutput()
>
> -- 
> -- 
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>  
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to otb-...@googlegroups.com 
> 
> To unsubscribe from this group, send email to
> otb-users+...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to otb-users+...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
>  *Guillaume PASERO*
> Responsable technique
> *Business Unit ESPACE & GeoInformation - Département Payload Data & 
> Applications*
>
> *CS Systèmes d'Information*
> Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
> 31506 Toulouse Cedex 05 - FRANCE
> +33 561 17 64 21 - guillaum...@c-s.fr  
>

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, 

Re: [otb-users] itk errors in python script

2017-04-24 Thread Guillaume Pasero

  
  
Hi,
Try to add this line before the SetParameterString("field",'cl')
  : 

  PolygonClassStatistics.UpdateParameters()

Guillaume

On 03/28/2017 02:18 PM, Natalie Verde
  wrote:


  
Hello to all,


I'm new to OTB and trying to write a classification script
  using python.
I have an itk Error while trying to run some
  otbApplications. Specifically, when trying to run the
  PolygonClassStatistics app, I get:


"exceptions.RuntimeError:Exception thrown in otbApplication
  Application_SetParameterString: 
C:\dashboard\otb\scr\Modules\Wrappers\Applicatio...:
itk::ERROR: ListViewParameter(062DC770):
Cannot find cl"


I've doubled checked that my class field is called "cl".


Even if I run the PolygonClassStatistics GUI to extract the
  statistics xml, and then try to run the SampleSelection app
  with the xml I extracted before, I get another itk error:


"exceptions.RuntimeError:Exception thrown in otbApplication
  Application_ExecuteAndWriteOutput: 
C:\dashboard\otb\scr\Modules\Wrappers\Applicatio...:267:
itk::ERROR: Fatal error caught. Aborting..."


The RadiometricIndices app I run on my script works fine.


Thank you in advance


Regards,
Natalie


-
	
OS: 		Windows
  10 64-bit OS
OTB version:	OTB-contrib-5.10.1-win64
Scripter:	PyScripter


My script is:


import sys
import os
import otbApplication
import numpy as np
import  commands


#--1. Polygon Class
  Statistics--
# The following line creates an instance of the
  PolygonClassStatistics application
PolygonClassStatistics =
  otbApplication.Registry.CreateApplication('PolygonClassStatistics')
# We print the keys of all its parameter
print PolygonClassStatistics.GetParametersKeys()
# The following lines set all the application parameters:
# First, we set the input image filename
PolygonClassStatistics.SetParameterString("in",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Data\Dimou\2007\2007.tif")
# input vector filename
PolygonClassStatistics.SetParameterString("vec",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\samptriad.shp")
#vector field name
PolygonClassStatistics.SetParameterString("field", 'cl')
# Set the output filename, using the algorithm to
  differentiate the outputs
PolygonClassStatistics.SetParameterString("out",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\1triadsamples.xml")
# This will execute the application and save the output
  file
PolygonClassStatistics.ExecuteAndWriteOutput()


#--2. Select
  Samples
# The following line creates an instance of the
  SampleSelection application
SampleSelection =
  otbApplication.Registry.CreateApplication("SampleSelection")
# The following lines set all the application parameters:
SampleSelection.SetParameterString("in",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Data\Dimou\2007\2007.tif")
SampleSelection.SetParameterString("vec",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\samptriad.shp")
SampleSelection.SetParameterString("instats",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\1triadsamples.xml")
SampleSelection.SetParameterString("out",
r"C:\Users\Natalie\Dropbox\ATM_auth_pgp\THESIS\Files\Classifications\2triadsampselect.shp")
# The following line execute the application
SampleSelection.ExecuteAndWriteOutput()


  
  -- 
  -- 
  Check the OTB FAQ at
  http://www.orfeo-toolbox.org/FAQ.html
   
  You received this message because you are subscribed to the Google
  Groups "otb-users" group.
  To post to this group, send email to otb-users@googlegroups.com
  To unsubscribe from this group, send email to
  otb-users+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/otb-users?hl=en
  --- 
  You received this message because you are subscribed to the Google
  Groups "otb-users" group.
  To unsubscribe from this group and stop receiving emails from it,
  send an email to otb-users+unsubscr...@googlegroups.com.
  For mor

[otb-users] ITK for an object based classification

2016-11-10 Thread Romain Jault
Good Morning

I try to perform an object based classification by using OTB. According the 
OTB software guide, the ITK library seems appropriate to perform it 
*(https://www.orfeo-toolbox.org/SoftwareGuide/SoftwareGuidech20.html*).
I checked in the directory file and it looks like there are ITK 
applications in the* bin* file.
Do you know how to call that specific library in the command line or how to 
call the ITK applications to use them in a python bash script to perform 
the object based classification?

Thank you very much

Best regards

R.J
 

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[otb-users] Itk

2016-09-17 Thread Yoram Elichai
Hi;
I successfully build otb using xdk

I try to compile StreamingMeanShiftSegmentation.cxx example  on visual 
studio and get the following error:

itk-4.8\itkatomicintdetail.h(126): error C2146: syntax error : missing ';' 
before identifier '__attribute__'

thank,
yoram

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.