Skip to content

Commit

Permalink
STYLE: Prefer setting the input once all ivars have been set in test
Browse files Browse the repository at this point in the history
Prefer setting the input once all ivars have been set in
`itkPatchBasedDenoisingImageFilterDefaultTest.cxx`.
  • Loading branch information
jhlegarreta committed Aug 31, 2023
1 parent 935a5b1 commit e14a731
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ doDenoising(const std::string & inputFileName, const std::string & outputFileNam

// Create filter and initialize
auto filter = FilterType::New();
filter->SetInput(reader->GetOutput());

ITK_TEST_SET_GET_BOOLEAN(filter, UseSmoothDiscPatchWeights, true);
auto kernelBandwidthSigma = typename FilterType::RealArrayType{};
Expand All @@ -59,6 +58,8 @@ doDenoising(const std::string & inputFileName, const std::string & outputFileNam
// Use 2 threads for consistency
filter->SetNumberOfWorkUnits(2);

filter->SetInput(reader->GetOutput());

// Denoise the image
ITK_TRY_EXPECT_NO_EXCEPTION(filter->Update());

Expand Down

0 comments on commit e14a731

Please sign in to comment.