Skip to content

Commit 4f1979b

Browse files
authored
Merge pull request #44 from jhlegarreta/IncreaseFrequencyExpandViaInverseFFTImageFilterCoverage
ENH: Increase itk::FrequencyExpandViaFFTImageFilter coverage.
2 parents ebd8717 + 3cdf65a commit 4f1979b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/itkFrequencyExpandAndShrinkTest.cxx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ runFrequencyExpandAndShrinkTest( const std::string & inputImage, const std::stri
7777
typedef typename FFTFilterType::OutputImageType ComplexImageType;
7878
typedef itk::InverseFFTImageFilter< ComplexImageType, ImageType > InverseFFTFilterType;
7979
size_t resizeFactor = 2;
80+
8081
/*********** EXPAND ***************/
8182
typedef itk::FrequencyExpandImageFilter< ComplexImageType > ExpandType;
8283
typename ExpandType::Pointer expandFilter = ExpandType::New();
@@ -87,8 +88,16 @@ runFrequencyExpandAndShrinkTest( const std::string & inputImage, const std::stri
8788
typedef itk::FrequencyExpandViaInverseFFTImageFilter< ComplexImageType > ExpandViaInverseFFTType;
8889
typename ExpandViaInverseFFTType::Pointer expandViaInverseFFTFilter = ExpandViaInverseFFTType::New();
8990
expandViaInverseFFTFilter->SetInput(fftFilter->GetOutput());
91+
92+
typename ExpandViaInverseFFTType::ExpandFactorsType expandFactors;
93+
expandFactors.Fill( resizeFactor );
9094
expandViaInverseFFTFilter->SetExpandFactors(resizeFactor);
91-
expandViaInverseFFTFilter->Update();
95+
TEST_SET_GET_VALUE( expandFactors, expandViaInverseFFTFilter->GetExpandFactors() );
96+
97+
expandViaInverseFFTFilter->SetExpandFactors(expandFactors);
98+
TEST_SET_GET_VALUE( expandFactors, expandViaInverseFFTFilter->GetExpandFactors() );
99+
100+
TRY_EXPECT_NO_EXCEPTION( expandViaInverseFFTFilter->Update() );
92101

93102
// #ifdef ITK_VISUALIZE_TESTS
94103
// typename InverseFFTFilterType::Pointer inverseFFTExpand1 = InverseFFTFilterType::New();

0 commit comments

Comments
 (0)