18#ifndef itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex_h
19#define itkFrequencyFFTLayoutImageRegionConstIteratorWithIndex_h
114template <
typename TImage>
176 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
178 if (this->m_PositionIndex[dim] <= m_LargestPositiveFrequencyIndex[dim])
180 freqInd[dim] = this->m_PositionIndex[dim] - this->m_MinIndex[dim];
184 freqInd[dim] = this->m_PositionIndex[dim] - (this->m_MaxIndex[dim] + 1);
213 IndexType freqInd = this->GetFrequencyBin();
216 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
218 freq[dim] = this->m_FrequencyOrigin[dim] + this->m_FrequencySpacing[dim] * freqInd[dim];
229 for (
unsigned int dim = 0; dim < TImage::ImageDimension; ++dim)
231 w2 += w[dim] * w[dim];
245 itkGetConstReferenceMacro(LargestPositiveFrequencyIndex,
IndexType);
269 this->m_ActualXDimensionIsOdd = value;
271 itkGetMacro(ActualXDimensionIsOdd,
bool);
272 itkBooleanMacro(ActualXDimensionIsOdd);
282 SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize();
283 this->m_MinIndex = this->m_Image->GetLargestPossibleRegion().GetIndex();
284 this->m_MaxIndex = this->m_Image->GetLargestPossibleRegion().GetUpperIndex();
285 for (
unsigned int dim = 0; dim < ImageType::ImageDimension; ++dim)
287 this->m_LargestPositiveFrequencyIndex[dim] =
288 static_cast<FrequencyValueType>(this->m_MinIndex[dim] + std::floor(sizeImage[dim] / 2.0));
291 this->m_FrequencyOrigin[dim] = 0.0;
294 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....