Skip to content

Commit

Permalink
Updated version nr to 4.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
smistad committed Aug 10, 2023
1 parent a8eb0ef commit 06b121f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(FAST)

set(VERSION_MAJOR 4)
set(VERSION_MINOR 7)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)
set(VERSION_SO 4) # SO version, should be incremented by 1 every time the existing API changes
set(FAST_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

Expand Down
37 changes: 21 additions & 16 deletions source/FAST/Algorithms/ImagePatch/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,27 @@

using namespace fast;

TEST_CASE("Patch generator for WSI", "[fast][wsi][PatchGenerator][visual]") {
auto importer = WholeSlideImageImporter::New();
importer->setFilename(Config::getTestDataPath() + "/WSI/A05.svs");

auto generator = PatchGenerator::New();
generator->setPatchSize(512, 512);
generator->setPatchLevel(0);
generator->setInputConnection(importer->getOutputPort());

auto renderer = ImageRenderer::New();
renderer->addInputConnection(generator->getOutputPort());
auto window = SimpleWindow::New();
window->addRenderer(renderer);
window->setTimeout(2000);
window->set2DMode();
window->start();
TEST_CASE("Patch generator for WSI", "[fast][wsi][PatchGenerator]") {
auto importer = WholeSlideImageImporter::create(Config::getTestDataPath() + "/WSI/A05.svs");
auto wsi = importer->runAndGetOutputData<ImagePyramid>();

const int level = 2;
const int width = 512;
const int height = 256;
auto generator = PatchGenerator::create(width, height, 1, level)
->connect(wsi);
auto stream = DataStream(generator);
const int nrOfPatches = std::ceil((float)wsi->getLevelWidth(level)/width)*std::ceil((float)wsi->getLevelHeight(level)/height);
REQUIRE(wsi->getLevelTileWidth(level) == 240);
REQUIRE(wsi->getLevelTileHeight(level) == 240);
int counter = 0;
while(!stream.isDone()) {
auto image = stream.getNextFrame<Image>();
REQUIRE(image->getWidth() == width);
REQUIRE(image->getHeight() == height);
++counter;
}
REQUIRE(nrOfPatches == counter);
}

TEST_CASE("Patch generator for volumes", "[fast][volume][PatchGenerator][visual]") {
Expand Down

0 comments on commit 06b121f

Please sign in to comment.