Commit a87833cd authored by Antoine Regimbeau's avatar Antoine Regimbeau

REFAC: modern for loop and rmv unusued fct

parent 2d255ae8
...@@ -266,14 +266,14 @@ ConnectedComponentStreamStitchingFilter<TInputImage> ...@@ -266,14 +266,14 @@ ConnectedComponentStreamStitchingFilter<TInputImage>
std::vector<OGRFeatureType> addedPolygonList; std::vector<OGRFeatureType> addedPolygonList;
std::vector<int> FIDVec; std::vector<int> FIDVec;
for (std::vector< std::vector<int> >::iterator itList = fusionList.begin(); itList != fusionList.end(); itList++) for (auto & list : fusionList ) //.begin(); itList != fusionList.end(); itList++)
{ {
OGRMultiPolygon geomToMerge; OGRMultiPolygon geomToMerge;
int field = m_OGRLayer.GetFeature( *(*itList).begin())["field"].template GetValue<int>(); int field = m_OGRLayer.GetFeature( *list.begin())["field"].template GetValue<int>();
for (std::vector<int>::iterator it = (*itList).begin(); it != (*itList).end(); it++) for (auto id : list ) //.begin(); it != (*itList).end(); it++)
{ {
geomToMerge.addGeometry( m_OGRLayer.GetFeature(*it).GetGeometry()); geomToMerge.addGeometry( m_OGRLayer.GetFeature(id).GetGeometry());
m_OGRLayer.DeleteFeature(*it); m_OGRLayer.DeleteFeature(id);
} }
otb::ogr::UniqueGeometryPtr fusionPolygon =otb::ogr::UnionCascaded(geomToMerge); otb::ogr::UniqueGeometryPtr fusionPolygon =otb::ogr::UnionCascaded(geomToMerge);
......
...@@ -76,9 +76,6 @@ public: ...@@ -76,9 +76,6 @@ public:
/** Reset method called before starting the streaming*/ /** Reset method called before starting the streaming*/
void Reset(void) override{}; void Reset(void) override{};
/** Get the sample names */
const std::vector<std::string> & GetSampleFieldNames();
/** Set the name of the field that will contain the labels in the output image */ /** Set the name of the field that will contain the labels in the output image */
itkSetStringMacro(FieldName); itkSetStringMacro(FieldName);
......
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