diff --git a/tools/auto-tester/src/ITKImageComparer.cpp b/tools/auto-tester/src/ITKImageComparer.cpp index c39f41db2d..b7e1ee2423 100644 --- a/tools/auto-tester/src/ITKImageComparer.cpp +++ b/tools/auto-tester/src/ITKImageComparer.cpp @@ -16,12 +16,12 @@ ITKImageComparer::ITKImageComparer() { // These are smart pointers that do not need to be deleted - actualImageReader = ReaderType::New(); + resultImageReader = ReaderType::New(); expectedImageReader = ReaderType::New(); } -float ITKImageComparer::compareImages(QString actualImageFilename, QString expectedImageFilename) const { - actualImageReader->SetFileName(actualImageFilename.toStdString().c_str()); +float ITKImageComparer::compareImages(QString resultImageFilename, QString expectedImageFilename) const { + resultImageReader->SetFileName(resultImageFilename.toStdString().c_str()); expectedImageReader->SetFileName(expectedImageFilename.toStdString().c_str()); // Images are converted to monochrome for comparison @@ -29,10 +29,10 @@ float ITKImageComparer::compareImages(QString actualImageFilename, QString expec using MonochromeImageType = itk::Image; using FilterType = itk::RGBToLuminanceImageFilter; - FilterType::Pointer actualImageToMonochrome = FilterType::New(); + FilterType::Pointer resultImageToMonochrome = FilterType::New(); FilterType::Pointer expectedImageToMonochrome = FilterType::New(); - actualImageToMonochrome->SetInput(actualImageReader->GetOutput()); + resultImageToMonochrome->SetInput(resultImageReader->GetOutput()); expectedImageToMonochrome->SetInput(expectedImageReader->GetOutput()); return 0.0; diff --git a/tools/auto-tester/src/ITKImageComparer.h b/tools/auto-tester/src/ITKImageComparer.h index ff1b4347a7..c211338119 100644 --- a/tools/auto-tester/src/ITKImageComparer.h +++ b/tools/auto-tester/src/ITKImageComparer.h @@ -17,7 +17,7 @@ class ITKImageComparer : public ImageComparer { public: ITKImageComparer(); - float compareImages(QString actualImageFilename, QString expectedImageFilename) const final; + float compareImages(QString resultImageFilename, QString expectedImageFilename) const final; private: static const unsigned int Dimension{ 2 }; @@ -27,7 +27,7 @@ private: using ReaderType = itk::ImageFileReader; - ReaderType::Pointer actualImageReader; + ReaderType::Pointer resultImageReader; ReaderType::Pointer expectedImageReader; }; diff --git a/tools/auto-tester/src/ImageComparer.h b/tools/auto-tester/src/ImageComparer.h index bec99c619e..146a0cbfd1 100644 --- a/tools/auto-tester/src/ImageComparer.h +++ b/tools/auto-tester/src/ImageComparer.h @@ -14,7 +14,7 @@ class ImageComparer { public: - virtual float compareImages(QString actualImageFilename, QString expectedImageFilename) const = 0; + virtual float compareImages(QString resultImageFilename, QString expectedImageFilename) const = 0; }; #endif // hifi_ImageComparer_h diff --git a/tools/auto-tester/src/Test.cpp b/tools/auto-tester/src/Test.cpp index aa724aeb50..cf0cb0d08c 100644 --- a/tools/auto-tester/src/Test.cpp +++ b/tools/auto-tester/src/Test.cpp @@ -46,21 +46,21 @@ void Test::evaluateTests() { // Separate images into two lists. The first is the expected images, the second is the test results // Images that are in the wrong format are ignored. QStringList expectedImages; - QStringList actualImages; + QStringList resultImages; foreach(QString currentFilename, sortedImageFilenames) { QString fullCurrentFilename = pathToImageDirectory + "/" + currentFilename; if (isInExpectedImageFilenameFormat(currentFilename)) { expectedImages << fullCurrentFilename; } else if (isInSnapshotFilenameFormat(currentFilename)) { - actualImages << fullCurrentFilename; + resultImages << fullCurrentFilename; } } // The number of images in each list should be identical - if (expectedImages.length() != actualImages.length()) { + if (expectedImages.length() != resultImages.length()) { messageBox.critical(0, "Test failed", - "Found " + QString::number(actualImages.length()) + " images in directory" + + "Found " + QString::number(resultImages.length()) + " images in directory" + "\nExpected to find " + QString::number(expectedImages.length()) + " images"); exit(-1); @@ -72,13 +72,13 @@ void Test::evaluateTests() { bool success{ true }; bool keepOn{ true }; for (int i = 0; keepOn && i < expectedImages.length(); ++i) { - float error = itkImageComparer.compareImages(actualImages[i], expectedImages[i]); + float error = itkImageComparer.compareImages(resultImages[i], expectedImages[i]); if (error > THRESHOLD) { mismatchWindow.setTestFailure(TestFailure{ error, // value of the error (float) expectedImages[i].left(expectedImages[i].lastIndexOf("/") + 1), // path to the test (including trailing / QFileInfo(expectedImages[i].toStdString().c_str()).fileName(), // filename of expected image - QFileInfo(actualImages[i].toStdString().c_str()).fileName() // filename of result image + QFileInfo(resultImages[i].toStdString().c_str()).fileName() // filename of result image }); mismatchWindow.exec(); diff --git a/tools/auto-tester/src/ui/MismatchWindow.cpp b/tools/auto-tester/src/ui/MismatchWindow.cpp index 1e1d0f91d9..c3fb5023e7 100644 --- a/tools/auto-tester/src/ui/MismatchWindow.cpp +++ b/tools/auto-tester/src/ui/MismatchWindow.cpp @@ -17,7 +17,7 @@ MismatchWindow::MismatchWindow(QWidget *parent) setupUi(this); expectedImage->setScaledContents(true); - actualImage->setScaledContents(true); + resultImage->setScaledContents(true); } void MismatchWindow::setTestFailure(TestFailure testFailure) { @@ -28,8 +28,8 @@ void MismatchWindow::setTestFailure(TestFailure testFailure) { expectedFilename->setText(testFailure._expectedImageFilename); expectedImage->setPixmap(QPixmap(testFailure._pathname + testFailure._expectedImageFilename)); - actualFilename->setText(testFailure._actualImageFilename); - actualImage->setPixmap(QPixmap(testFailure._pathname + testFailure._actualImageFilename)); + resultFilename->setText(testFailure._actualImageFilename); + resultImage->setPixmap(QPixmap(testFailure._pathname + testFailure._actualImageFilename)); } void MismatchWindow::on_passTestButton_clicked()