18#ifndef itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex_h
19#define itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex_h
114template <
typename TImage>
174 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
176 if (this->m_PositionIndex[dim] <= m_LargestPositiveFrequencyIndex[dim])
178 freqInd[dim] = this->m_PositionIndex[dim] - this->m_MinIndex[dim];
182 freqInd[dim] = this->m_PositionIndex[dim] - (this->m_MaxIndex[dim] + 1);
211 IndexType freqInd = this->GetFrequencyBin();
214 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
216 freq[dim] = this->m_FrequencyOrigin[dim] + this->m_FrequencySpacing[dim] * freqInd[dim];
227 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
229 w2 += w[dim] * w[dim];
243 itkGetConstReferenceMacro(LargestPositiveFrequencyIndex,
IndexType);
267 this->m_ActualXDimensionIsOdd = value;
269 itkGetMacro(ActualXDimensionIsOdd,
bool);
270 itkBooleanMacro(ActualXDimensionIsOdd);
280 SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize();
281 this->m_MinIndex = this->m_Image->GetLargestPossibleRegion().GetIndex();
282 this->m_MaxIndex = this->m_Image->GetLargestPossibleRegion().GetUpperIndex();
283 for (
unsigned int dim = 0; dim < ImageType::ImageDimension; ++dim)
285 this->m_LargestPositiveFrequencyIndex[dim] =
286 static_cast<FrequencyValueType>(this->m_MinIndex[dim] + std::floor(sizeImage[dim] / 2.0));
289 this->m_FrequencyOrigin[dim] = 0.0;
292 this->m_FrequencySpacing[dim] = 1.0 / (this->m_Image->GetSpacing()[dim] * sizeImage[dim]);
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
FrequencyValueType GetFrequencyModuloSquare() const
FrequencyFFTLayoutImageRegionConstIteratorWithIndex()
IndexType m_LargestPositiveFrequencyIndex
FrequencyFFTLayoutImageRegionConstIteratorWithIndex(const TImage *ptr, const RegionType ®ion)
IndexType GetFrequencyBin() const
FrequencyFFTLayoutImageRegionConstIteratorWithIndex(const Superclass &it)
typename ImageType::SpacingValueType FrequencyValueType
void SetActualXDimensionIsOdd(bool value)
FrequencyType m_FrequencySpacing
FrequencyType m_FrequencyOrigin
typename ImageType::SpacingType FrequencyType
FrequencyType GetFrequency() const
bool m_ActualXDimensionIsOdd
A base class for multi-dimensional iterators templated over image type that are designed to efficient...
typename TImage::AccessorType AccessorType
typename TImage::PixelType PixelType
typename TImage::RegionType RegionType
typename PixelContainer::Pointer PixelContainerPointer
typename TImage::OffsetType OffsetType
typename TImage::SizeType SizeType
typename TImage::IndexType IndexType
typename TImage::InternalPixelType InternalPixelType
typename TImage::PixelContainer PixelContainer
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....