29 #ifndef itkSpectra1DImageFilter_h 30 #define itkSpectra1DImageFilter_h 32 #include "itkImageToImageFilter.h" 33 #include "itkDefaultConvertPixelTraits.h" 34 #include "itkImageRegionConstIterator.h" 36 #include "vnl/algo/vnl_fft_base.h" 37 #include "vnl/algo/vnl_fft_1d.h" 57 template<
typename TInputImage,
typename TSupportWindowImage,
typename TOutputImage >
59 public ImageToImageFilter< TInputImage,
69 typedef typename DefaultConvertPixelTraits< typename OutputImageType::PixelType >::ComponentType
74 typedef ImageToImageFilter< InputImageType, OutputImageType >
Superclass;
94 virtual void ThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE;
98 void operator=(
const Self & );
100 typedef vcl_complex< ScalarType > ComplexType;
101 typedef vnl_vector< ComplexType > ComplexVectorType;
102 typedef vnl_vector< ScalarType > SpectraVectorType;
103 typedef typename InputImageType::IndexType IndexType;
104 typedef std::pair< IndexType, SpectraVectorType > SpectraLineType;
105 typedef std::deque< SpectraLineType > SpectraLinesContainerType;
106 typedef typename SupportWindowImageType::PixelType SupportWindowType;
107 typedef ImageRegionConstIterator< InputImageType > InputImageIteratorType;
108 typedef vnl_fft_1d< ScalarType > FFT1DType;
113 typedef std::map< FFT1DSizeType, SpectraVectorType > LineWindowMapType;
117 ComplexVectorType ComplexVector;
118 SpectraVectorType SpectraVector;
119 typename InputImageType::SizeType LineImageRegionSize;
120 LineWindowMapType LineWindowMap;
122 typedef std::vector< PerThreadData > PerThreadDataContainerType;
123 PerThreadDataContainerType m_PerThreadDataContainer;
125 SpectraLineType ComputeSpectra(
const IndexType & lineIndex, ThreadIdType threadId );
126 void AddLineWindow( FFT1DSizeType length, LineWindowMapType & lineWindowMap );
131 #ifndef ITK_MANUAL_INSTANTIATION 132 #include "itkSpectra1DImageFilter.hxx" 135 #endif // itkSpectra1DImageFilter_h unsigned int FFT1DSizeType
itkSetInputMacro(SupportWindowImage, SupportWindowImageType)
OutputImageType::RegionType OutputImageRegionType
virtual void GenerateOutputInformation() ITK_OVERRIDE
SmartPointer< const Self > ConstPointer
Spectra1DImageFilter Self
DefaultConvertPixelTraits< typename OutputImageType::PixelType >::ComponentType ScalarType
Generate an image of local spectra computation support windows.
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE
TOutputImage OutputImageType
SmartPointer< Self > Pointer
ImageToImageFilter< InputImageType, OutputImageType > Superclass
TInputImage InputImageType
virtual void BeforeThreadedGenerateData() ITK_OVERRIDE
TSupportWindowImage SupportWindowImageType
virtual ~Spectra1DImageFilter()
itkGetInputMacro(SupportWindowImage, SupportWindowImageType)
Generate an image of local spectra.