-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApolloPanStitch App and Test Update #4164
Changes from all commits
37564f1
71a2d79
b817780
dbdc1db
0f0a5b4
b7dd379
b2e61ac
27a245d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef apollopanstitcher_h | ||
#define apollopanstitcher_h | ||
|
||
#include "Pvl.h" | ||
#include "UserInterface.h" | ||
|
||
namespace Isis{ | ||
extern void apolloPanStitcher(UserInterface &ui); | ||
} | ||
|
||
#endif |
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <QTemporaryDir> | ||
#include <memory> | ||
|
||
#include "apollopanstitcher.h" | ||
#include "Fixtures.h" | ||
#include "Pvl.h" | ||
#include "PvlGroup.h" | ||
#include "TestUtilities.h" | ||
#include "Histogram.h" | ||
#include "Endian.h" | ||
#include "PixelType.h" | ||
|
||
#include "gtest/gtest.h" | ||
#include "gmock/gmock.h" | ||
|
||
#include "Fixtures.h" | ||
|
||
using namespace Isis; | ||
|
||
static QString APP_XML = FileName("$ISISROOT/bin/xml/apollopanstitcher.xml").expanded(); | ||
|
||
TEST_F(TempTestingFiles, FunctionalTestsApolloPanStitcherDefault) { | ||
QVector<QString> args = {"file_base=$ISISTESTDATA/isis/src/apollo/apps/apollopanstitcher/tsts/default/input/AS15_P_0177R10", | ||
"to=" + tempDir.path() + "/reduced8.cub", | ||
"microns=50"}; | ||
|
||
UserInterface options(APP_XML, args); | ||
try { | ||
apolloPanStitcher(options); | ||
} | ||
catch (IException &e) { | ||
FAIL() << "Unable to stitcher apollo images: " << e.toString().toStdString().c_str() << std::endl; | ||
} | ||
Cube outputCube(options.GetFileName("TO")); | ||
|
||
std::unique_ptr<Histogram> hist (outputCube.histogram()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious since I haven't seen unique_ptr be used before. Is there a benefit to using it over assigning a pointer in the usual way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case, the unique pointer handles deleting the object when it goes out of scope and nothing else is pointing at it. It really just handles some quality of life features when it comes to managing memory. |
||
|
||
EXPECT_DOUBLE_EQ(hist->Average(), 53214.457630315941); | ||
EXPECT_DOUBLE_EQ(hist->Sum(), 3243279908182.748); | ||
EXPECT_EQ(hist->ValidPixels(), 60947345); | ||
EXPECT_DOUBLE_EQ(hist->StandardDeviation(), 20175.877734537076); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we reduce this data? Running an ls -lah shows that each file is ~39MB, and it looks like the output is being put in the ISISTESTDATA area, so we're increasing data usage by 234MB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input
reduce8.cub
can be removed from the data area. We have to keep the eight ~39MB cubes and the new test output is being stored in the temp directory.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being annoying, but why can't they be reduced? I guess I don't understand apollopanstitch well enough to understand why we can't downsample the cubes in the same way as other tests (i.e. map2map with lower resolution).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cubes are stitched together by "...find[ing] the centers of the fiducial marks along the image segments." (source) I believe that the actual image DNs are searched for these fiducial marks and reducing or modifying the images could potentially break this test case.
I brought this up last week during stand up and the consensus seemed to be to reduce the data footprint as easily as possible. The easiest thing to do is remove the stored output file (~240MB file) since we can test it in a gtest, so we reduce the data being used with minimal effort. I could look into reproducing the fiducial marks but that may take a while for a test case. I figured this was one of the few cases where using the full set of test data is worth the storage space.