DGtal  0.9.3beta
Public Types | Public Member Functions | Data Fields | Static Public Attributes | Private Types | Private Attributes
DGtal::RealFFT< HyperRectDomain< TSpace >, T > Class Template Reference

#include <DGtal/math/RealFFT.h>

Collaboration diagram for DGtal::RealFFT< HyperRectDomain< TSpace >, T >:
[legend]

Public Types

using Space = TSpace
 
using Real = T
 
using Domain = HyperRectDomain< Space >
 
using Point = typename Space::Point
 
using RealPoint = PointVector< Space::dimension, Real >
 
using Dimension = typename Space::Dimension
 
using Complex = std::complex< Real >
 
using Self = RealFFT< Domain, T >
 
using SpatialImage = ArrayImageAdapter< Real *, Domain >
 
using ConstSpatialImage = ArrayImageAdapter< const Real *, Domain >
 
using FreqImage = ArrayImageAdapter< Complex *, Domain >
 
using ConstFreqImage = ArrayImageAdapter< const Complex *, Domain >
 

Public Member Functions

 RealFFT (Domain const &aDomain)
 
 RealFFT (Domain const &aDomain, RealPoint const &aLowerBound, RealPoint const &anExtent)
 
 RealFFT (Self const &)=delete
 
 RealFFT (Self &&)=delete
 
Selfoperator= (Self const &)=delete
 
Selfoperator= (Self &&)=delete
 
 ~RealFFT ()
 
Spatial domain services.
std::size_t getPadding () const noexcept
 
RealgetSpatialStorage () noexcept
 
const RealgetSpatialStorage () const noexcept
 
SpatialImage getSpatialImage () noexcept
 
ConstSpatialImage getSpatialImage () const noexcept
 
Domain const & getSpatialDomain () const noexcept
 
Point const & getSpatialExtent () const noexcept
 
Frequency domain services.
ComplexgetFreqStorage () noexcept
 
const ComplexgetFreqStorage () const noexcept
 
FreqImage getFreqImage () noexcept
 
ConstFreqImage getFreqImage () const noexcept
 
Domain const & getFreqDomain () const noexcept
 
Point const & getFreqExtent () const noexcept
 
Fast Fourier Transformations.
void createPlan (unsigned flags, int way)
 
void doFFT (unsigned flags=FFTW_ESTIMATE, int way=FFTW_FORWARD, bool normalized=false)
 
void forwardFFT (unsigned flags=FFTW_ESTIMATE)
 
void backwardFFT (unsigned flags=FFTW_ESTIMATE, bool normalized=true)
 
Spatial scaling definitions.
RealPoint getScaledSpatialExtent () const noexcept
 
void setScaledSpatialExtent (RealPoint const &anExtent) noexcept
 
RealPoint getScaledSpatialLowerBound () const noexcept
 
void setScaledSpatialLowerBound (RealPoint const &aPoint) noexcept
 
Scaling calculators.
RealPoint calcScaledSpatialCoords (Point const &aPoint) const noexcept
 
RealPoint calcScaledFreqCoords (Point const &aPoint) const noexcept
 
Complex calcScaledFreqValue (RealPoint const &aScaledPoint, Complex const &aValue) const noexcept
 
Point calcNativeSpatialCoords (RealPoint const &aScaledPoint) const noexcept
 
Point calcNativeFreqCoords (RealPoint const &aScaledPoint, bool &applyConj) const noexcept
 
Complex calcNativeFreqValue (RealPoint const &aScaledPoint, Complex const &aScaledValue) const noexcept
 
Scaled accessors.
Real getScaledSpatialValue (RealPoint const &aScaledPoint) const noexcept
 
void setScaledSpatialValue (RealPoint const &aScaledPoint, Real aValue) noexcept
 
Complex getScaledFreqValue (RealPoint const &aScaledPoint) const noexcept
 
void setScaledFreqValue (RealPoint const &aScaledPoint, Complex aScaledValue) noexcept
 
DGtal services.
bool isValid () const noexcept
 
void selfDisplay (std::ostream &out) const
 

Data Fields

const Real pi = boost::math::constants::pi<Real>()
 

Static Public Attributes

static const constexpr Dimension dimension = Domain::dimension
 

Private Types

using FFTW = detail::FFTWWrapper< T >
 

Private Attributes

const Domain mySpatialDomain
 
const Point mySpatialExtent
 
const Point myFreqExtent
 
const Domain myFreqDomain
 
const Domain myFullSpatialDomain
 
void * myStorage
 
RealPoint myScaledSpatialExtent
 
RealPoint myScaledSpatialLowerBound
 
Real myScaledFreqMag
 

Detailed Description

template<typename TSpace, typename T>
class DGtal::RealFFT< HyperRectDomain< TSpace >, T >

Real-complex backward and forward Fast Fourier Transform over HyperRectDomain.

Template Parameters
TSpaceType of the space.
TValues type.

Definition at line 217 of file RealFFT.h.

Member Typedef Documentation

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Complex = std::complex<Real>

Complex value type.

Definition at line 230 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::ConstFreqImage = ArrayImageAdapter< const Complex*, Domain >

Constant frequency image type.

Definition at line 236 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::ConstSpatialImage = ArrayImageAdapter< const Real*, Domain >

Constant spatial image type.

Definition at line 234 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Dimension = typename Space::Dimension

Space dimension type.

Definition at line 229 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Domain = HyperRectDomain<Space>

Domain type.

Definition at line 226 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::FFTW = detail::FFTWWrapper<T>
private

Definition at line 220 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::FreqImage = ArrayImageAdapter< Complex*, Domain >

Mutable frequency image type.

Definition at line 235 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Point = typename Space::Point

Point type.

Definition at line 227 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Real = T

Real value type.

Definition at line 225 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::RealPoint = PointVector<Space::dimension, Real>

Real point type.

Definition at line 228 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Self = RealFFT< Domain, T >

Self type.

Definition at line 231 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::Space = TSpace

Space type.

Definition at line 224 of file RealFFT.h.

template<typename TSpace , typename T >
using DGtal::RealFFT< HyperRectDomain< TSpace >, T >::SpatialImage = ArrayImageAdapter< Real*, Domain >

Mutable spatial image type.

Definition at line 233 of file RealFFT.h.

Constructor & Destructor Documentation

template<typename TSpace , typename T >
DGtal::RealFFT< HyperRectDomain< TSpace >, T >::RealFFT ( Domain const &  aDomain)

Constructor from the spatial domain.

Parameters
aDomainThe domain over which the transform will be performed.

The scaled lower bound and extent is initialized from the given domain.

Note
The data storage (spatial or frequency image) is not zeroed at RealFFT construction.
template<typename TSpace , typename T >
DGtal::RealFFT< HyperRectDomain< TSpace >, T >::RealFFT ( Domain const &  aDomain,
RealPoint const &  aLowerBound,
RealPoint const &  anExtent 
)

Constructor from the spatial domain and scaled lower bound and extent.

Parameters
aDomainThe domain over which the transform will be performed.
aLowerBoundThe lower bound of the scaled spatial domain.
anExtentThe extent of the scaled spatial domain.
Note
The data storage (spatial or frequency image) is not zeroed at RealFFT construction.
template<typename TSpace , typename T >
DGtal::RealFFT< HyperRectDomain< TSpace >, T >::RealFFT ( Self const &  )
delete

Copy constructor. Deleted.

template<typename TSpace , typename T >
DGtal::RealFFT< HyperRectDomain< TSpace >, T >::RealFFT ( Self &&  )
delete

Move constructor. Deleted.

template<typename TSpace , typename T >
DGtal::RealFFT< HyperRectDomain< TSpace >, T >::~RealFFT ( )

Destructor.

Member Function Documentation

template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::backwardFFT ( unsigned  flags = FFTW_ESTIMATE,
bool  normalized = true 
)

In-place backward FFT transformation (frequential -> spatial)

The transformation is done as if the lower bound of the spatial domain is the origin but with the same extent as the domain given at construction. See the scaling services provided by this class in order to take into account a different lower bound or extent.

Parameters
flagsPlanner flags.
See also
http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags
Parameters
normalizedWhen applying the backward transformation, if normalized is true, then the transformation is normalized (all values are divided by the size of the domain). Otherwise, applying a forward transformation followed by a backward transformation will multiply the input by the size of the spatial domain (see http://www.fftw.org/fftw3_doc/The-1d-Real_002ddata-DFT.html#The-1d-Real_002ddata-DFT).
Note
If the transformation result will be afterward modified or copied in an another image, prefer set normalized to false and postpone the normalization.
For planner other than FFTW_ESTIMATE and if not plan has been generated before, a temporary image will be allocated in order to find an optimal transformation plan.
Warning
Since this class uses an in-place algorithm, the frequency image will be overwriten during the transformation.
template<typename TSpace , typename T >
Point DGtal::RealFFT< HyperRectDomain< TSpace >, T >::calcNativeFreqCoords ( RealPoint const &  aScaledPoint,
bool &  applyConj 
) const
noexcept

From the scaled frequency coordinates, calculates the nearest corresponding coordinates in the native frequency image.

Since the frequency image's domain is half the size of the spatial domain due to the hermitian symmetry, if the given point lies into the stripped part, then the given parameter applyConj is set to true to indicate that the frequency image value at the returned coordinates must be conjugate.

Parameters
aScaledPointCoordinates in the scaled domain of the frequency image.
[out]applyConjSet to true if you must take the conjugate of the frequency image value at the returned coordinates.
Returns
integer coordinates lying into the frequency image returned by getFreqImage().
See also
calcScaledFreqCoords()
template<typename TSpace , typename T >
Complex DGtal::RealFFT< HyperRectDomain< TSpace >, T >::calcNativeFreqValue ( RealPoint const &  aScaledPoint,
Complex const &  aScaledValue 
) const
noexcept

From a complex value of the scaled frequency image, calculates the corresponding value (undoing scaling and rotation) in the native frequency image.

Parameters
aScaledPointCoordinates in the scaled domain of the frequency image.
aScaledValueComplex value from the scaled frequency image.
Returns
corresponding complex value from the native frequency image.
See also
calcScaledFreqValue()
template<typename TSpace , typename T >
Point DGtal::RealFFT< HyperRectDomain< TSpace >, T >::calcNativeSpatialCoords ( RealPoint const &  aScaledPoint) const
noexcept

From the scaled spatial coordinates, calculates the nearest corresponding coordinates in the native spatial image.

Parameters
aScaledPointCoordinates in the scaled domain of the spatial image.
Returns
integer coordinates lying into the spatial image returned by getSpatialImage().
See also
calcScaledSpatialCoords()
template<typename TSpace , typename T >
RealPoint DGtal::RealFFT< HyperRectDomain< TSpace >, T >::calcScaledFreqCoords ( Point const &  aPoint) const
noexcept

Scales coordinates from the frequency image taking into account the extent and lower bound of the scaled spatial domain.

Along each dimension, the first half of the space is composed of positive frequencies and the second half maps to the negative frequencies.

Parameters
aPointCoordinates in the domain of the frequency image.
Returns
Corresponding coordinates (the frequencies) in the scaled frequency domain.
See also
http://www.fftw.org/fftw3_doc/The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#The-1d-Discrete-Fourier-Transform-_0028DFT_0029
calcNativeFreqCoords()
template<typename TSpace , typename T >
Complex DGtal::RealFFT< HyperRectDomain< TSpace >, T >::calcScaledFreqValue ( RealPoint const &  aScaledPoint,
Complex const &  aValue 
) const
noexcept

Scales and rotates a complex value from the frequency image taking into account the extent and lower bound of the scaled spatial domain.

Parameters
aScaledPointCoordinates in the scaled domain of the frequency image.
aValueComplex value from the frequency image.
Returns
corresponding complex value from the scaled frequency image.
Note
Prefer translating data in the spatial space instead of using this method.
See also
calcNativeFreqValue()
template<typename TSpace , typename T >
RealPoint DGtal::RealFFT< HyperRectDomain< TSpace >, T >::calcScaledSpatialCoords ( Point const &  aPoint) const
noexcept

Scales coordinates from the spatial image taking into account the extent and lower bound of the scaled spatial domain.

Parameters
aPointCoordinates in the domain of the spatial image.
Returns
Corresponding coordinates in the scaled spatial domain.
See also
calcNativeSpatialCoords().
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::createPlan ( unsigned  flags,
int  way 
)

Creates a transformation plan for the specified transformation direction.

Parameters
flagsPlanner flags (see http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags).
wayThe direction of the transformation: FFTW_FORWARD for real->complex, FFTW_BACKWARD for complex->real.

The created plan is immediately destroyed but the associated wisdom is keeped by FFTW3, so that future creation of similar plan (same image dimension, size and precision, same number of process, same flags and way) will be costless.

It is only usefull when using a plan flag other than FFTW_ESTIMATE, when the allocation of a temporary image is not wanted and when the spatial or frequency image has not been already initialized. Otherwise, consider using doFFT(), forwardFFT() or backwardFFT() directly.

Warning
For planners other than FFTW_ESTIMATE and if no plan has been generated before, the spatial and frequency image will be overwriten. See doFFT(), forwardFFT() or backwardFFT() if it is not the wanted behavior.
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::doFFT ( unsigned  flags = FFTW_ESTIMATE,
int  way = FFTW_FORWARD,
bool  normalized = false 
)

In-place Fast Fourier Transformation.

The transformation is done as if the lower bound of the spatial domain is the origin but with the same extent as the domain given at construction. See the scaling services provided by this class in order to take into account a different lower bound or extent.

Parameters
flagsPlanner flags (see http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags).
wayThe direction of the transformation: FFTW_FORWARD for real->complex,FFTW_BACKWARD for complex->real.
normalizedWhen applying the backward transformation, if normalized is true, then the transformation is normalized (all values are divided by the size of the domain). Otherwise, applying a forward transformation followed by a backward transformation will multiply the input by the size of the spatial domain (see http://www.fftw.org/fftw3_doc/The-1d-Real_002ddata-DFT.html#The-1d-Real_002ddata-DFT).
Note
For planner other than FFTW_ESTIMATE and if no plan has been generated before, a temporary image will be allocated in order to find an optimal transformation plan without modifiying the user data. See createPlan() if you want to avoid this extra-memory cost.
Warning
Since this class uses an in-place algorithm, if way is equal to FFTW_FORWARD then the spatial image will be overwriten, and if way is equal to FFTW_BACKWARD then the frequency image will be overwriten.
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::forwardFFT ( unsigned  flags = FFTW_ESTIMATE)

In-place forward FFT transformation (spatial -> frequential)

The transformation is done as if the lower bound of the spatial domain is the origin but with the same extent as the domain given at construction. See the scaling services provided by this class in order to take into account a different lower bound or extent.

Parameters
flagsPlanner flags.
See also
http://www.fftw.org/fftw3_doc/Planner-Flags.html#Planner-Flags
Note
For planner other than FFTW_ESTIMATE and if not plan has been generated before, a temporary image will be allocated in order to find an optimal transformation plan.
Warning
Since this class uses an in-place algorithm, the spatial image will be overwriten during the transformation.
template<typename TSpace , typename T >
Domain const& DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getFreqDomain ( ) const
noexcept

Gets the frequency domain.

Warning
The frequency image's domain is smaller (about the half-size) of the spatial image's domain (see http://www.fftw.org/fftw3_doc/Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data).
template<typename TSpace , typename T >
Point const& DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getFreqExtent ( ) const
noexcept

Gets the frequency domain extent.

Warning
The frequency image's domain is smaller (about the half-size) of the spatial image's domain (see http://www.fftw.org/fftw3_doc/Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data).
template<typename TSpace , typename T >
FreqImage DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getFreqImage ( )
noexcept

Gets frequential image.

Returns
a CImage or a CConstImage model on the frequency data.
Warning
The frequency image is not zeroed during RealFFT construction.
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
The frequency image's domain is smaller (about the half-size) of the spatial image's domain (see http://www.fftw.org/fftw3_doc/Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data).
See also
ArrayImageAdapter
template<typename TSpace , typename T >
ConstFreqImage DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getFreqImage ( ) const
noexcept

Gets frequential image.

Returns
a CImage or a CConstImage model on the frequency data.
Warning
The frequency image is not zeroed during RealFFT construction.
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
The frequency image's domain is smaller (about the half-size) of the spatial image's domain (see http://www.fftw.org/fftw3_doc/Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data).
See also
ArrayImageAdapter
template<typename TSpace , typename T >
Complex* DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getFreqStorage ( )
noexcept

Gets frequential raw storage.

Warning
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
template<typename TSpace , typename T >
const Complex* DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getFreqStorage ( ) const
noexcept

Gets frequential raw storage.

Warning
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
template<typename TSpace , typename T >
std::size_t DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getPadding ( ) const
noexcept

Padding used with real datas.

Returns
the number of real values used as padding along the last dimension.
See also
http://www.fftw.org/doc/Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data
template<typename TSpace , typename T >
Complex DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getScaledFreqValue ( RealPoint const &  aScaledPoint) const
inlinenoexcept

Reads a scaled frequency value at the nearest native coordinates corresponding to the given scaled frequency coordinates.

Parameters
aScaledPointCoordinates in the scaled domain of the frequency image.
Returns
scaled value from the native frequency image taken at the nearest corresponding coordinates.

Definition at line 640 of file RealFFT.h.

641  {
642  bool apply_conj;
643  const auto aPoint = calcNativeFreqCoords( aScaledPoint, apply_conj );
644  const Complex aScaledValue = calcScaledFreqValue( aScaledPoint, getFreqImage()( aPoint ) );
645  return apply_conj ? std::conj( aScaledValue ) : aScaledValue;
646  }
std::complex< Real > Complex
Complex value type.
Definition: RealFFT.h:230
Complex calcScaledFreqValue(RealPoint const &aScaledPoint, Complex const &aValue) const noexcept
Point calcNativeFreqCoords(RealPoint const &aScaledPoint, bool &applyConj) const noexcept
template<typename TSpace , typename T >
RealPoint DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getScaledSpatialExtent ( ) const
noexcept

Gets the extent of the scaled spatial domain.

template<typename TSpace , typename T >
RealPoint DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getScaledSpatialLowerBound ( ) const
noexcept

Gets the lower bound of the scaled spatial domain.

template<typename TSpace , typename T >
Real DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getScaledSpatialValue ( RealPoint const &  aScaledPoint) const
inlinenoexcept

Reads a spatial value at the nearest native coordinates corresponding to the given scaled spatial coordinates.

Parameters
aScaledPointCoordinates in the scaled domain of the spatial image.
Returns
value from the native spatial image taken at the nearest corresponding coordinates.

Definition at line 612 of file RealFFT.h.

613  {
614  return getSpatialImage()( getNativeSpatialCoords( aScaledPoint ) );
615  }
template<typename TSpace , typename T >
Domain const& DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getSpatialDomain ( ) const
noexcept

Gets the spatial domain.

template<typename TSpace , typename T >
Point const& DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getSpatialExtent ( ) const
noexcept

Gets the spatial domain extent.

template<typename TSpace , typename T >
SpatialImage DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getSpatialImage ( )
noexcept

Gets the spatial image.

Returns
a CImage or a CConstImage model on the spatial data.
Warning
The spatial image is not zeroed during RealFFT construction.
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
See also
ArrayImageAdapter
template<typename TSpace , typename T >
ConstSpatialImage DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getSpatialImage ( ) const
noexcept

Gets the spatial image.

Returns
a CImage or a CConstImage model on the spatial data.
Warning
The spatial image is not zeroed during RealFFT construction.
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
See also
ArrayImageAdapter
template<typename TSpace , typename T >
Real* DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getSpatialStorage ( )
noexcept

Gets spatial raw storage.

Warning
There is a padding at the end of the first dimension (see getPadding()).
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
template<typename TSpace , typename T >
const Real* DGtal::RealFFT< HyperRectDomain< TSpace >, T >::getSpatialStorage ( ) const
noexcept

Gets spatial raw storage.

Warning
There is a padding at the end of the first dimension (see getPadding()).
Remember that the spatial and frequency image share the same memory location. Therefore, modifying one image erases the data from the other image.
template<typename TSpace , typename T >
bool DGtal::RealFFT< HyperRectDomain< TSpace >, T >::isValid ( ) const
noexcept

Checks if storage is valid.

Returns
true if there is an allocated storage, false otherwise.
template<typename TSpace , typename T >
Self& DGtal::RealFFT< HyperRectDomain< TSpace >, T >::operator= ( Self const &  )
delete

Copy assignment operator. Deleted.

template<typename TSpace , typename T >
Self& DGtal::RealFFT< HyperRectDomain< TSpace >, T >::operator= ( Self &&  )
delete

Move assignment operator. Deleted.

template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::setScaledFreqValue ( RealPoint const &  aScaledPoint,
Complex  aScaledValue 
)
inlinenoexcept

Writes a scaled frequency value at the nearest native coordinates corresponding to the given scaled frequency coordinates.

Parameters
aScaledPointCoordinates in the scaled domain of the frequency image.
aScaledValueScaled value to set in the native frequency image at the nearest corresponding coordinates.

Definition at line 656 of file RealFFT.h.

657  {
658  bool apply_conj;
659  const auto aPoint = calcNativeFreqCoords( aScaledPoint, apply_conj );
660  const Complex aValue = calcNativeFreqValue( aScaledPoint, aScaledValue );
661 
662  if ( apply_conj )
663  getFreqImage().setValue( aPoint, std::conj( aValue ) );
664  else
665  getFreqImage().setValue( aPoint, aValue );
666  }
std::complex< Real > Complex
Complex value type.
Definition: RealFFT.h:230
Complex calcNativeFreqValue(RealPoint const &aScaledPoint, Complex const &aScaledValue) const noexcept
Point calcNativeFreqCoords(RealPoint const &aScaledPoint, bool &applyConj) const noexcept
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::setScaledSpatialExtent ( RealPoint const &  anExtent)
noexcept

Sets the extent of the scaled spatial domain.

Parameters
anExtentThe extent.
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::setScaledSpatialLowerBound ( RealPoint const &  aPoint)
noexcept

Sets the lower bound of the scaled spatial domain.

Parameters
aPointThe lower bound.
template<typename TSpace , typename T >
void DGtal::RealFFT< HyperRectDomain< TSpace >, T >::setScaledSpatialValue ( RealPoint const &  aScaledPoint,
Real  aValue 
)
inlinenoexcept

Writes a spatial value at the nearest native coordinates corresponding to the given scaled spatial coordinates.

Parameters
aScaledPointCoordinates in the scaled domain of the spatial image.
aValueValue to set in the native spatial image at the nearest corresponding coordinates.

Definition at line 624 of file RealFFT.h.

625  {
626  getSpatialImage().setValue( getNativeSpatialCoords( aScaledPoint ), aValue );
627  }

Field Documentation

template<typename TSpace , typename T >
const constexpr Dimension DGtal::RealFFT< HyperRectDomain< TSpace >, T >::dimension = Domain::dimension
static

Space dimension.

Definition at line 238 of file RealFFT.h.

template<typename TSpace , typename T >
const Domain DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myFreqDomain
private

Frequential domain (complex).

Definition at line 697 of file RealFFT.h.

template<typename TSpace , typename T >
const Point DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myFreqExtent
private

Extent of the frequential domain.

Definition at line 696 of file RealFFT.h.

template<typename TSpace , typename T >
const Domain DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myFullSpatialDomain
private

Full spatial domain (real) including the padding.

Definition at line 698 of file RealFFT.h.

template<typename TSpace , typename T >
Real DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myScaledFreqMag
private

Magnitude ratio for the scaled frequency values.

Definition at line 702 of file RealFFT.h.

template<typename TSpace , typename T >
RealPoint DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myScaledSpatialExtent
private

Extent of the scaled spatial domain.

Definition at line 700 of file RealFFT.h.

template<typename TSpace , typename T >
RealPoint DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myScaledSpatialLowerBound
private

Lower bound of the scaled spatial domain.

Definition at line 701 of file RealFFT.h.

template<typename TSpace , typename T >
const Domain DGtal::RealFFT< HyperRectDomain< TSpace >, T >::mySpatialDomain
private

Spatial domain (real).

Definition at line 694 of file RealFFT.h.

template<typename TSpace , typename T >
const Point DGtal::RealFFT< HyperRectDomain< TSpace >, T >::mySpatialExtent
private

Extent of the spatial domain.

Definition at line 695 of file RealFFT.h.

template<typename TSpace , typename T >
void* DGtal::RealFFT< HyperRectDomain< TSpace >, T >::myStorage
private

Storage.

Definition at line 699 of file RealFFT.h.

template<typename TSpace , typename T >
const Real DGtal::RealFFT< HyperRectDomain< TSpace >, T >::pi = boost::math::constants::pi<Real>()

Pi.

Definition at line 690 of file RealFFT.h.


The documentation for this class was generated from the following file: