Hi all,

Just for what is worth, I have found that when writing an application, the 
filters used in the pipeline have to be members of the application class in 
order for their output to be updated by the pipeline.

If a filter (the object) is defined in the DoExecute() method like this:

FilterType filter = FilterType::New();
filter->SetInput(input_image);
SetParameterOutputImage("out", filter->GetOutput());

The application aborts with the following message:
------------------------
Writing /tmp/tt.tif...: 0% [                                                  ]
otbApplicationLauncherCommandLine: 
/home/inglada/OTB/ITK/Modules/Core/Common/include/itkImageConstIterator.h:20
8: void itk::ImageConstIterator<TImage>::SetRegion(const RegionType&) [with 
TImage = otb::VectorImage<float>; itk::ImageConstIterator<TImage>::RegionType = 
itk::ImageRegion<2u>]: Assertion `
Region ImageRegion (0x7fffffffc160)                                             
                                                                                
                             
  Dimension: 2
  Index: [0, 0]
  Size: [1000, 84]
 is outside of buffered region ImageRegion (0xa961a0)
  Dimension: 2
  Index: [0, 0]
  Size: [0, 0]
' failed.
Aborted
------------------------

Adding filter->UpdateOutputInformation() does not solve the problem. Only 
filter->Update() will solve the issue, but we don't really want to do that, do 
we?

If the filter is a member of the application class, all works as expected. This 
diff shows an example of this issue:

http://tully.ups-tlse.fr/jordi/phenotb/commit/b14686a65326061a1c0577b79e4b2ef438e830ea

I don't know if this is a bug or a wanted behavior, but if it is the latter, 
maybe this should be documented in the relevant section of the Software Guide. 
I couldn't find anything about that here 
https://www.orfeo-toolbox.org/SoftwareGuide/SoftwareGuidech30.html#x60-41100030.

Jordi

-- 
-- 
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