Isis 3 Programmer Reference
LineFilter.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "IsisDebug.h"
10 
11 #include "LineFilter.h"
12 
13 #include <QPair>
14 #include <QString>
15 
16 #include "ControlMeasure.h"
17 #include "ControlNet.h"
18 #include "ControlPoint.h"
19 
20 
21 namespace Isis {
22  LineFilter::LineFilter(
23  AbstractFilter::FilterEffectivenessFlag flag,
24  int minimumForSuccess) : AbstractNumberFilter(flag, minimumForSuccess) {
25  }
26 
27 
28  LineFilter::LineFilter(const LineFilter &other) : AbstractNumberFilter(other) {
29  }
30 
31 
32  LineFilter::~LineFilter() {
33  }
34 
35 
36  bool LineFilter::evaluate(const QPair<QString, ControlNet *> *imageAndNet) const {
37  return evaluateImageFromMeasureFilter(imageAndNet);
38  }
39 
40 
41  bool LineFilter::evaluate(const ControlPoint *point) const {
42  return evaluatePointFromMeasureFilter(point);
43  }
44 
45 
46  bool LineFilter::evaluate(const ControlMeasure *measure) const {
47  return AbstractNumberFilter::evaluate(measure->GetLine());
48  }
49 
50 
51  AbstractFilter *LineFilter::clone() const {
52  return new LineFilter(*this);
53  }
54 
55 
56  QString LineFilter::getImageDescription() const {
57  QString description = AbstractFilter::getImageDescription();
58  if (getMinForSuccess() == 1) {
59  description += "measure that has a line which is ";
60  }
61  else {
62  description += "measures that have lines which are ";
63  }
64 
65  description += descriptionSuffix();
66  return description;
67  }
68 
69 
70  QString LineFilter::getPointDescription() const {
71  return getImageDescription();
72  }
73 
74 
75  QString LineFilter::getMeasureDescription() const {
76  return "have lines which are " + descriptionSuffix();
77  }
78 }
QPair
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16