18#ifndef itkPhaseAnalysisImageFilter_h
19#define itkPhaseAnalysisImageFilter_h
63template <
typename TInputImage,
94 using SizeType =
typename InputImageRegionType::SizeType;
97 using FloatType =
typename InputImageType::SpacingValueType;
140 const unsigned int & nC = this->
GetInput()->GetNumberOfComponentsPerPixel();
143 for (
unsigned int r = 1; r < nC; r++)
145 out += inputPixel[r] * inputPixel[r];
154 return sqrt(inputPixel[0] * inputPixel[0] + featureAmpSquare);
160 return atan2(sqrt(featureAmpSquare), inputPixel[0]);
174 out[i] = atan2(inputPixel[i + 2] / fNorm, f1Unitary) + ((inputPixel[i + 2] >= 0) ? 0 :
itk::Math::pi);
180#ifndef ITK_MANUAL_INSTANTIATION
181# include "itkPhaseAnalysisImageFilter.hxx"
Simulate a standard C array with copy semantics.
Read-only ImageScanlineIterator: ImageScanlineConstIterator<TImage> behaves as ImageScanlineIterator<...
A multi-dimensional iterator templated over image type that walks a region of pixels,...
OutputImageType * GetOutput()
TOutputImage OutputImageType
TInputImage InputImageType
const InputImageType * GetInput() const
Templated n-dimensional image class.
Control indentation during Print() invocation.
PhaseAnalysisImageFilter Self
typename Superclass::InputImageType InputImageType
typename Superclass::OutputImageType OutputImageType
typename InputImageType::SpacingType SpacingType
typename itk::ImageScanlineIterator< OutputImageType > OutputImageRegionIterator
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::RegionType InputImageRegionType
OutputImagePixelType ComputeFeatureVectorNormSquare(const InputImagePixelType &inputPixel) const
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
typename InputImageType::Pointer InputImagePointer
void BeforeThreadedGenerateData() override
itk::FixedArray< OutputImagePixelType, ImageDimension - 1 > ComputePhaseOrientation(const InputImagePixelType &inputPixel, const OutputImagePixelType &featureAmpSquare) const
~PhaseAnalysisImageFilter() override=default
SpacingType DirectionType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
typename OutputImageType::Pointer OutputImagePointer
OutputImageType * GetOutputAmplitude()
typename InputImageRegionType::SizeType SizeType
OutputImagePixelType ComputePhase(const InputImagePixelType &inputPixel, const OutputImagePixelType &featureAmpSquare) const
PhaseAnalysisImageFilter()
const OutputImageType * GetOutputPhase() const
This ensure that PixelType is float||double, and not complex.
typename InputImageType::SpacingValueType FloatType
static constexpr unsigned int ImageDimension
typename OutputImageType::RegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
OutputImageType * GetOutputPhase()
ImageToImageFilter< TInputImage, TOutputImage > Superclass
typename itk::ImageScanlineConstIterator< InputImageType > InputImageRegionConstIterator
typename InputImageType::PixelType InputImagePixelType
typename OutputImageType::ConstPointer OutputImageConstPointer
OutputImagePixelType ComputeAmplitude(const InputImagePixelType &inputPixel, const OutputImagePixelType &featureAmpSquare) const
typename InputImageType::ConstPointer InputImageConstPointer
DataObject * GetPrimaryOutput()
Implements transparent reference counting.
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
TTarget itkDynamicCastInDebugMode(TSource x)