diff --git a/source/FAST/Examples/DataImport/streamUFFData.cpp b/source/FAST/Examples/DataImport/streamUFFData.cpp index 32cf79efe..78a6f2425 100644 --- a/source/FAST/Examples/DataImport/streamUFFData.cpp +++ b/source/FAST/Examples/DataImport/streamUFFData.cpp @@ -37,8 +37,8 @@ int main(int argc, char** argv) { auto renderer = ImageRenderer::create()->connect(interleave); - auto window = SimpleWindow2D::create(Color::Black()) + SimpleWindow2D::create(Color::Black()) ->connect(renderer) - ->connect(widget); - window->run(); + ->connect(widget) + ->run(); } diff --git a/source/FAST/Exporters/TIFFImagePyramidExporter.cpp b/source/FAST/Exporters/TIFFImagePyramidExporter.cpp index ab56ffbdc..b7a8e69f8 100644 --- a/source/FAST/Exporters/TIFFImagePyramidExporter.cpp +++ b/source/FAST/Exporters/TIFFImagePyramidExporter.cpp @@ -120,17 +120,17 @@ void TIFFImagePyramidExporter::execute() { 1.0f / (spacing.y() / 10) * scaleY); // Convert to cm, and adjust for level } + std::cout << "starting patch gen" << std::endl; auto generator = PatchGenerator::New(); generator->setInputData(imagePyramid); generator->setPatchLevel(level); generator->setPatchSize(imagePyramid->getLevelTileWidth(level), imagePyramid->getLevelTileHeight(level)); - auto port = generator->getOutputPort(); + auto stream = DataStream(generator); Image::pointer image; int counter = 0; - do { - generator->update(); - image = port->getNextFrame(); + while(!stream.isDone()) { + image = stream.getNextFrame(); // Write tile to tiff level if(image->getWidth() != imagePyramid->getLevelTileWidth(level) || image->getHeight() != imagePyramid->getLevelTileHeight(level)) {