v1.0.0-rc.85
This commit is contained in:
@@ -893,10 +893,10 @@ TEST_CASE("JFJochReader_Spots_OldMasterFormat", "[HDF5][Full]") {
|
||||
message.spots = spots;
|
||||
message.indexing_result = (i % 2 == 0);
|
||||
message.number = i;
|
||||
message.spot_count = 72;
|
||||
message.spot_count_ice_rings = 45;
|
||||
message.spot_count_low_res = 12;
|
||||
message.spot_count_indexed = 15;
|
||||
message.spot_count = 72 + i;
|
||||
message.spot_count_ice_rings = 45 + 2 * i;
|
||||
message.spot_count_low_res = 12 + 3 * i;
|
||||
message.spot_count_indexed = 15 + 4 * i;
|
||||
REQUIRE_NOTHROW(file_set.WriteHDF5(message));
|
||||
|
||||
}
|
||||
@@ -910,6 +910,10 @@ TEST_CASE("JFJochReader_Spots_OldMasterFormat", "[HDF5][Full]") {
|
||||
REQUIRE_NOTHROW(reader.ReadFile("test40_master.h5"));
|
||||
auto dataset = reader.GetDataset();
|
||||
CHECK(dataset->experiment.GetImageNum() == 4);
|
||||
CHECK(dataset->spot_count[1] == 72 + 1);
|
||||
CHECK(dataset->spot_count_ice_rings[2] == 45 + 2 * 2);
|
||||
CHECK(dataset->spot_count_low_res[3] == 12 + 3 * 3);
|
||||
CHECK(dataset->spot_count_indexed[0] == 15);
|
||||
|
||||
REQUIRE_THROWS(reader.LoadImage(4));
|
||||
|
||||
@@ -918,10 +922,10 @@ TEST_CASE("JFJochReader_Spots_OldMasterFormat", "[HDF5][Full]") {
|
||||
REQUIRE_NOTHROW(reader_image = reader.LoadImage(i));
|
||||
|
||||
REQUIRE(reader_image);
|
||||
CHECK(reader_image->ImageData().spot_count == 72);
|
||||
CHECK(reader_image->ImageData().spot_count_ice_rings == 45);
|
||||
CHECK(reader_image->ImageData().spot_count_low_res == 12);
|
||||
CHECK(reader_image->ImageData().spot_count_indexed == 15);
|
||||
CHECK(reader_image->ImageData().spot_count == 72 + i);
|
||||
CHECK(reader_image->ImageData().spot_count_ice_rings == 45 + 2 * i);
|
||||
CHECK(reader_image->ImageData().spot_count_low_res == 12 + 3 * i);
|
||||
CHECK(reader_image->ImageData().spot_count_indexed == 15 + 4 * i);
|
||||
REQUIRE(reader_image->ImageData().spots.size() == 2);
|
||||
CHECK(reader_image->ImageData().spots[0].x == 1);
|
||||
CHECK(reader_image->ImageData().spots[0].y == 2);
|
||||
@@ -985,7 +989,11 @@ TEST_CASE("JFJochReader_Spots_VDS", "[HDF5][Full]") {
|
||||
message.image = CompressedImage(image, x.GetXPixelsNum(), x.GetYPixelsNum());
|
||||
message.spots = spots;
|
||||
message.indexing_result = (i % 2 == 0);
|
||||
message.number = i;
|
||||
message.number = i;
|
||||
message.spot_count = 72 + i;
|
||||
message.spot_count_ice_rings = 45 + 2 * i;
|
||||
message.spot_count_low_res = 12 + 3 * i;
|
||||
message.spot_count_indexed = 15 + 4 * i;
|
||||
|
||||
REQUIRE_NOTHROW(file_set.WriteHDF5(message));
|
||||
|
||||
@@ -1001,6 +1009,10 @@ TEST_CASE("JFJochReader_Spots_VDS", "[HDF5][Full]") {
|
||||
auto dataset = reader.GetDataset();
|
||||
CHECK(dataset->experiment.GetImageNum() == 4);
|
||||
|
||||
CHECK(dataset->spot_count[1] == 72 + 1);
|
||||
CHECK(dataset->spot_count_ice_rings[2] == 45 + 2 * 2);
|
||||
CHECK(dataset->spot_count_low_res[3] == 12 + 3 * 3);
|
||||
CHECK(dataset->spot_count_indexed[0] == 15);
|
||||
REQUIRE_THROWS(reader.LoadImage(4));
|
||||
|
||||
std::shared_ptr<JFJochReaderImage> reader_image;
|
||||
@@ -1008,6 +1020,11 @@ TEST_CASE("JFJochReader_Spots_VDS", "[HDF5][Full]") {
|
||||
REQUIRE_NOTHROW(reader_image = reader.LoadImage(i));
|
||||
|
||||
REQUIRE(reader_image);
|
||||
CHECK(reader_image->ImageData().spot_count == 72 + i);
|
||||
CHECK(reader_image->ImageData().spot_count_ice_rings == 45 + 2 * i);
|
||||
CHECK(reader_image->ImageData().spot_count_low_res == 12 + 3 * i);
|
||||
CHECK(reader_image->ImageData().spot_count_indexed == 15 + 4 * i);
|
||||
|
||||
REQUIRE(reader_image->ImageData().spots.size() == 2);
|
||||
CHECK(reader_image->ImageData().spots[0].x == 1);
|
||||
CHECK(reader_image->ImageData().spots[0].y == 2);
|
||||
|
||||
Reference in New Issue
Block a user