Skip to content

Commit

Permalink
BUG: Fix failure of 5 example segmentation tests
Browse files Browse the repository at this point in the history
The images were written before they were ready.

GeodesicActiveContour - 4 tests
CurvesLevelSetImageFilter - 1 test
  • Loading branch information
dzenanz committed Jan 31, 2025
1 parent ef4e298 commit 2236921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Examples/Segmentation/CurvesLevelSetImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Examples/Segmentation/GeodesicActiveContourImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2236921

Please sign in to comment.