Commit bc9106ae authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: Mantis-1389: use uint32 for label type

parent 5dc0ec76
......@@ -46,6 +46,7 @@
#include "otbStreamingStatisticsMapFromLabelImageFilter.h"
#include "otbMacro.h"
#include "otbStringUtils.h"
namespace otb
{
......@@ -178,14 +179,14 @@ public:
itkTypeMacro(ColorMapping, otb::Application);
typedef FloatImageType::PixelType PixelType;
typedef UInt16ImageType LabelImageType;
typedef UInt32ImageType LabelImageType;
typedef LabelImageType::PixelType LabelType;
typedef UInt8VectorImageType VectorImageType;
typedef VectorImageType::PixelType VectorPixelType;
typedef UInt8RGBImageType RGBImageType;
typedef RGBImageType::PixelType RGBPixelType;
typedef UInt16VectorImageType LabelVectorImageType;
typedef UInt32VectorImageType LabelVectorImageType;
typedef LabelVectorImageType::PixelType LabelVectorType;
typedef itk::NumericTraits
......@@ -196,7 +197,7 @@ public:
typedef itk::ImageRegionConstIterator
<FloatVectorImageType> IteratorType;
typedef itk::ImageRegionConstIterator
<UInt16ImageType> LabelIteratorType;
<LabelImageType> LabelIteratorType;
// Manual label LUT
typedef otb::ChangeLabelImageFilter
......@@ -783,7 +784,7 @@ private:
if (nextpos == std::string::npos)
continue;
length = nextpos - pos;
LabelType clabel = atoi(line.substr(pos, length).c_str());
LabelType clabel = boost::lexical_cast<LabelType>(line.substr(pos, length).c_str());
// Retrieve the color
VectorPixelType color(3);
color.Fill(0);
......
......@@ -23,6 +23,7 @@ set(DOCUMENTATION "Image utils and handling application.")
otb_module(OTBAppImageUtils
DEPENDS
OTBApplicationEngine
OTBBoostAdapters
OTBCarto
OTBColorMap
OTBCommon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment