LabelMap does not expose its internal container. Have to use iterators

LabelObject does not expose its internal LineContainer. Have to use iterators

no more PerimeterCalculator class. Code has been partially ported from ShapeAttributesLabelObject

Some OTB classes relies on ITKReview classes (otbStreamingResampleImageFilter for instance).

We have to handle the case ITK_USE_REVIEW set to OFF (and use the ITK_USE_REVIEW in OTB when necessary), or always use external ITK with ITK_USE_REVIEW=ON and throw an error in the configuration step if it is not.... ???

Problem with OTB_USE_EXTERNAL_ITK : If OTB is first configured without giving a proper ITK_DIR, the internal ITK is used by default. It is still used even if we put OTB_USE_EXTERNAL_ITK=ON later when configuring with cmake gui (ghost cmake variable ITK_DIR in the CMakeCache)

in OTB, we have a test called ResampleSLCImage, trying to resample complex data. The test pass only ecause the transform is a translation with integer spacing.

IO registration has been refactored completely in ITK. They are now the responsability of the external project using ITK.

UseITK.cmake generates a header file in the build tree of OTB, in ITKIOFactoryRegistration, which loads the ITK IO enabled in the ITK build at OTB static init time.

This header file is included at the end of itkImageFileReader and itkImageFileWriter

Without further modifications on the OTB side, the result is that the ITK IO comes before the OTB IO, leading to problem on file formats like TIFF, PNG, JPEG, for which an ITK IO exists.

Same mechanism reproduced in OTB : the client application will have a OTBIOFactoryRegistration directory in its build tree, geenrated by UseOTB.cmake

To avoid static initialization order fiasco, the OTBIOFactoryRegistration header file loads both the OTB and ITK IO (in that order), and prevents the use of the ITK registration mechanism. This should do the trick as long as itkImageFileReader is not included before an OTB file. We should ask ITK to provide more control on that...