|
DGtal 1.4.0
|
#include <cstddef>#include <algorithm>#include <complex>#include <cmath>#include <limits>#include <string>#include <random>#include <boost/math/constants/constants.hpp>#include "DGtalCatch.h"#include "ConfigTest.h"#include "DGtal/math/RealFFT.h"#include "DGtal/images/ImageContainerBySTLVector.h"#include "DGtal/io/readers/PGMReader.h"#include "DGtal/io/writers/PGMWriter.h"#include "DGtal/base/BasicFunctors.h"Go to the source code of this file.
Functions | |
| template<typename TDomain , typename TValue > | |
| void | testForwardBackwardFFT (ImageContainerBySTLVector< TDomain, TValue > const &anImage) |
| template<typename TIterator > | |
| TIterator | findMaxNorm (TIterator it, TIterator const &it_end) |
| template<typename TDomain , typename TValue > | |
| void | testFFTScaling (ImageContainerBySTLVector< TDomain, TValue > const &anImage) |
| template<typename TDomain , typename TValue > | |
| void | cmpTranslatedFFT (ImageContainerBySTLVector< TDomain, TValue > const &anImage) |
| TEST_CASE ("Checking RealFFT on a 2D image in float precision.", "[2D][float]") | |
| TEST_CASE ("Checking RealFFT on a 2D image in double precision.", "[2D][double]") | |
| TEST_CASE ("Checking RealFFT on a 2D image in long double precision.", "[2D][long double]") | |
| TEST_CASE ("Checking RealFFT on a 3D image in double precision.", "[3D][double]") | |
| TEST_CASE ("Checking RealFFT on a 4D image in double precision.", "[4D][double]") | |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
This file is part of the DGtal library
Definition in file testRealFFT.cpp.
| void cmpTranslatedFFT | ( | ImageContainerBySTLVector< TDomain, TValue > const & | anImage | ) |
Compares the FFT of an image with the FFT of its translation.
| TDomain | Domain type. |
| TValue | Value type. |
| anImage | The image from which to take the domain. |
Definition at line 245 of file testRealFFT.cpp.
References DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain(), domain, DGtal::ImageContainerBySTLVector< TDomain, TValue >::extent(), DGtal::HyperRectDomain< TSpace >::lowerBound(), and DGtal::HyperRectDomain< TSpace >::upperBound().
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
| TIterator findMaxNorm | ( | TIterator | it, |
| TIterator const & | it_end ) |
Find element with maximal norm in a range.
| TIterator | Iterator type. |
| it | Iterator to the range begin. |
| it_end | Iterator the the range end. |
Definition at line 105 of file testRealFFT.cpp.
Referenced by testFFTScaling().
| TEST_CASE | ( | "Checking RealFFT on a 2D image in double precision." | , |
| "" | [2D][double] ) |
Definition at line 330 of file testRealFFT.cpp.
References cmpTranslatedFFT(), testFFTScaling(), and testForwardBackwardFFT().
| TEST_CASE | ( | "Checking RealFFT on a 2D image in float precision." | , |
| "" | [2D][float] ) |
Definition at line 305 of file testRealFFT.cpp.
References cmpTranslatedFFT(), testFFTScaling(), and testForwardBackwardFFT().
| TEST_CASE | ( | "Checking RealFFT on a 2D image in long double precision." | , |
| "" | [2D][long double] ) |
Definition at line 355 of file testRealFFT.cpp.
References cmpTranslatedFFT(), testFFTScaling(), and testForwardBackwardFFT().
| TEST_CASE | ( | "Checking RealFFT on a 3D image in double precision." | , |
| "" | [3D][double] ) |
Definition at line 382 of file testRealFFT.cpp.
References cmpTranslatedFFT(), domain, DGtal::HyperRectDomain< TSpace >::lowerBound(), testFFTScaling(), and testForwardBackwardFFT().
| TEST_CASE | ( | "Checking RealFFT on a 4D image in double precision." | , |
| "" | [4D][double] ) |
Definition at line 422 of file testRealFFT.cpp.
References cmpTranslatedFFT(), domain, DGtal::HyperRectDomain< TSpace >::lowerBound(), testFFTScaling(), and testForwardBackwardFFT().
| void testFFTScaling | ( | ImageContainerBySTLVector< TDomain, TValue > const & | anImage | ) |
Tests spatial domain scaling.
| TDomain | Domain type. |
| TValue | Value type. |
| anImage | The image from which to take the domain. |
Definition at line 129 of file testRealFFT.cpp.
References DGtal::PointVector< 3, double >::base(), DGtal::PointVector< 3, double >::diagonal(), DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain(), DGtal::ImageContainerBySTLVector< TDomain, TValue >::extent(), findMaxNorm(), REQUIRE(), and DGtal::PointVector< 3, double >::zero.
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
| void testForwardBackwardFFT | ( | ImageContainerBySTLVector< TDomain, TValue > const & | anImage | ) |
Tests of forward FFT followed by a backward FFT.
| TDomain | Domain type. |
| TValue | Value type. |
| anImage | The image to transform. |
Definition at line 67 of file testRealFFT.cpp.
References CAPTURE(), DGtal::ImageContainerBySTLVector< TDomain, TValue >::domain(), and REQUIRE().
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().