don't use that part.

I was saying to explicitly call SetParameterUserValue on mode and
mode.fit.ref

ExtractROI.SetParameterUserValue('mode', True)
ExtractROI.SetParameterUserValue('mode.fit.ref', True)

BTW, attribute error on GetVectorImageAsNumpyArray was there because you
don't have numpy installed



On Mon, Oct 10, 2016 at 10:45 AM, Cécile Cazals <[email protected]>
wrote:

> Hello,
>
> The line using "GetVectorImageAsNumpyArray" returns an attribut error on
> my computer. You should open a new topic, it's not the same problem.
>
> Cécile
>
> Le lundi 10 octobre 2016 10:32:38 UTC+2, Rashad a écrit :
>>
>>
>> Hello,
>>
>> can you have a look at this test code and see if the fix works for you?
>>
>> I had to call SetParameterUserValue method for extractroi to work.
>> ExtractROI.SetParameterUserValue("sizex", True)
>>
>> https://github.com/orfeotoolbox/OTB/blob/master/Modules/Wrap
>> pers/SWIG/test/python/PythonNumpyTest.py#L24
>>
>> On Friday, October 7, 2016 at 10:00:14 AM UTC+2, Cécile Cazals wrote:
>>>
>>> Hello,
>>>
>>> I am trying to use OTB with Python, beginning by a simple image subset
>>> using ExtractROI.
>>>
>>> The following command line works fine :
>>> otbcli_ExtractROI -in s1_vv.tif -mode fit -mode.fit.ref emprise.tif -out
>>> s1_vv_Extract.tif
>>>
>>> The following python code works fine :
>>> import otbApplication
>>> ExtractROI = otbApplication.Registry.CreateApplication("ExtractROI")
>>> ExtractROI.SetParameterString("in",'s1_vv.tif')
>>> ExtractROI.SetParameterString("startx",'820')
>>> ExtractROI.SetParameterString("starty",'500')
>>> ExtractROI.SetParameterString("sizex",'308')
>>> ExtractROI.SetParameterString("sizey",'444')
>>> ExtractROI.SetParameterString("out", "s1_vv_Extract.tif")
>>> ExtractROI.ExecuteAndWriteOutput()
>>>
>>> But the following python code returns "Erreur de segmentation (core
>>> dumped)"
>>> import otbApplication
>>> ExtractROI = otbApplication.Registry.CreateApplication("ExtractROI")
>>> ExtractROI.SetParameterString("in",'s1_vv.tif')
>>> ExtractROI.SetParameterString("mode",'fit')
>>> ExtractROI.SetParameterString("mode.fit.ref",'emprise.tif')
>>> ExtractROI.SetParameterString("out", "s1_vv_Extract.tif")
>>> ExtractROI.ExecuteAndWriteOutput()
>>>
>>> I can't understand what is happening... It seams that all functions
>>> using parameters with '.' like 'io.in' does the same.
>>> You will find attached the images used.
>>>
>>> Many thanks in advanced for any advice !
>>>
>>> Cécile
>>>
>>> --
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 a topic in the
> Google Groups "otb-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/otb-users/_9zWKJyaJ4k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
   Rashad

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to