11 #include "LineFilter.h"
16 #include "ControlMeasure.h"
17 #include "ControlNet.h"
18 #include "ControlPoint.h"
22 LineFilter::LineFilter(
23 AbstractFilter::FilterEffectivenessFlag flag,
24 int minimumForSuccess) : AbstractNumberFilter(flag, minimumForSuccess) {
28 LineFilter::LineFilter(
const LineFilter &other) : AbstractNumberFilter(other) {
32 LineFilter::~LineFilter() {
37 return evaluateImageFromMeasureFilter(imageAndNet);
41 bool LineFilter::evaluate(
const ControlPoint *point)
const {
42 return evaluatePointFromMeasureFilter(point);
46 bool LineFilter::evaluate(
const ControlMeasure *measure)
const {
47 return AbstractNumberFilter::evaluate(measure->GetLine());
51 AbstractFilter *LineFilter::clone()
const {
52 return new LineFilter(*
this);
56 QString LineFilter::getImageDescription()
const {
57 QString description = AbstractFilter::getImageDescription();
58 if (getMinForSuccess() == 1) {
59 description +=
"measure that has a line which is ";
62 description +=
"measures that have lines which are ";
65 description += descriptionSuffix();
70 QString LineFilter::getPointDescription()
const {
71 return getImageDescription();
75 QString LineFilter::getMeasureDescription()
const {
76 return "have lines which are " + descriptionSuffix();