ImageSpotFinderTest: Add mask
This commit is contained in:
@@ -5,13 +5,15 @@
|
||||
#include "../image_analysis/spot_finding/ImageSpotFinder.h"
|
||||
|
||||
TEST_CASE("ImageSpotFinder_SignalToNoise") {
|
||||
|
||||
size_t width = 100;
|
||||
size_t height = 100;
|
||||
std::vector<float> resolution(width * height, 2.0);
|
||||
std::vector<bool> mask(width * height, false);
|
||||
|
||||
resolution[width * 50 + 50] = 1.0;
|
||||
|
||||
ImageSpotFinder s(resolution, width, height);
|
||||
ImageSpotFinder s(mask, resolution, width, height);
|
||||
|
||||
std::vector<int32_t> input (width * height);
|
||||
for (int i = 0; i < width * height; i++)
|
||||
@@ -41,11 +43,12 @@ TEST_CASE("ImageSpotFinder_SignalToNoise") {
|
||||
TEST_CASE("ImageSpotFinder_SignalToNoise_Resolution") {
|
||||
size_t width = 100;
|
||||
size_t height = 100;
|
||||
std::vector<bool> mask(width * height, false);
|
||||
std::vector<float> resolution(width * height, 2.0);
|
||||
|
||||
resolution[width * 50 + 50] = 1.0;
|
||||
|
||||
ImageSpotFinder s(resolution, width, height);
|
||||
ImageSpotFinder s(mask, resolution, width, height);
|
||||
|
||||
std::vector<int32_t> input (width * height);
|
||||
for (int i = 0; i < width * height; i++)
|
||||
@@ -77,10 +80,11 @@ TEST_CASE("ImageSpotFinder_CountThreshold_Resolution") {
|
||||
size_t width = 100;
|
||||
size_t height = 100;
|
||||
std::vector<float> resolution(width * height, 2.0);
|
||||
std::vector<bool> mask(width * height, false);
|
||||
|
||||
resolution[width * 50 + 50] = 1.0;
|
||||
|
||||
ImageSpotFinder s(resolution, width, height);
|
||||
ImageSpotFinder s(mask, resolution, width, height);
|
||||
|
||||
std::vector<int32_t> input (width * height);
|
||||
for (int i = 0; i < width * height; i++)
|
||||
|
||||
Reference in New Issue
Block a user