#include <itkPhaseAnalysisImageFilter.h>
Base class for phase analysis filters. The output represents the phase of some image. The input is a VectorImage where first component is the original. The phase value can be defined in multiple ways but it always represents local structural information. Other outputs might be the amplitude or the orientation. Doing phase analysis usually involves having an original image \(I\), and a vector \(\mathbf{F} = (f_1, ..., f_N)\) storing the results of applying some directional or feature filters to \(I\) For example, F can be directional derivatives, Riesz filter, a feature filter at different angles, etc. There is some freedom to define the phase of a pixel, but usually involves a ratio between the amplitudes of \(I\) and the vector \(F\). This class uses: Amplitude:
\[ A(\mathbf{x_0})= \sqrt{I(\mathbf{x_0})^2 + A_F(\mathbf{x_0})^2 } \]
\[ A_F(\mathbf{x_0})= \sqrt{\sum_{i=1}^N f_i(\mathbf{x_0})^2} \]
Phase:
\[ P(\mathbf{x_0})= \text{atan2}(A_F(\mathbf{x_0}),A(\mathbf{x_0})) \]
Orientation:
\begin{align*} O_j(\mathbf{x_0})&= \text{atan2}(\hat{f_j}(\mathbf{x_0}),\hat{f_1}(\mathbf{x_0}))\\ &\text{where } \hat{f_i} = f_i / A_F \end{align*}
Definition at line 65 of file itkPhaseAnalysisImageFilter.h.
Inheritance diagram for itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >:
Collaboration diagram for itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >:Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
| static double | GetGlobalDefaultCoordinateTolerance () |
| static double | GetGlobalDefaultDirectionTolerance () |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
| static bool | GetGlobalWarningDisplay () |
| static void | GlobalWarningDisplayOff () |
| static void | GlobalWarningDisplayOn () |
| static Pointer | New () |
| static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
| static void | BreakOnError () |
| static Pointer | New () |
Static Public Attributes | |
| static constexpr unsigned int | ImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
| static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
| static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
| static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
| using | InputToOutputRegionCopierType |
| using | OutputToInputRegionCopierType |
Static Protected Member Functions inherited from itk::ImageSource< TOutputImage > | |
| static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
| static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
| template<typename TSourceObject> | |
| static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
| static constexpr float | progressFixedToFloat (uint32_t fixed) |
| static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::ImageSource< TOutputImage > | |
| bool | m_DynamicMultiThreading { true } |
Protected Attributes inherited from itk::ProcessObject | |
| TimeStamp | m_OutputInformationMTime {} |
| bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
| std::atomic< int > | m_ReferenceCount {} |
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 74 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::DirectionType = SpacingType |
Definition at line 96 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::FloatType = typename InputImageType::SpacingValueType |
Definition at line 97 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::InputImageConstPointer = typename InputImageType::ConstPointer |
Definition at line 90 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::InputImagePixelType = typename InputImageType::PixelType |
Definition at line 92 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::InputImagePointer = typename InputImageType::Pointer |
Definition at line 89 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::InputImageRegionConstIterator = typename itk::ImageScanlineConstIterator<InputImageType> |
Definition at line 104 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::InputImageRegionType = typename InputImageType::RegionType |
Definition at line 91 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::InputImageType = typename Superclass::InputImageType |
Some convenient type alias.
Definition at line 86 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::OutputImageConstPointer = typename OutputImageType::ConstPointer |
Definition at line 100 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::OutputImagePixelType = typename OutputImageType::PixelType |
Definition at line 103 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 99 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::OutputImageRegionIterator = typename itk::ImageScanlineIterator<OutputImageType> |
Definition at line 102 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::OutputImageRegionType = typename OutputImageType::RegionType |
Definition at line 101 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::OutputImageType = typename Superclass::OutputImageType |
Definition at line 87 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 73 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::Self = PhaseAnalysisImageFilter |
Standard class type alias.
Definition at line 71 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::SizeType = typename InputImageRegionType::SizeType |
Definition at line 94 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::SpacingType = typename InputImageType::SpacingType |
Definition at line 93 of file itkPhaseAnalysisImageFilter.h.
| using itk::PhaseAnalysisImageFilter< TInputImage, TOutputImage >::Superclass = ImageToImageFilter<TInputImage, TOutputImage> |
Definition at line 72 of file itkPhaseAnalysisImageFilter.h.
|
protected |
|
overrideprotecteddefault |
|
overrideprotectedvirtual |
If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.
Reimplemented from itk::ImageSource< TOutputImage >.
|
inlineprotected |
Definition at line 152 of file itkPhaseAnalysisImageFilter.h.
|
inlineprotected |
Definition at line 138 of file itkPhaseAnalysisImageFilter.h.
|
inlineprotected |
Definition at line 158 of file itkPhaseAnalysisImageFilter.h.
|
inlineprotected |
Definition at line 164 of file itkPhaseAnalysisImageFilter.h.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
Reimplemented in itk::PhaseAnalysisSoftThresholdImageFilter< TInputImage, TOutputImage >, itk::PhaseAnalysisSoftThresholdImageFilter< typename VectorInverseFFTType::OutputImageType >, and itk::PhaseAnalysisSoftThresholdImageFilter< typename VectorInverseFFTType::OutputImageType >.
|
overrideprotectedvirtual |
If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData() or DynamicThreadedGenerateData(). This superclass will automatically split the output image into a number of pieces, spawn multiple threads, and call (Dynamic)ThreadedGenerateData() in each thread. Prior to spawning threads, the BeforeThreadedGenerateData() method is called. After all the threads have completed, the AfterThreadedGenerateData() method is called. If an image processing filter cannot support threading, that filter should provide an implementation of the GenerateData() method instead of providing an implementation of (Dynamic)ThreadedGenerateData(). If a filter provides a GenerateData() method as its implementation, then the filter is responsible for allocating the output data. If a filter provides a (Dynamic)ThreadedGenerateData() method as its implementation, then the output memory will allocated automatically by this superclass. The (Dynamic)ThreadedGenerateData() method should only produce the output specified by "outputThreadRegion" parameter. (Dynamic)ThreadedGenerateData() cannot write to any other portion of the output image (as this is responsibility of a different thread).
DynamicThreadedGenerateData() is the newer variant without threadId, and is the preferred signature, which is called by default. This variant can split the requested region into different number of pieces depending on current multi-processing load, which allows better load balancing. The non-dynamic (also known as classic) ThreadedGenerateData() signature has threadId, and number of pieces to be split into is known in advance. It is activated by calling this->DynamicMultiThreadingOff(); in derived class constructor. It should be used when the multi-threaded algorithm needs to pre-allocate some data structure with size dependent on the number of pieces (also known as chunks, work units, and sometimes also incorrectly as threads). Only PlatformMultiThreader guarantees that each piece will be processed in its own specific thread. Pool and TBB multi-threaders maintain a pool of threads (normally equal to number of processing cores) which they use to process the pieces. This normally results in a single thread being reused to process multiple work units.
Reimplemented from itk::ImageSource< TOutputImage >.
|
virtual |
Runtime information support.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PhaseAnalysisSoftThresholdImageFilter< TInputImage, TOutputImage >, itk::PhaseAnalysisSoftThresholdImageFilter< typename VectorInverseFFTType::OutputImageType >, and itk::PhaseAnalysisSoftThresholdImageFilter< typename VectorInverseFFTType::OutputImageType >.
|
inline |
Definition at line 121 of file itkPhaseAnalysisImageFilter.h.
|
inline |
Definition at line 115 of file itkPhaseAnalysisImageFilter.h.
|
inline |
This ensure that PixelType is float||double, and not complex.
Definition at line 109 of file itkPhaseAnalysisImageFilter.h.
|
static |
Standard New method.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::PhaseAnalysisSoftThresholdImageFilter< TInputImage, TOutputImage >, itk::PhaseAnalysisSoftThresholdImageFilter< typename VectorInverseFFTType::OutputImageType >, and itk::PhaseAnalysisSoftThresholdImageFilter< typename VectorInverseFFTType::OutputImageType >.
|
staticconstexpr |
ImageDimension constants
Definition at line 77 of file itkPhaseAnalysisImageFilter.h.