18#ifndef itkSpectra1DImageFilter_h
19#define itkSpectra1DImageFilter_h
27#if ITK_VERSION_MAJOR >= 6
28# include "itk_pocketfft.h"
30# include "vnl/algo/vnl_fft_base.h"
31# include "vnl/algo/vnl_fft_1d.h"
36#include <unordered_map>
68template <
typename TInputImage,
typename TSupportWindowImage,
typename TOutputImage>
125#if ITK_VERSION_MAJOR >= 6
134 bwd_transform(vnl_vector<std::complex<ScalarType>> & signal)
const
136 const itk::detail::pocketfft::shape_t shape{
static_cast<std::size_t
>(m_Length) };
137 const itk::detail::pocketfft::stride_t stride{
static_cast<std::ptrdiff_t
>(
sizeof(std::complex<ScalarType>)) };
138 const itk::detail::pocketfft::shape_t axes{ 0 };
139 itk::detail::pocketfft::c2c(
140 shape, stride, stride, axes,
true, signal.data_block(), signal.data_block(),
ScalarType{ 1 });
175#ifndef ITK_MANUAL_INSTANTIATION
176# include "itkSpectra1DImageFilter.hxx"
typename PixelType::ComponentType ComponentType
Read-only ImageRegionIterator: ImageRegionConstIterator<TImage> behaves as ImageRegionIterator<const ...
Implements transparent reference counting.
std::list< SpectraLineType > SpectraLinesContainerType
std::pair< IndexType, SpectraVectorType > SpectraLineType
typename DefaultConvertPixelTraits< typename OutputImageType::PixelType >::ComponentType ScalarType
PerThreadDataContainerType m_PerThreadDataContainer
~Spectra1DImageFilter() override=default
TOutputImage OutputImageType
TInputImage InputImageType
itkSetInputMacro(SupportWindowImage, SupportWindowImageType)
itkGetInputMacro(SupportWindowImage, SupportWindowImageType)
std::unordered_map< FFT1DSizeType, SpectraVectorType > LineWindowMapType
vnl_fft_1d< ScalarType > FFT1DType
Spectra1DImageFilter Self
Spectra1DSupportWindowImageFilter< InputImageType > Spectra1DSupportWindowFilterType
void VerifyInputInformation() const override
Verifies that the input images occupy the same physical space and the each index is at the same physi...
OutputImageType::Pointer m_ReferenceSpectraImage
static void AddLineWindow(FFT1DSizeType length, LineWindowMapType &lineWindowMap)
itkGetInputMacro(ReferenceSpectraImage, OutputImageType)
typename SupportWindowImageType::PixelType SupportWindowType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
ImageRegionConstIterator< InputImageType > InputImageIteratorType
typename InputImageType::IndexType IndexType
itkSetInputMacro(ReferenceSpectraImage, OutputImageType)
std::vector< ScalarType > SpectraVectorType
void BeforeThreadedGenerateData() override
vnl_vector< ComplexType > ComplexVectorType
std::vector< PerThreadData > PerThreadDataContainerType
ImageToImageFilter< InputImageType, OutputImageType > Superclass
void GenerateOutputInformation() override
std::complex< ScalarType > ComplexType
SmartPointer< const Self > ConstPointer
typename Spectra1DSupportWindowFilterType::FFT1DSizeType FFT1DSizeType
void ComputeSpectra(const IndexType &lineIndex, ThreadIdType threadId, SpectraLineType &spectraLine)
SmartPointer< Self > Pointer
static constexpr unsigned int ImageDimension
TSupportWindowImage SupportWindowImageType
typename OutputImageType::RegionType OutputImageRegionType
Generate an image of local spectra computation support windows.
unsigned int FFT1DSizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
unsigned int ThreadIdType
LineWindowMapType LineWindowMap
ComplexVectorType ComplexVector
InputImageType::SizeType LineImageRegionSize
SpectraVectorType SpectraVector