[Insight-users] ConnectedComponentImageFilter and RGBPixel

Julien Michel julien.michel at c-s.fr
Wed Jan 14 05:17:57 EST 2009


Gaëtan Lehmann a écrit :

>> It might be related to the optimisations I made.
> 
> I've just checked - still  builds here.
> Can you give the exact error message you get? Maybe your problem is 
> related to the typo in the name? There's no "s" in the name!
> 
> Gaëtan

Dear Gaëtan,

The exact code is :

typedef itk::RGBPixel<unsigned char>  InputPixelType;
typedef unsigned short LabelPixelType;
typedef itk::Image<InputPixelType,2> InputImageType;
typedef itk::Image<LabelPixelType,2> LabelImageType;
  typedef 
itk::ConnectedComponentImageFilter<InputImageType,LabelImageType> 
ConnectedComponentFilterType;
   ConnectedComponentFilterType::Pointer  connectedComponentFilter = 
ConnectedComponentFilterType::New();

And the exact compilation error is:

/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Utilities/ITK/Code/BasicFilters/itkConnectedComponentImageFilter.txx: 
In member function void itk::ConnectedComponentImageFilter<TInputImage, 
TOutputImage, TMaskImage>::ThreadedGenerateData(const typename 
TOutputImage::RegionType&, int) [with TInputImage = 
itk::Image<itk::RGBPixel<unsigned char>, 2u>, TOutputImage = 
itk::Image<short unsigned int, 2u>, TMaskImage = 
itk::Image<itk::RGBPixel<unsigned char>, 2u>]:
/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Testing/Code/BasicFilters/otbPolygonCompacityFunctor.cxx:113: 
   instantiated from here
/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Utilities/ITK/Code/BasicFilters/itkConnectedComponentImageFilter.txx:170: 
error: invalid conversion from short unsigned int to const unsigned char*
/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Utilities/ITK/Code/BasicFilters/itkConnectedComponentImageFilter.txx:170: 
error:   initializing argument 1 of itk::FixedArray<TValueType, 
VLength>::FixedArray(const TValueType*) [with TValueType = unsigned 
char, unsigned int VLength = 3u]
/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Testing/Code/BasicFilters/otbPolygonCompacityFunctor.cxx:113: 
   instantiated from here
/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Utilities/ITK/Code/BasicFilters/itkConnectedComponentImageFilter.txx:180: 
error: invalid conversion from short unsigned int to const unsigned char*
/ORFEO/julien/ORFEO-TOOLBOX/otb-hg/OTB/Utilities/ITK/Code/BasicFilters/itkConnectedComponentImageFilter.txx:180: 
error:   initializing argument 1 of itk::FixedArray<TValueType, 
VLength>::FixedArray(const TValueType*) [with TValueType = unsigned 
char, unsigned int VLength = 3u]

This was compiling with previous ITK versions (3.8.XX), since the 
compilation error first occured when we upgraded to ITK 3.10.1.

Best regards,

Julien
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien MICHEL - Ingénieur d'études - Traitement d'images
CS Systèmes d'Information - Division ESPACE
Département Information Géographique & Image
Téléphone : +33 561 17 64 27
Email : julien.michel at c-s.fr

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Insight-users mailing list