From 1a25ac243c0e7b8aa37cd0f8b82c48446c86f403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Fri, 31 Jan 2025 12:22:53 -0500 Subject: [PATCH] BUG: Fix failure of 5 example segmentation tests The images were written before they were ready. GeodesicActiveContour - 4 tests CurvesLevelSetImageFilter - 1 test --- Examples/Segmentation/CurvesLevelSetImageFilter.cxx | 2 +- Examples/Segmentation/GeodesicActiveContourImageFilter.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Examples/Segmentation/CurvesLevelSetImageFilter.cxx b/Examples/Segmentation/CurvesLevelSetImageFilter.cxx index d1e2b7082e6..128cc63f5e9 100644 --- a/Examples/Segmentation/CurvesLevelSetImageFilter.cxx +++ b/Examples/Segmentation/CurvesLevelSetImageFilter.cxx @@ -406,7 +406,6 @@ main(int argc, char * argv[]) caster4->SetInput(fastMarching->GetOutput()); caster4->SetOutputMinimum(0); caster4->SetOutputMaximum(255); - itk::WriteImage(caster4->GetOutput(), "CurvesImageFilterOutput4.png"); // The FastMarchingImageFilter requires the user to specify the @@ -452,6 +451,7 @@ main(int argc, char * argv[]) std::cout << "RMS change: " << geodesicActiveContour->GetRMSChange() << std::endl; + itk::WriteImage(caster4->GetOutput(), "CurvesImageFilterOutput4.png"); // The following writer type is used to save the output of the time-crossing // map in a file with appropriate pixel representation. The advantage of diff --git a/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx b/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx index 39dccd50361..29b0afc6312 100644 --- a/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx +++ b/Examples/Segmentation/GeodesicActiveContourImageFilter.cxx @@ -432,8 +432,6 @@ main(int argc, char * argv[]) caster4->SetInput(fastMarching->GetOutput()); caster4->SetOutputMinimum(0); caster4->SetOutputMaximum(255); - itk::WriteImage(caster4->GetOutput(), - "GeodesicActiveContourImageFilterOutput4.png"); // The FastMarchingImageFilter requires the user to specify the // size of the image to be produced as output. This is done using the @@ -478,6 +476,8 @@ main(int argc, char * argv[]) std::cout << "RMS change: " << geodesicActiveContour->GetRMSChange() << std::endl; + itk::WriteImage(caster4->GetOutput(), + "GeodesicActiveContourImageFilterOutput4.png"); // The following writer type is used to save the output of the time-crossing // map in a file with appropriate pixel representation. The advantage of