Hi,

On 23/03/2015 08:55, Julien Michel wrote:
Hi Jordi,

You are right. Following our long tradition, DoExecute() method only wires the pipeline, and do not actually execute anything unless you make some Update() calls within it. By the time of real pipeline execution, scope of local variable in this method has ended.

This is expected (and all the applications shipped with OTB have internal filters as members), but, as you said :
- It should be clearly documented,
- Adding many members can be tedious if the only reason is to keep a reference to filters so that SmartPointers do not selft-destruct. We could provide a void RegisterInternalFilter(itk::ProcessObject *) method in the ApplicationAPI to ease the pain ( or even a RegisterInternalRessource(itk::LightObject *) for what matters).

Sounds wise.
I usually kept a std::vector<itk::LightObject::Pointer> as a member attribute to keep the references alive and it proved to work.

If it becomes a service provided by the Application class, we also need something to clean it up (DoExecute can be called several times during the lifetime of an app).

Julien

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