MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001433OTB-wrappingGeneralpublic2017-06-20 15:462017-09-18 10:46
Reporterlefortm 
Assigned Togpasero 
PriorityurgentSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformWindowsOSWin7OS VersionWin7-64 bits
Summary0001433: Applications in - memory connection in python not working with SARCalibration
DescriptionWhen using the following code :
"SARCalibration.SetParameterInputImage("in", RoiExtraction.GetParameterOutputImage("out"))" we get an "itk::ERROR: SARCalibration(005E3160): inparameter can't be casted to InputImageParameter"
Steps To ReproduceSee attached file. The error is reproduceable every time with an image from a Sentinel 1 .SAFE folder. You just have to modify "input_file" in the attached .py script
Additional InformationProbably identical with Linux, not tested
TagsNo tags attached.
Attached Files? file icon demo_pipe.py [^] (1,383 bytes) 2017-06-20 15:46

- Relationships

-  Notes
(0004240)
gpasero (administrator)
2017-07-10 11:13

The in-memory connection for complex images is not (yet) implemented.
(0004293)
gpasero (administrator)
2017-09-15 18:48

I can reproduce the bug.
First of all: the parameter "in" of SARCalibration is a ComplexInputImage, whereas parameter "out" of ExtractROI is an OutputImage. There is no method (yet) to plug an OutputImage into a ComplexInputImage.

I ran some tests, the connection should rather be :
cal.SetParameterComplexInputImage("in",roi.GetParameterOutputImage("out"))

Then I got a different error, but after a small modification of Python wrapping, it is possible to achieve this connection. The problem happens after, during execute :
RuntimeError: Exception thrown in otbApplication Application_ExecuteAndWriteOutput: /home/gpasero/Projet_OTB/src/OTB/Modules/Wrappers/ApplicationEngine/include/otbWrapperComplexInputImageParameter.txx:119:
itk::ERROR: ComplexInputImageParameter(0x31958a0): Unknown image type

This is what we expected : the ComplexInputImage doesn't handle non-complex images.
Conclusion: there is no easy fix, but we could foresee a RFC for a better interaction between complex and non-complex parameters.
(0004295)
grizonnetm (administrator)
2017-09-18 08:40

I would suggest to add this in the wishlist:

https://wiki.orfeo-toolbox.org/index.php/Wishlist#General [^]
(0004296)
gpasero (administrator)
2017-09-18 10:04

Added the following line in the wishlist :
* Allow the in-memory connections between Images and ComplexImages (or simply merge InputImage and ComplexInputImage together...)

I believe that the application framework would be easier to use without specific parameter types for complex images. The standard InputImage already supports various pixel types, why not supporting complex pixel types as well? Each application would then get the image pointer with the type it needs.
(0004298)
gpasero (administrator)
2017-09-18 10:46

This issue won't be fixed here. It is a limitation of the ApplicationEngine which requires significant work.

- Issue History
Date Modified Username Field Change
2017-06-20 15:46 lefortm New Issue
2017-06-20 15:46 lefortm File Added: demo_pipe.py
2017-07-10 11:13 gpasero Severity crash => feature
2017-07-10 11:13 gpasero Note Added: 0004240
2017-09-07 17:31 gpasero Priority normal => urgent
2017-09-15 18:48 gpasero Note Added: 0004293
2017-09-15 18:48 gpasero Assigned To => gpasero
2017-09-15 18:48 gpasero Status new => assigned
2017-09-18 08:40 grizonnetm Note Added: 0004295
2017-09-18 10:04 gpasero Note Added: 0004296
2017-09-18 10:46 gpasero Note Added: 0004298
2017-09-18 10:46 gpasero Status assigned => closed
2017-09-18 10:46 gpasero Resolution open => won't fix


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker