From 231923e1a66eb41d508467300be6045b1d7431ab Mon Sep 17 00:00:00 2001 From: remicres <remi.cresson@teledetection.fr> Date: Tue, 9 Aug 2016 07:46:04 +0000 Subject: [PATCH] FIX: change label image pixel type to UInt32 --- include/lsrmGraphToOtbImage.h | 2 +- include/lsrmGraphToOtbImage.txx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lsrmGraphToOtbImage.h b/include/lsrmGraphToOtbImage.h index 19a448c..4803d6f 100644 --- a/include/lsrmGraphToOtbImage.h +++ b/include/lsrmGraphToOtbImage.h @@ -24,7 +24,7 @@ namespace lsrm typedef typename GraphType::NodeType NodeType; typedef std::vector< std::shared_ptr<NodeType> > NodeList; typedef typename NodeList::const_iterator NodeConstIterator; - typedef unsigned long int LabelPixelType; + typedef unsigned int LabelPixelType; typedef otb::Image<LabelPixelType, 2> LabelImageType; using ContourOperator = lp::ContourOperations; diff --git a/include/lsrmGraphToOtbImage.txx b/include/lsrmGraphToOtbImage.txx index 9042bec..79348be 100644 --- a/include/lsrmGraphToOtbImage.txx +++ b/include/lsrmGraphToOtbImage.txx @@ -31,7 +31,7 @@ namespace lsrm it.Set(0); // Start at 1 (value 0 can be used for invalid pixels) - long unsigned int label = 1; + LabelImageType::InternalPixelType label = 1; for(auto& region : graph.m_Nodes) { lp::CellLists borderPixels; -- GitLab