Commit c37fd2cb1d7e439330f40436c4a3f0d86238ad13
1 parent
24f2c4e0
remove file exclusion on append
Showing
1 changed file
with
3 additions
and
17 deletions
openbr/core/core.cpp
| @@ -199,14 +199,6 @@ struct AlgorithmCore | @@ -199,14 +199,6 @@ struct AlgorithmCore | ||
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | bool multiProcess = Globals->file.getBool("multiProcess", false); | 201 | bool multiProcess = Globals->file.getBool("multiProcess", false); |
| 202 | - bool fileExclusion = false; | ||
| 203 | - | ||
| 204 | - // In append mode, we will exclude any templates with filenames already present in the output gallery | ||
| 205 | - if (gallery.contains("append") && gallery.exists() ) { | ||
| 206 | - FileList::fromGallery(gallery,true); | ||
| 207 | - fileExclusion = true; | ||
| 208 | - } | ||
| 209 | - | ||
| 210 | Transform *enroll = simplifiedTransform.data(); | 202 | Transform *enroll = simplifiedTransform.data(); |
| 211 | 203 | ||
| 212 | if (multiProcess) | 204 | if (multiProcess) |
| @@ -216,12 +208,6 @@ struct AlgorithmCore | @@ -216,12 +208,6 @@ struct AlgorithmCore | ||
| 216 | stages.append(enroll); | 208 | stages.append(enroll); |
| 217 | 209 | ||
| 218 | QString outputDesc; | 210 | QString outputDesc; |
| 219 | - QScopedPointer<Transform> exclusionBase; | ||
| 220 | - if (fileExclusion) { | ||
| 221 | - exclusionBase.reset(Transform::make("FileExclusion(" + gallery.flat() + ")", NULL)); | ||
| 222 | - stages.prepend(exclusionBase.data()); | ||
| 223 | - } | ||
| 224 | - | ||
| 225 | if (!noOutput) | 211 | if (!noOutput) |
| 226 | outputDesc.append("GalleryOutput("+gallery.flat()+")+"); | 212 | outputDesc.append("GalleryOutput("+gallery.flat()+")+"); |
| 227 | 213 | ||
| @@ -479,7 +465,7 @@ struct AlgorithmCore | @@ -479,7 +465,7 @@ struct AlgorithmCore | ||
| 479 | else if (!(QStringList() << "gal" << "mem" << "template" << "t").contains(rowGallery.suffix())) | 465 | else if (!(QStringList() << "gal" << "mem" << "template" << "t").contains(rowGallery.suffix())) |
| 480 | needEnrollRows = true; | 466 | needEnrollRows = true; |
| 481 | 467 | ||
| 482 | - // At this point, we have decided how we will structure the comparison (either in transpose mode, or not), | 468 | + // At this point, we have decided how we will structure the comparison (either in transpose mode, or not), |
| 483 | // and have the column gallery enrolled, and have decided whether or not we need to enroll the row gallery. | 469 | // and have the column gallery enrolled, and have decided whether or not we need to enroll the row gallery. |
| 484 | // From this point, we will build a single algorithm that (optionally) does enrollment, then does comparisons | 470 | // From this point, we will build a single algorithm that (optionally) does enrollment, then does comparisons |
| 485 | // and output, optionally using ProcessWrapper to do the enrollment and comparison in separate processes. | 471 | // and output, optionally using ProcessWrapper to do the enrollment and comparison in separate processes. |
| @@ -512,7 +498,7 @@ struct AlgorithmCore | @@ -512,7 +498,7 @@ struct AlgorithmCore | ||
| 512 | QScopedPointer<Transform> compareRegion(compareRegionBase); | 498 | QScopedPointer<Transform> compareRegion(compareRegionBase); |
| 513 | 499 | ||
| 514 | // At this point, compareRegion is a transform, which optionally does enrollment, then compares the row | 500 | // At this point, compareRegion is a transform, which optionally does enrollment, then compares the row |
| 515 | - // set against the column set. If in multi-process mode, the enrollment and comparison are wrapped in a | 501 | + // set against the column set. If in multi-process mode, the enrollment and comparison are wrapped in a |
| 516 | // ProcessWrapper transform, and will be transparently run in multiple processes. | 502 | // ProcessWrapper transform, and will be transparently run in multiple processes. |
| 517 | 503 | ||
| 518 | // We also need to add Output and progress counting to the algorithm we are building, so we will assign them to | 504 | // We also need to add Output and progress counting to the algorithm we are building, so we will assign them to |
| @@ -536,7 +522,7 @@ struct AlgorithmCore | @@ -536,7 +522,7 @@ struct AlgorithmCore | ||
| 536 | // and pass the transforms it reads through the base algorithm. | 522 | // and pass the transforms it reads through the base algorithm. |
| 537 | QScopedPointer<Transform> streamWrapper(br::wrapTransform(pipeline, "Stream(readMode=StreamGallery, endPoint="+outputRegionDesc+"+DiscardTemplates)")); | 523 | QScopedPointer<Transform> streamWrapper(br::wrapTransform(pipeline, "Stream(readMode=StreamGallery, endPoint="+outputRegionDesc+"+DiscardTemplates)")); |
| 538 | 524 | ||
| 539 | - // We set up a template containing the rowGallery we want to compare. | 525 | + // We set up a template containing the rowGallery we want to compare. |
| 540 | TemplateList rowGalleryTemplate; | 526 | TemplateList rowGalleryTemplate; |
| 541 | rowGalleryTemplate.append(Template(rowGallery)); | 527 | rowGalleryTemplate.append(Template(rowGallery)); |
| 542 | TemplateList outputGallery; | 528 | TemplateList outputGallery; |