#include <itkUnaryFrequencyDomainFilter.h>
Performs a unary operation on a frequency domain image.
A frequency filtering functor needs to be supplied via one of SetFunctor() overloads. The functor should take FrequencyIteratorType reference as its only parameter. If functor configurability is required, those parameters should be passed directly to the functor at the place of definition.
Filters in the module ITKImageFrequency work with input images in the frequency domain. This filter is templated over a TFrequencyIterator depending on the frequency layout of the input image.
Images in the dual space can be acquired experimentally, from scattering experiments or other techniques. In that case use FrequencyImageRegionIteratorWithIndex because the layout of dual space images is the same as spatial domain images.
Frequency-domain images can be computed from any spatial-domain applying a Fourier Transform. If ForwardFFTImageFilter was used, template this filter with the FrequencyFFTLayoutImageRegionIteratorWithIndex. Please note that FrequencyFFTLayoutImageRegionIteratorWithIndex requires a full FFT, and is not compatible with the Hermitian optimization.
To use this filter with Hermitian (halved-frequency) FFTs, use FrequencyHalfHermitianFFTLayoutImageRegionIteratorWithIndex or its const version.
If the output of the FFT is shifted, for example after applying FFTShiftImageFilter, use FrequencyShiftedFFTLayoutImageRegionIteratorWithIndex.
Definition at line 61 of file itkUnaryFrequencyDomainFilter.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
const char * | GetNameOfClass () const override |
void | SetFunctor (const std::function< ConstRefFunctionType > &f) |
void | SetFunctor (const std::function< ValueFunctionType > &f) |
template<typename TFunctor> | |
void | SetFunctor (const TFunctor &functor) |
void | SetFunctor (ConstRefFunctionType *f) |
void | SetFunctor (ValueFunctionType *funcPointer) |
virtual void | SetActualXDimensionIsOdd (bool _arg) |
virtual const bool & | GetActualXDimensionIsOdd () const |
virtual void | ActualXDimensionIsOddOn () |
virtual void | ActualXDimensionIsOddOff () |
![]() | |
virtual bool | CanRunInPlace () const |
virtual bool | CanRunInPlace () const |
virtual void | SetInPlace (bool _arg) |
virtual bool | GetInPlace () const |
virtual void | InPlaceOn () |
virtual void | InPlaceOff () |
virtual void | SetInPlace (bool _arg) |
virtual bool | GetInPlace () const |
virtual void | InPlaceOn () |
virtual void | InPlaceOff () |
![]() | |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput () const |
const InputImageType * | GetInput (unsigned int idx) const |
const InputImageType * | GetInput (unsigned int idx) const |
void | PopBackInput () override |
void | PopBackInput () override |
void | PopFrontInput () override |
void | PopFrontInput () override |
virtual void | PushBackInput (const InputImageType *input) |
virtual void | PushBackInput (const InputImageType *input) |
virtual void | PushFrontInput (const InputImageType *input) |
virtual void | PushFrontInput (const InputImageType *input) |
virtual void | SetInput (const InputImageType *input) |
virtual void | SetInput (const InputImageType *input) |
virtual void | SetInput (unsigned int, const TImageType *image) |
virtual void | SetInput (unsigned int, const TImageType *image) |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
![]() | |
OutputImageType * | GetOutput (unsigned int idx) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *graft) |
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *graft) |
virtual void | GraftOutput (DataObject *graft) |
OutputImageType * | GetOutput () |
const OutputImageType * | GetOutput () const |
ProcessObject::DataObjectPointer | MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override |
ProcessObject::DataObjectPointer | MakeOutput (const ProcessObject::DataObjectIdentifierType &) override |
![]() | |
virtual void | AbortGenerateDataOff () |
virtual void | AbortGenerateDataOn () |
virtual void | EnlargeOutputRequestedRegion (DataObject *output) |
virtual const bool & | GetAbortGenerateData () const |
DataObjectPointerArray | GetIndexedInputs () |
DataObjectPointerArray | GetIndexedOutputs () |
NameArray | GetInputNames () const |
DataObjectPointerArray | GetInputs () |
MultiThreaderType * | GetMultiThreader () const |
DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
DataObjectPointerArraySizeType | GetNumberOfInputs () const |
DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
virtual DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
NameArray | GetOutputNames () const |
DataObjectPointerArray | GetOutputs () |
virtual float | GetProgress () const |
NameArray | GetRequiredInputNames () const |
bool | HasInput (const DataObjectIdentifierType &key) const |
bool | HasOutput (const DataObjectIdentifierType &key) const |
void | IncrementProgress (float increment) |
virtual void | PrepareOutputs () |
virtual void | PropagateRequestedRegion (DataObject *output) |
virtual void | ResetPipeline () |
virtual void | SetAbortGenerateData (bool _arg) |
void | SetMultiThreader (MultiThreaderType *threader) |
virtual void | Update () |
virtual void | UpdateLargestPossibleRegion () |
virtual void | UpdateOutputData (DataObject *output) |
virtual void | UpdateOutputInformation () |
void | UpdateProgress (float progress) |
virtual void | SetReleaseDataFlag (bool val) |
virtual bool | GetReleaseDataFlag () const |
void | ReleaseDataFlagOn () |
void | ReleaseDataFlagOff () |
virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
virtual void | ReleaseDataBeforeUpdateFlagOn () |
virtual void | ReleaseDataBeforeUpdateFlagOff () |
virtual void | SetNumberOfWorkUnits (ThreadIdType _arg) |
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
![]() | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
![]() | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TImageType::ImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
static constexpr unsigned int | OutputImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Attributes | |
bool | m_ActualXDimensionIsOdd { false } |
std::function< void(const ImageRegionType &)> | m_DynamicThreadedGenerateDataFunction {} |
Additional Inherited Members | |
![]() | |
using | InputToOutputRegionCopierType |
using | OutputToInputRegionCopierType |
![]() | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
![]() | |
template<typename TSourceObject> | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
![]() | |
bool | m_DynamicMultiThreading { true } |
![]() | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ConstPointer = SmartPointer<const Self> |
Definition at line 70 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ConstRefFunctionType = double(const FrequencyIteratorType &) |
Returns factor with which the current frequency should be multiplied.
Definition at line 107 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::FrequencyIteratorType = TFrequencyIterator |
Frequency Iterator types
Definition at line 93 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::FrequencyValueType = typename FrequencyIteratorType::FrequencyValueType |
Definition at line 94 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ImageConstPointer = typename ImageType::ConstPointer |
Definition at line 81 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ImagePointer = typename ImageType::Pointer |
Definition at line 80 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ImageRegionType = typename TImageType::RegionType |
Typedef to describe the image region type.
Definition at line 86 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ImageType = TImageType |
Typedef to images
Definition at line 79 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::IndexType = typename TImageType::IndexType |
Definition at line 82 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::PixelType = typename TImageType::PixelType |
Definition at line 83 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::Pointer = SmartPointer<Self> |
Definition at line 69 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::Self = UnaryFrequencyDomainFilter |
Standard class type alias.
Definition at line 67 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::Superclass = InPlaceImageFilter<TImageType, TImageType> |
Definition at line 68 of file itkUnaryFrequencyDomainFilter.h.
using itk::UnaryFrequencyDomainFilter< TImageType, TFrequencyIterator >::ValueFunctionType = void(FrequencyIteratorType &) |
Directly modifies the frequency as needed.
Definition at line 110 of file itkUnaryFrequencyDomainFilter.h.
|
protected |
|
virtual |
Set to true when the you are dealing with images in the frequency domain that have been computed using RealToHalfHermitianFFT, and the original image in the spatial domain was odd. Only needed when using HermitianFrequencyIterator and the original image was odd.
|
virtual |
Set to true when the you are dealing with images in the frequency domain that have been computed using RealToHalfHermitianFFT, and the original image in the spatial domain was odd. Only needed when using HermitianFrequencyIterator and the original image was odd.
|
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.
|
overrideprotected |
UnaryFrequencyDomainFilter is implemented as a multithreaded filter. Therefore, this implementation provides a DynamicThreadedGenerateData() routine which is called for each processing thread.
The template method is instantiated by the SetFunctor method, and the generated code is run during the update.
|
protected |
UnaryFrequencyDomainFilter is implemented as a multithreaded filter. Therefore, this implementation provides a DynamicThreadedGenerateData() routine which is called for each processing thread.
The template method is instantiated by the SetFunctor method, and the generated code is run during the update.
|
virtual |
Set to true when the you are dealing with images in the frequency domain that have been computed using RealToHalfHermitianFFT, and the original image in the spatial domain was odd. Only needed when using HermitianFrequencyIterator and the original image was odd.
|
overridevirtual |
Reimplemented from itk::InPlaceImageFilter< TImageType, TImageType >.
|
static |
Method for creation through the object factory.
|
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::InPlaceImageFilter< TImageType, TImageType >.
|
virtual |
Set to true when the you are dealing with images in the frequency domain that have been computed using RealToHalfHermitianFFT, and the original image in the spatial domain was odd. Only needed when using HermitianFrequencyIterator and the original image was odd.
|
inline |
The functor returns factor with which the current frequency should be multiplied.
Definition at line 115 of file itkUnaryFrequencyDomainFilter.h.
|
inline |
The functor directly modifies the frequency as needed.
Definition at line 128 of file itkUnaryFrequencyDomainFilter.h.
|
inline |
Set the frequency functor by a "Functor Object"
The functor defines an operation done per scalar frequency. A single copy of the argument is created an used for all threads, so the functor must be concurrent thread-safe. The functor must a have an operator() method which accept arguments of FrequencyIteratorType&.
Definition at line 172 of file itkUnaryFrequencyDomainFilter.h.
|
inline |
The functor returns factor with which the current frequency should be multiplied.
Definition at line 140 of file itkUnaryFrequencyDomainFilter.h.
|
inline |
The functor directly modifies the frequency as needed.
Definition at line 153 of file itkUnaryFrequencyDomainFilter.h.
|
staticconstexpr |
Definition at line 88 of file itkUnaryFrequencyDomainFilter.h.
|
private |
Definition at line 206 of file itkUnaryFrequencyDomainFilter.h.
|
private |
Definition at line 204 of file itkUnaryFrequencyDomainFilter.h.