18 #ifndef itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex_h
19 #define itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex_h
114 template <
typename TImage>
174 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
176 freqInd[dim] = this->m_PositionIndex[dim] - this->m_ZeroFrequencyIndex[dim];
195 IndexType freqInd = this->GetFrequencyBin();
198 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
200 freq[dim] = this->m_FrequencyOrigin[dim] + this->m_FrequencySpacing[dim] * freqInd[dim];
211 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
213 w2 += w[dim] * w[dim];
224 itkGetConstReferenceMacro(ZeroFrequencyIndex,
IndexType);
227 itkGetConstReferenceMacro(FrequencyOrigin, FrequencyType);
235 itkGetConstReferenceMacro(FrequencySpacing, FrequencyType);
242 this->m_ActualXDimensionIsOdd = value;
244 itkGetMacro(ActualXDimensionIsOdd,
bool);
245 itkBooleanMacro(ActualXDimensionIsOdd);
255 SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize();
256 for (
unsigned int dim = 0; dim < ImageType::ImageDimension; ++dim)
258 this->m_ZeroFrequencyIndex[dim] =
259 static_cast<FrequencyValueType>(minIndex[dim] + std::floor(sizeImage[dim] / 2.0));
262 this->m_FrequencyOrigin[dim] = 0.0;
265 this->m_FrequencySpacing[dim] = 1.0 / (this->m_Image->GetSpacing()[dim] * sizeImage[dim]);