Hi, I bet that the ImageListToVectorImageFilter can not be templated with the ImageLi|st with vector image...
Looking at your code I could suggest an alternative strategy: - iterate over each image in the ImageList - extract each band using MultiToMonoChannelExtractROI filter - concatenate each band in a vector with ImageListToVectorImageFilter That's more or less the strategy use in the ConcatenateImages application: http://hg.orfeo-toolbox.org/OTB/file/tip/Modules/Applications/AppImageUtils/app/otbConcatenateImages.cxx#l97 Regards, | On 18/05/2015 02:00, collin maxime wrote: > Hi, > > Thanks, as a matter of fact, it is. > I begin to be a little lost in all these types... > > Now, I have a new error on *otbImageListToVectorFilter* (||conversion > from‘int’to ‘constitk::RGBPixel<unsignedchar>’isambiguous) ||: > | > | > Infile included > from/usr/local/include/otb/Common/otbImageListToVectorImageFilter.h:92:0, > > from/home/maxime/Documents/testWatershed2/src/../include/ProcessManager.h:22, > > > from/home/maxime/Documents/testWatershed2/src/../include/ProcessManagerWithoutChannelOrder.h:13, > > from/home/maxime/Documents/testWatershed2/src/Main.cxx:16: > /usr/local/include/otb/Common/otbImageListToVectorImageFilter.txx:Ininstantiation > of > ‘voidotb::ImageListToVectorImageFilter<TImageList,TVectorImage>::GenerateData()[withTImageList=otb::ImageList<otb::Image<itk::RGBPixel<unsignedchar>,2u>>;TVectorImage=otb::VectorImage<itk::RGBPixel<unsignedchar>,2u>]’: > /home/maxime/Documents/testWatershed2/src/Main.cxx:181:1: required > fromhere > /usr/local/include/otb/Common/otbImageListToVectorImageFilter.txx:80:3:error:conversion > from‘int’to ‘constitk::RGBPixel<unsignedchar>’isambiguous > black.Fill(0); > ^ > /usr/local/include/otb/Common/otbImageListToVectorImageFilter.txx:80:3:note:candidates > are: > Infile included from/usr/local/include/ITK-4.7/itkImageIOBase.h:27:0, > from/usr/local/include/ITK-4.7/itkImageIOFactory.h:23, > from/usr/local/include/otb/IO/otbImageFileReader.txx:28, > from/usr/local/include/otb/IO/otbImageFileReader.h:196, > > > from/home/maxime/Documents/testWatershed2/src/../include/ExtractChannels.h:15, > > from/home/maxime/Documents/testWatershed2/src/Main.cxx:15: > /usr/local/include/ITK-4.7/itkRGBPixel.h:86:3:note:itk::RGBPixel<TComponent>::RGBPixel(constComponentType*)[withTComponent=unsignedchar;itk::RGBPixel<TComponent>::ComponentType=unsignedchar] > RGBPixel(constComponentTyper[3]):BaseArray(r){} > ^ > /usr/local/include/ITK-4.7/itkRGBPixel.h:81:3:note:itk::RGBPixel<TComponent>::RGBPixel(constComponentType&)[withTComponent=unsignedchar;itk::RGBPixel<TComponent>::ComponentType=unsignedchar] > RGBPixel(constComponentType&r){this->Fill(r);} > ^ > Infile included > from/usr/local/include/ITK-4.7/itkVariableLengthVector.h:523:0, > > > from/usr/local/include/otb/UtilitiesAdapters/OssimAdapters/otbMetaDataKey.h:25, > > from/usr/local/include/otb/IO/otbImageMetadataInterfaceBase.h:25, > from/usr/local/include/otb/IO/otbImage.h:22, > > from/usr/local/include/otb/Common/otbMultiToMonoChannelExtractROI.h:22, > > > from/home/maxime/Documents/testWatershed2/src/../include/ExtractChannels.h:12, > > from/home/maxime/Documents/testWatershed2/src/Main.cxx:15: > /usr/local/include/ITK-4.7/itkVariableLengthVector.hxx:262:6:error: > initializing argument 1of > ‘voiditk::VariableLengthVector<TValue>::Fill(constTValue&)[withTValue=itk::RGBPixel<unsignedchar>]’ > voidVariableLengthVector<TValue> > | > | > > |I checked and double-checked the types, but I don't see the problem > origin...| > Nothing on the web either. > > Maxime > > -- > -- > 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] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout. -- Manuel GRIZONNET -- -- 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.
