18 #ifndef itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex_h
19 #define itkFrequencyShiftedFFTLayoutImageRegionConstIteratorWithIndex_h
114 template <
typename TImage>
176 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
178 freqInd[dim] = this->m_PositionIndex[dim] - this->m_ZeroFrequencyIndex[dim];
197 IndexType freqInd = this->GetFrequencyBin();
200 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
202 freq[dim] = this->m_FrequencyOrigin[dim] + this->m_FrequencySpacing[dim] * freqInd[dim];
213 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
215 w2 += w[dim] * w[dim];
226 itkGetConstReferenceMacro(ZeroFrequencyIndex,
IndexType);
229 itkGetConstReferenceMacro(FrequencyOrigin, FrequencyType);
237 itkGetConstReferenceMacro(FrequencySpacing, FrequencyType);
244 this->m_ActualXDimensionIsOdd = value;
246 itkGetMacro(ActualXDimensionIsOdd,
bool);
247 itkBooleanMacro(ActualXDimensionIsOdd);
257 SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize();
258 for (
unsigned int dim = 0; dim < ImageType::ImageDimension; ++dim)
260 this->m_ZeroFrequencyIndex[dim] =
261 static_cast<FrequencyValueType>(minIndex[dim] + std::floor(sizeImage[dim] / 2.0));
264 this->m_FrequencyOrigin[dim] = 0.0;
267 this->m_FrequencySpacing[dim] = 1.0 / (this->m_Image->GetSpacing()[dim] * sizeImage[dim]);