Commit 93313217 authored by paarongiroux's avatar paarongiroux Committed by Summer Stapleton
Browse files

Changed FeatureAlgorithmFactory.cpp to allow pathnames in the algorithm...

Changed FeatureAlgorithmFactory.cpp to allow pathnames in the algorithm parameter. (Adresses issue #2474) (#3270)

* Added BasisFunctionTests.cpp. Removed BasisFunction unit test and truthfile.

* changed expectedOutput values for some of the tests

* Made tests for Displacement.cpp using gtest. removed Displacement unitTest and truthfile.

* Added Area3DTests.cpp, removed Area3D truthfile and unit test.

* included TestUtilities.h for use with exception testing, added a test for teh Area3D '=' operator

* changed formatting to adhere to USGS coding standards

* re-addedd the unit test and truth file

* changed formatSpecifications function to ignore pathnames when splitting the algorithm parameter.

* added history comment to FeatureAlgorithmFactory header file

* more changes to history in header file
parent 14a24c67
Loading
Loading
Loading
Loading
+23 −17
Original line number Diff line number Diff line
@@ -511,8 +511,14 @@ SharedRobustMatcher FeatureAlgorithmFactory::make(const QString &definition) con
 *      createMatcher(extractor))..
 */
QStringList FeatureAlgorithmFactory::formatSpecifications(QString specification) const {
  QStringList parts = specification.split("/", QString::SkipEmptyParts);

  QStringList parts;
  if ( specification.contains(QRegularExpression("@savepath", QRegularExpression::CaseInsensitiveOption)) ) {
    QRegularExpression sep("/(?=(.*(@savepath)))",QRegularExpression::CaseInsensitiveOption);
    parts = specification.split(sep, QString::SkipEmptyParts);
  }
  else {
    parts = specification.split("/", QString::SkipEmptyParts);
  }
  // Componenet specifications
  QString feature2dSpec;
  QString detectorSpec;
+46 −45
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ namespace Isis {
 *   @history 2015-10-01 Kris Becker - Original Version
 *   @history 2016-03-06 Kris Becker Completed documentation
 *   @history 2016-10-05 Ian Humphrey & Makayla Shepherd - Changed headers to OpenCV2.
 *   @history 2019-05-16 Aaron Giroux & Eric Gault - Added a regular expression to
 *                           formatSpecifications method to allow for pathnames to be entered
 *                           using the savepath parameter. Fixes 2474.
 */
class FeatureAlgorithmFactory  {
  public:
@@ -157,5 +160,3 @@ class FeatureAlgorithmFactory {
}  // namespace Isis

#endif