14#include "ControlMeasure.h"
15#include "ControlNet.h"
16#include "ControlPoint.h"
20 LineFilter::LineFilter(
21 AbstractFilter::FilterEffectivenessFlag flag,
22 int minimumForSuccess) : AbstractNumberFilter(flag, minimumForSuccess) {
26 LineFilter::LineFilter(
const LineFilter &other) : AbstractNumberFilter(other) {
30 LineFilter::~LineFilter() {
34 bool LineFilter::evaluate(
const QPair<QString, ControlNet *> *imageAndNet)
const {
35 return evaluateImageFromMeasureFilter(imageAndNet);
39 bool LineFilter::evaluate(
const ControlPoint *point)
const {
40 return evaluatePointFromMeasureFilter(point);
44 bool LineFilter::evaluate(
const ControlMeasure *measure)
const {
45 return AbstractNumberFilter::evaluate(measure->GetLine());
49 AbstractFilter *LineFilter::clone()
const {
50 return new LineFilter(*
this);
54 QString LineFilter::getImageDescription()
const {
55 QString description = AbstractFilter::getImageDescription();
56 if (getMinForSuccess() == 1) {
57 description +=
"measure that has a line which is ";
60 description +=
"measures that have lines which are ";
63 description += descriptionSuffix();
68 QString LineFilter::getPointDescription()
const {
69 return getImageDescription();
73 QString LineFilter::getMeasureDescription()
const {
74 return "have lines which are " + descriptionSuffix();
This is free and unencumbered software released into the public domain.