Most importantly you forgot the one rule when writing applications :
images are written after DoExecute() method call ended, so any local
variable (and thus, all your filters) declared in DoExecute() does not
exist anymore when trying to write the image.
You can have a pointer to each of the filters as class member, but
something most convenient is to have a
std::vector<itk::ProcessObject::Pointer> m_Filters member and to add all
your filters to it.
Le 15/09/2016 à 13:26, Jordi Inglada a écrit :
Since the NaryAddImageFilter generates an output image with an unknown number
of bands, I guess you have to call its UpdateOutputInformation() so that the
downstream filters (and therefore the writer) know what to do.
Poughon Victor <victor.poug...@cnes.fr> wrote:
I am writing an OTB application and getting the following error at runtime:
itk::ERROR: GDALImageIO(0xc35a30): Dimensions are not defined.
Any ideas what it means?
Here is the DoExecute of my (very simple) application. i think the problem
comes from the way I am using itk::NaryAddImageFilter, but I don't know:
FloatVectorImageListType::Pointer inList = GetParameterImageList("il");
NaryAddImageFilterType::Pointer naryAdder = NaryAddImageFilterType::New();
// For each input image
for (unsigned int i = 0; i < inList->Size(); i++)
// Extract first band
extractChannelFilters[i] = ExtractChannelType::New();
// Add it
// Divide by N
MultiplyImageFilterType::Pointer divideFilter =
CNES - DCT/SI/AP - BPI 1219
18, avenue Edouard Belin
31401 Toulouse Cedex 09 - France
Tel: +33 561 282 894 - Fax: +33 561 283 109
Check the OTB FAQ at
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at
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
For more options, visit https://groups.google.com/d/optout.