OTB  9.0.0
Orfeo Toolbox
otbHooverInstanceFilter.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbHooverInstanceFilter_hxx
22 #define otbHooverInstanceFilter_hxx
23 
25 #include "otbMacro.h"
26 
27 namespace otb
28 {
29 
31 template <class TLabelMap>
32 HooverInstanceFilter<TLabelMap>::HooverInstanceFilter() : m_NumberOfRegionsGT(0), m_NumberOfRegionsMS(0), m_Threshold(0.8), m_UseExtendedAttributes(false)
33 {
34  this->SetNumberOfRequiredInputs(2);
35  this->SetNumberOfRequiredOutputs(2);
36  typename LabelMapType::Pointer secondOutput = LabelMapType::New();
37  this->AddOutput(secondOutput);
39 
40  m_HooverMatrix.SetSize(0, 0);
41  m_CardRegGT.SetSize(0);
42  m_CardRegMS.SetSize(0);
43  m_LabelsGT.resize(0);
44 
45  m_MeanRC = static_cast<AttributesValueType>(0);
46  m_MeanRF = static_cast<AttributesValueType>(0);
47  m_MeanRA = static_cast<AttributesValueType>(0);
48  m_MeanRM = static_cast<AttributesValueType>(0);
49  m_MeanRN = static_cast<AttributesValueType>(0);
50 }
51 
53 template <class TLabelMap>
55 {
56  this->SetInput(0, gt);
57 }
58 
60 template <class TLabelMap>
62 {
63  this->SetInput(1, ms);
64 }
65 
67 template <class TLabelMap>
69 {
70  return this->GetInput(0);
71 }
72 
74 template <class TLabelMap>
76 {
77  return const_cast<TLabelMap*>(this->GetInput(1));
78 }
79 
81 template <class TLabelMap>
83 {
84  return this->GetOutput(0);
85 }
86 
88 template <class TLabelMap>
90 {
91  return this->GetOutput(1);
92 }
93 
94 template <class TLabelMap>
96 {
97  Superclass::AllocateOutputs();
98 
99  if (this->GetInPlace() && this->CanRunInPlace())
100  {
101  LabelMapPointer secondInput = const_cast<TLabelMap*>(this->GetMachineSegmentationLabelMap());
102 
103  if (secondInput)
104  {
105  ImageRegionType region = this->GetOutput(1)->GetLargestPossibleRegion();
106  this->GraftNthOutput(1, secondInput);
107  this->GetOutput(1)->SetRegions(region);
108  }
109  }
110  else
111  {
112  // copying the second input : machine segmentation
113  const TLabelMap* inputMS = this->GetInput(1);
114  TLabelMap* outputMS = this->GetOutput(1);
115  assert(inputMS != NULL);
116  assert(outputMS != NULL);
117 
118  outputMS->SetBackgroundValue(inputMS->GetBackgroundValue());
119 
120  ConstIteratorType it = ConstIteratorType(inputMS);
121 
122  while (!it.IsAtEnd())
123  {
124  const LabelObjectType* labeObject = it.GetLabelObject();
125 
126  assert(labeObject != NULL);
127  assert(labeObject->GetLabel() == it.GetLabel());
128 
129  typename LabelObjectType::Pointer newLabelObject = LabelObjectType::New();
130  newLabelObject->CopyAllFrom(labeObject);
131 
132  outputMS->AddLabelObject(newLabelObject);
133  ++it;
134  }
135  }
136 }
137 
138 template <class TLabelMap>
140 {
141  Superclass::ReleaseInputs();
142 
143  if (this->GetInPlace())
144  {
145  // Release second input
146  TLabelMap* ptr = const_cast<TLabelMap*>(this->GetInput(1));
147  if (ptr)
148  {
149  ptr->ReleaseData();
150  }
151  }
152 }
153 
154 template <class TLabelMap>
156 {
157  // first : call superclass method
158  Superclass::BeforeThreadedGenerateData();
159 
160  m_NumberOfRegionsGT = this->GetGroundTruthLabelMap()->GetNumberOfLabelObjects();
161  m_NumberOfRegionsMS = this->GetMachineSegmentationLabelMap()->GetNumberOfLabelObjects();
162 
163  if (m_NumberOfRegionsGT == 0 || m_NumberOfRegionsMS == 0)
164  {
165  itkExceptionMacro("Empty label map");
166  }
167 
168  // Check the matrix size
169  if (m_NumberOfRegionsGT != m_HooverMatrix.Rows() || m_NumberOfRegionsMS != m_HooverMatrix.Cols())
170  {
171  itkExceptionMacro("The given Hoover confusion matrix (" << m_HooverMatrix.Rows() << " x " << m_HooverMatrix.Cols()
172  << ") doesn't match with the input label maps (" << m_NumberOfRegionsGT << " x "
173  << m_NumberOfRegionsMS << ")");
174  }
175 
176  // Init cardinalities lists
177  m_CardRegGT.SetSize(m_NumberOfRegionsGT);
178  m_CardRegGT.Fill(0);
179 
180  m_CardRegMS.SetSize(m_NumberOfRegionsMS);
181  m_CardRegMS.Fill(0);
182 
183  // Fill cardinalities list for MS
184  unsigned long i = 0;
185 
186  IteratorType iter = IteratorType(this->GetMachineSegmentationLabelMap());
187 
188  typename LabelObjectType::Pointer blankRegion;
189 
190  while (!iter.IsAtEnd())
191  {
192  LabelObjectType* regionMS = iter.GetLabelObject();
193  m_CardRegMS[i] = regionMS->Size();
194  if (m_CardRegMS[i] == 0)
195  {
196  otbWarningMacro("Region " << i << " in machine segmentation label map is empty");
197  }
198  // reset any Hoover attribute already present
199  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RC), 0.0);
200  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RF), 0.0);
201  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RA), 0.0);
202  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RN), 0.0);
203 
204  if (m_UseExtendedAttributes)
205  {
206  blankRegion = LabelObjectType::New();
207  blankRegion->SetLabel(regionMS->GetLabel());
208  std::vector<std::string> attKeys = regionMS->GetAvailableAttributes();
209  for (unsigned int k = 0; k < attKeys.size(); k++)
210  {
211  if (attKeys[k].find("HooverInstance_Ext_") == 0)
212  {
213  continue;
214  }
215  else
216  {
217  blankRegion->SetAttribute(attKeys[k].c_str(), regionMS->GetAttribute(attKeys[k].c_str()));
218  }
219  }
220  regionMS->CopyAttributesFrom(blankRegion);
221  }
222  i++;
223  ++iter;
224  }
225 
226  m_LabelsGT = this->GetGroundTruthLabelMap()->GetLabels();
227 }
228 
229 template <class TLabelMap>
231 {
232  // Find the index corresponding to the current label object in GT
233  unsigned long currentRegionGT = 0;
234  LabelType currentLabelGT = labelObject->GetLabel();
235  for (unsigned long k = 0; k < m_NumberOfRegionsGT; k++)
236  {
237  if (currentLabelGT == m_LabelsGT[k])
238  {
239  currentRegionGT = k;
240  break;
241  }
242  }
243 
244  m_CardRegGT[currentRegionGT] = labelObject->Size();
245  if (m_CardRegGT[currentRegionGT] == 0)
246  {
247  otbWarningMacro("Region " << currentRegionGT << " in ground truth label map is empty");
248  }
249 
250  // reset any Hoover attribute already present
251  labelObject->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RC), 0.0);
252  labelObject->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RF), 0.0);
253  labelObject->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RA), 0.0);
254  labelObject->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RM), 0.0);
255 
256  if (m_UseExtendedAttributes)
257  {
258  typename LabelObjectType::Pointer blankRegion;
259  blankRegion = LabelObjectType::New();
260  blankRegion->SetLabel(labelObject->GetLabel());
261  std::vector<std::string> attKeys = labelObject->GetAvailableAttributes();
262  for (unsigned int k = 0; k < attKeys.size(); k++)
263  {
264  if (attKeys[k].find("HooverInstance_Ext_") == 0)
265  {
266  continue;
267  }
268  else
269  {
270  blankRegion->SetAttribute(attKeys[k].c_str(), labelObject->GetAttribute(attKeys[k].c_str()));
271  }
272  }
273  labelObject->CopyAttributesFrom(blankRegion);
274  }
275 }
276 
277 template <class TLabelMap>
279 {
280  LabelMapType* outGT = this->GetOutput(0);
281  LabelMapType* outMS = this->GetOutput(1);
282 
283  // Iterators on label object container (to gain efficiency when accessing them)
284  IteratorType iterGT = IteratorType(outGT);
285  IteratorType iterMS = IteratorType(outMS);
286 
287  // Set of classified regions
288  RegionSetType GTindices;
289  RegionSetType MSindices;
290 
291  // flags to detect empty rows or columns
292  bool IsRowEmpty;
293  bool IsColEmpty;
294 
295  // temporary buffers to compute average scores
296  double bufferRC = 0.0;
297  double bufferRF = 0.0;
298  double bufferRA = 0.0;
299  double bufferRM = 0.0;
300  double bufferRN = 0.0;
301  double areaGT = 0.0;
302  double areaMS = 0.0;
303 
304  // first pass : loop on GT regions first
305  for (unsigned int row = 0; row < m_NumberOfRegionsGT; row++, iterGT++)
306  {
307  double sumOS = 0.0; // sum of coefT for potential over-segmented regions
308  double sumScoreRF = 0.0; // temporary sum of (Tij x (Tij - 1)) terms for the RF score
309  RegionSetType regionsOfMS; // stores region indexes
310  ObjectVectorType objectsOfMS; // stores region pointers
311 
312  double tGT = static_cast<double>(m_CardRegGT[row]) * m_Threshold; // card Ri x t
313  IsRowEmpty = true;
314  iterMS.GoToBegin();
315  for (unsigned int col = 0; col < m_NumberOfRegionsMS; col++, iterMS++)
316  {
317  // Tij
318  double coefT = static_cast<double>(m_HooverMatrix(row, col));
319  if (coefT < 0.5)
320  {
321  // the regions Ri and ^Rj have an empty intersection : we can jump to the next matrix cell
322  continue;
323  }
324  else
325  {
326  IsRowEmpty = false;
327  }
328 
329  double tMS = static_cast<double>(m_CardRegMS[col]) * m_Threshold; // card Rj x t
330 
331  otbDebugMacro(<< "* coef[" << row << "," << col << "]=" << coefT << " #tGT=" << tGT << " #tMS=" << tMS);
332 
333  // Looking for Correct Detection and Over Segmentation (both can happen for the same GT region)
334  if (coefT >= tMS)
335  {
336  if (coefT >= tGT)
337  {
338  otbDebugMacro(<< "1 coef[" << row << "," << col << "]=" << coefT << " #tGT=" << tGT << " #tMS=" << tMS << " -> CD");
339 
340  LabelObjectType* regionGT = iterGT.GetLabelObject();
341  LabelObjectType* regionMS = iterMS.GetLabelObject();
342  double scoreRC = m_Threshold * (std::min(coefT / tGT, coefT / tMS));
343  bufferRC += scoreRC * static_cast<double>(m_CardRegGT[row]);
344 
345  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RC), static_cast<AttributesValueType>(scoreRC));
346  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RC), static_cast<AttributesValueType>(scoreRC));
347 
348  if (m_UseExtendedAttributes)
349  {
350  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_CD), static_cast<AttributesValueType>(regionMS->GetLabel()));
351  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_CD), static_cast<AttributesValueType>(regionGT->GetLabel()));
352  }
353 
354  GTindices.insert(row);
355  MSindices.insert(col);
356  }
357  else
358  {
359  otbDebugMacro(<< "2 coef[" << row << "," << col << "]=" << coefT << " #tGT=" << tGT << " #tMS=" << tMS << " -> OSmaybe");
360  }
361  objectsOfMS.push_back(iterMS.GetLabelObject()); // candidate region for over-segmentation
362  regionsOfMS.insert(col);
363  sumOS += coefT;
364  sumScoreRF += coefT * (coefT - 1.0);
365  }
366  } // end of column loop
367 
368  otbDebugMacro(<< "end of line " << row << "; sumOS=" << sumOS << " " << regionsOfMS.size() << " of MS region");
369  if (sumOS >= tGT && sumOS > 0)
370  {
371  // CD
372  if (regionsOfMS.size() == 1)
373  {
374  otbDebugMacro(<< "CD only");
375  }
376  // OS
377  else if (regionsOfMS.size() > 1)
378  {
379  otbDebugMacro(<< row << " OS by ");
380  LabelObjectType* regionGT = iterGT.GetLabelObject();
381 
382  double cardRegGT = static_cast<double>(m_CardRegGT[row]);
383  double scoreRF = 1.0 - sumScoreRF / (cardRegGT * (cardRegGT - 1.0));
384  bufferRF += scoreRF * cardRegGT;
385 
386  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RF), static_cast<AttributesValueType>(scoreRF));
387 
388  unsigned int indexOS = 1;
389  for (typename ObjectVectorType::iterator it = objectsOfMS.begin(); it != objectsOfMS.end(); ++it)
390  {
391  LabelObjectType* regionMS = *it;
392  std::ostringstream attribute;
393  attribute << ATTRIBUTE_OS << "_" << indexOS;
394 
395  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RF), static_cast<AttributesValueType>(scoreRF));
396 
397  if (m_UseExtendedAttributes)
398  {
399  regionGT->SetAttribute(attribute.str().c_str(), static_cast<AttributesValueType>(regionMS->GetLabel()));
400  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_OS), static_cast<AttributesValueType>(regionGT->GetLabel()));
401  }
402 
403  indexOS++;
404  }
405 
406  GTindices.insert(row);
407  for (RegionSetType::iterator it = regionsOfMS.begin(); it != regionsOfMS.end(); ++it)
408  {
409  MSindices.insert(*it);
410  otbDebugMacro(<< *it << " ");
411  }
412  }
413  else
414  {
415  otbDebugMacro(<< "No MS region present in potential OS instance");
416  }
417  }
418  // check for empty rows : they should be ignored and have no Hoover attribute
419  if (IsRowEmpty)
420  {
421  GTindices.insert(row);
422  }
423  else
424  {
425  areaGT += static_cast<double>(m_CardRegGT[row]);
426  }
427  } // end of line loop
428 
429  // second pass : loop on MS regions first
430  iterMS.GoToBegin();
431  for (unsigned int col = 0; col < m_NumberOfRegionsMS; col++, iterMS++)
432  {
433  double sumUS = 0.0; // sum of coefT for potential under-segmented regions
434  double sumScoreUS = 0.0; // temporary sum of the (Tij x (Tij - 1)) for RA score
435  double sumCardUS = 0.0; // temporary sum of under segmented region sizes
436 
437  RegionSetType regionsOfGT; // stores region indexes
438  ObjectVectorType objectsOfGT; // stores region pointers
439 
440  double tMS = static_cast<double>(m_CardRegMS[col]) * m_Threshold;
441  IsColEmpty = true;
442  iterGT.GoToBegin();
443  for (unsigned int row = 0; row < m_NumberOfRegionsGT; row++, iterGT++)
444  {
445  double coefT = static_cast<double>(m_HooverMatrix(row, col));
446  if (coefT < 0.5)
447  {
448  // the regions Ri and ^Rj have an empty intersection : we can jump to the next matrix cell
449  continue;
450  }
451  else
452  {
453  IsColEmpty = false;
454  }
455 
456  double tGT = static_cast<double>(m_CardRegGT[row]) * m_Threshold;
457  // Looking for Under-Segmented regions
458  if (coefT >= tGT)
459  {
460  otbDebugMacro(<< "3 coef[" << row << "," << col << "]=" << coefT << " #tGT=" << tGT << " #tMS=" << tMS << " -> USmaybe");
461  regionsOfGT.insert(row);
462  objectsOfGT.push_back(iterGT.GetLabelObject());
463  sumUS += coefT;
464  sumScoreUS += coefT * (coefT - 1.0);
465  sumCardUS += static_cast<double>(m_CardRegGT[row]);
466  }
467  } // end of line loop
468 
469  // US
470  if (sumUS >= tMS)
471  {
472  if (regionsOfGT.size() == 1)
473  {
474  otbDebugMacro(<< "CD already registered");
475  }
476  else if (regionsOfGT.size() > 1) // Under Segmentation
477  {
478  LabelObjectType* regionMS = iterMS.GetLabelObject();
479  double scoreRA = 1.0 - sumScoreUS / (sumCardUS * (sumCardUS - 1.0));
480  bufferRA += scoreRA * sumCardUS;
481 
482  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RA), static_cast<AttributesValueType>(scoreRA));
483 
484  unsigned int indexUS = 1;
485  for (typename ObjectVectorType::iterator it = objectsOfGT.begin(); it != objectsOfGT.end(); ++it)
486  {
487  LabelObjectType* regionGT = *it;
488  std::ostringstream attribute;
489  attribute << ATTRIBUTE_US << "_" << indexUS;
490 
491  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RA), static_cast<AttributesValueType>(scoreRA));
492 
493  if (m_UseExtendedAttributes)
494  {
495  regionMS->SetAttribute(attribute.str(), static_cast<AttributesValueType>(regionGT->GetLabel()));
496  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_US), static_cast<AttributesValueType>(regionMS->GetLabel()));
497  }
498 
499  indexUS++;
500  }
501 
502  MSindices.insert(col);
503  for (RegionSetType::iterator it = regionsOfGT.begin(); it != regionsOfGT.end(); ++it)
504  {
505  GTindices.insert(*it);
506  otbDebugMacro(<< *it << " ");
507  }
508  otbDebugMacro(<< "US " << col);
509  }
510  else
511  {
512  otbDebugMacro(<< "No GT region present in potential US instance.");
513  }
514  }
515  // check for empty columns (MS region that doesn't intersect any GT region)
516  if (IsColEmpty)
517  {
518  MSindices.insert(col);
519  }
520  else
521  {
522  areaMS += static_cast<double>(m_CardRegMS[col]);
523  }
524  } // end of column loop
525 
526  // check for Missed regions (unregistered regions in GT)
527  iterGT.GoToBegin();
528  for (unsigned int i = 0; i < m_NumberOfRegionsGT; ++i, ++iterGT)
529  {
530  if (GTindices.count(i) == 0)
531  {
532  otbDebugMacro(<< "M " << i);
533  LabelObjectType* regionGT = iterGT.GetLabelObject();
534 
535  bufferRM += static_cast<double>(m_CardRegGT[i]);
536 
537  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RM), 1.0);
538 
539  if (m_UseExtendedAttributes)
540  {
541  regionGT->SetAttribute(GetNameFromAttribute(ATTRIBUTE_M), static_cast<AttributesValueType>(regionGT->GetLabel()));
542  }
543  }
544  }
545 
546  // check for Noise regions (unregistered regions in MS)
547  iterMS.GoToBegin();
548  for (unsigned int i = 0; i < m_NumberOfRegionsMS; ++i, ++iterMS)
549  {
550  if (MSindices.count(i) == 0)
551  {
552  LabelObjectType* regionMS = iterMS.GetLabelObject();
553 
554  bufferRN += static_cast<double>(m_CardRegMS[i]);
555 
556  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_RN), 1.0);
557 
558  if (m_UseExtendedAttributes)
559  {
560  regionMS->SetAttribute(GetNameFromAttribute(ATTRIBUTE_N), static_cast<AttributesValueType>(regionMS->GetLabel()));
561  }
562  }
563  }
564 
565  // Compute average scores
566  m_MeanRC = static_cast<AttributesValueType>(bufferRC / areaGT);
567  m_MeanRF = static_cast<AttributesValueType>(bufferRF / areaGT);
568  m_MeanRA = static_cast<AttributesValueType>(bufferRA / areaGT);
569  m_MeanRM = static_cast<AttributesValueType>(bufferRM / areaGT);
570  m_MeanRN = static_cast<AttributesValueType>(bufferRN / areaMS);
571 }
572 }
573 #endif
otbDebugMacro
#define otbDebugMacro(x)
Definition: otbMacro.h:61
otb::HooverInstanceFilter::ImageRegionType
LabelMapType::RegionType ImageRegionType
Definition: otbHooverInstanceFilter.h:98
otb::HooverInstanceFilter::SetGroundTruthLabelMap
void SetGroundTruthLabelMap(const LabelMapType *gt)
Definition: otbHooverInstanceFilter.hxx:54
otb::HooverInstanceFilter::ThreadedProcessLabelObject
void ThreadedProcessLabelObject(LabelObjectType *labelObject) override
Definition: otbHooverInstanceFilter.hxx:230
otb::HooverInstanceFilter::GetGroundTruthLabelMap
const LabelMapType * GetGroundTruthLabelMap()
Definition: otbHooverInstanceFilter.hxx:68
otb::find
string_view find(string_view const &haystack, string_view const &needle)
Definition: otbStringUtilities.h:305
otb::HooverInstanceFilter::ConstIteratorType
LabelMapType::ConstIterator ConstIteratorType
Definition: otbHooverInstanceFilter.h:92
otb::HooverInstanceFilter::GetMachineSegmentationLabelMap
LabelMapType * GetMachineSegmentationLabelMap()
Definition: otbHooverInstanceFilter.hxx:75
otb::HooverInstanceFilter::RegionSetType
std::set< CoefficientType > RegionSetType
Definition: otbHooverInstanceFilter.h:108
otb::HooverInstanceFilter::m_MeanRN
AttributesValueType m_MeanRN
Definition: otbHooverInstanceFilter.h:299
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbHooverInstanceFilter.h
otb::HooverInstanceFilter::GetOutputMachineSegmentationLabelMap
LabelMapType * GetOutputMachineSegmentationLabelMap()
Definition: otbHooverInstanceFilter.hxx:89
otb::HooverInstanceFilter::m_HooverMatrix
MatrixType m_HooverMatrix
Definition: otbHooverInstanceFilter.h:272
otbMacro.h
otb::HooverInstanceFilter::IteratorType
LabelMapType::Iterator IteratorType
Definition: otbHooverInstanceFilter.h:93
otb::HooverInstanceFilter::m_LabelsGT
LabelVectorType m_LabelsGT
Definition: otbHooverInstanceFilter.h:269
otb::HooverInstanceFilter::m_CardRegMS
CardinalVector m_CardRegMS
Definition: otbHooverInstanceFilter.h:278
otb::HooverInstanceFilter::m_MeanRF
AttributesValueType m_MeanRF
Definition: otbHooverInstanceFilter.h:290
otb::HooverInstanceFilter::ReleaseInputs
void ReleaseInputs() override
Definition: otbHooverInstanceFilter.hxx:139
otb::HooverInstanceFilter::AllocateOutputs
void AllocateOutputs() override
Definition: otbHooverInstanceFilter.hxx:95
otb::HooverInstanceFilter::HooverInstanceFilter
HooverInstanceFilter()
Definition: otbHooverInstanceFilter.hxx:32
otb::HooverInstanceFilter::m_MeanRA
AttributesValueType m_MeanRA
Definition: otbHooverInstanceFilter.h:293
otbWarningMacro
#define otbWarningMacro(x)
Definition: otbMacro.h:65
otb::HooverInstanceFilter::LabelObjectType
LabelMapType::LabelObjectType LabelObjectType
Definition: otbHooverInstanceFilter.h:94
otb::HooverInstanceFilter::m_MeanRC
AttributesValueType m_MeanRC
Definition: otbHooverInstanceFilter.h:287
otb::HooverInstanceFilter::AfterThreadedGenerateData
void AfterThreadedGenerateData() override
Definition: otbHooverInstanceFilter.hxx:278
otb::HooverInstanceFilter::BeforeThreadedGenerateData
void BeforeThreadedGenerateData() override
Definition: otbHooverInstanceFilter.hxx:155
otb::HooverInstanceFilter::LabelMapPointer
LabelMapType::Pointer LabelMapPointer
Definition: otbHooverInstanceFilter.h:91
otb::HooverInstanceFilter::ObjectVectorType
std::vector< LabelObjectType * > ObjectVectorType
Definition: otbHooverInstanceFilter.h:109
otb::HooverInstanceFilter::m_MeanRM
AttributesValueType m_MeanRM
Definition: otbHooverInstanceFilter.h:296
otb::HooverInstanceFilter::SetMachineSegmentationLabelMap
void SetMachineSegmentationLabelMap(const LabelMapType *ms)
Definition: otbHooverInstanceFilter.hxx:61
otb::HooverInstanceFilter::AttributesValueType
LabelObjectType::AttributesValueType AttributesValueType
Definition: otbHooverInstanceFilter.h:96
otb::HooverInstanceFilter::m_CardRegGT
CardinalVector m_CardRegGT
Definition: otbHooverInstanceFilter.h:275
otb::HooverInstanceFilter::GetOutputGroundTruthLabelMap
LabelMapType * GetOutputGroundTruthLabelMap()
Definition: otbHooverInstanceFilter.hxx:82
otb::HooverInstanceFilter::LabelMapType
TLabelMap LabelMapType
Definition: otbHooverInstanceFilter.h:87
otb::HooverInstanceFilter::LabelType
LabelObjectType::LabelType LabelType
Definition: otbHooverInstanceFilter.h:102