#include <itkUnaryGeneratorImageFilter.h>
Implements pixel-wise generic "operation" on one image.
This class is parameterized over the type of the input image and the type of the output image.
This filter allows per-pixel operations to be specified in several ways:
UnaryGeneratorImageFilter allows the output dimension of the filter to be larger than the input dimension. Thus subclasses of the UnaryGeneratorImageFilter can be used to promote a 2D image to a 3D image, etc.
Definition at line 55 of file itkUnaryGeneratorImageFilter.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
const char * | GetNameOfClass () const override |
void | SetFunctor (const std::function< ValueFunctionType > &f) |
void | SetFunctor (ValueFunctionType *funcPointer) |
void | SetFunctor (const std::function< ConstRefFunctionType > &f) |
void | SetFunctor (ConstRefFunctionType *funcPointer) |
template<typename TFunctor> | |
void | SetFunctor (const TFunctor &functor) |
![]() | |
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 (unsigned int idx) const |
void | PopBackInput () override |
void | PopFrontInput () override |
virtual void | PushBackInput (const InputImageType *input) |
virtual void | PushFrontInput (const InputImageType *input) |
virtual void | SetInput (const InputImageType *input) |
virtual void | SetInput (unsigned int, const TInputImage *image) |
virtual void | SetCoordinateTolerance (double _arg) |
virtual double | GetCoordinateTolerance () const |
virtual void | SetDirectionTolerance (double _arg) |
virtual double | GetDirectionTolerance () const |
![]() | |
OutputImageType * | GetOutput (unsigned int idx) |
OutputImageType * | GetOutput () |
const OutputImageType * | GetOutput () const |
virtual void | GraftOutput (DataObject *graft) |
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *graft) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *graft) |
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 | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (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 () |
Private Attributes | |
std::function< void(const OutputImageRegionType &)> | m_DynamicThreadedGenerateDataFunction {} |
Additional Inherited Members | |
![]() | |
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 = TInputImage::ImageDimension |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
![]() | |
static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
![]() | |
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::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 64 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::ConstRefFunctionType = OutputImagePixelType(const InputImagePixelType &) |
Definition at line 82 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::InputImagePixelType = typename InputImageType::PixelType |
Definition at line 75 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::InputImagePointer = typename InputImageType::ConstPointer |
Definition at line 73 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::InputImageRegionType = typename InputImageType::RegionType |
Definition at line 74 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::InputImageType = TInputImage |
Definition at line 72 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::OutputImagePixelType = typename OutputImageType::PixelType |
Definition at line 80 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::OutputImagePointer = typename OutputImageType::Pointer |
Definition at line 78 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::OutputImageRegionType = typename OutputImageType::RegionType |
Definition at line 79 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::OutputImageType = TOutputImage |
Definition at line 77 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 63 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::Self = UnaryGeneratorImageFilter |
Standard class typedefs.
Definition at line 61 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::Superclass = InPlaceImageFilter<TInputImage, TOutputImage> |
Definition at line 62 of file itkUnaryGeneratorImageFilter.h.
using itk::UnaryGeneratorImageFilter< TInputImage, TOutputImage >::ValueFunctionType = OutputImagePixelType(InputImagePixelType) |
Definition at line 83 of file itkUnaryGeneratorImageFilter.h.
|
protected |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
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::VectorMagnitudeImageFilter< TInputImage, TOutputImage >.
|
overrideprotectedvirtual |
UnaryGeneratorImageFilter is implemented as a multithreaded filter. Therefore, this implementation provides a ThreadedGenerateData() 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.
Reimplemented from itk::ImageSource< TOutputImage >.
|
protected |
UnaryGeneratorImageFilter is implemented as a multithreaded filter. Therefore, this implementation provides a ThreadedGenerateData() 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.
Referenced by SetFunctor(), SetFunctor(), SetFunctor(), SetFunctor(), and SetFunctor().
|
overrideprotectedvirtual |
UnaryGeneratorImageFilter can produce an image which is a different resolution than its input image. As such, UnaryGeneratorImageFilter needs to provide an implementation for GenerateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.
Reimplemented from itk::ProcessObject.
|
overridevirtual |
Reimplemented from itk::InPlaceImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::VectorMagnitudeImageFilter< TInputImage, TOutputImage >.
References UnaryGeneratorImageFilter().
|
static |
Method for creation through the object factory.
|
inline |
Set the pixel functor by an std::function wrapper
The functor defines an operation done per pixel.
Definition at line 92 of file itkUnaryGeneratorImageFilter.h.
References DynamicThreadedGenerateDataWithFunctor(), m_DynamicThreadedGenerateDataFunction, and itk::Object::Modified().
Referenced by itk::AbsImageFilter< TInputImage, TOutputImage >::AbsImageFilter(), itk::AcosImageFilter< TInputImage, TOutputImage >::AcosImageFilter(), itk::AsinImageFilter< TInputImage, TOutputImage >::AsinImageFilter(), itk::AtanImageFilter< TInputImage, TOutputImage >::AtanImageFilter(), itk::BoundedReciprocalImageFilter< TInputImage, TOutputImage >::BoundedReciprocalImageFilter(), itk::ComplexToImaginaryImageFilter< InputImageType, InternalImageType >::ComplexToImaginaryImageFilter(), itk::ComplexToModulusImageFilter< TInputImage, TOutputImage >::ComplexToModulusImageFilter(), itk::ComplexToPhaseImageFilter< TInputImage, TOutputImage >::ComplexToPhaseImageFilter(), itk::ComplexToRealImageFilter< InputImageType, InternalImageType >::ComplexToRealImageFilter(), itk::CosImageFilter< TInputImage, TOutputImage >::CosImageFilter(), itk::EdgePotentialImageFilter< TInputImage, TOutputImage >::EdgePotentialImageFilter(), itk::ExpImageFilter< TInputImage, TOutputImage >::ExpImageFilter(), itk::Log10ImageFilter< TInputImage, TOutputImage >::Log10ImageFilter(), itk::LogImageFilter< TInputImage, TOutputImage >::LogImageFilter(), itk::RGBToLuminanceImageFilter< TInputImage, TOutputImage >::RGBToLuminanceImageFilter(), itk::RoundImageFilter< TInputImage, TOutputImage >::RoundImageFilter(), itk::SinImageFilter< TInputImage, TOutputImage >::SinImageFilter(), itk::SqrtImageFilter< RealImageType, TOutputImage >::SqrtImageFilter(), itk::SquareImageFilter< TInputImage, TOutputImage >::SquareImageFilter(), itk::TanImageFilter< TInputImage, TOutputImage >::TanImageFilter(), and itk::VectorMagnitudeImageFilter< TInputImage, TOutputImage >::VectorMagnitudeImageFilter().
|
inline |
Definition at line 102 of file itkUnaryGeneratorImageFilter.h.
References DynamicThreadedGenerateDataWithFunctor(), m_DynamicThreadedGenerateDataFunction, and itk::Object::Modified().
|
inline |
Set the pixel functor by a "Functor Object"
The functor defines an operation done per pixel. 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 InputImagePixelType.
Definition at line 146 of file itkUnaryGeneratorImageFilter.h.
References DynamicThreadedGenerateDataWithFunctor(), m_DynamicThreadedGenerateDataFunction, and itk::Object::Modified().
|
inline |
Set the pixel functor by a C function pointer
The functor defines an operation done per pixel.
Definition at line 117 of file itkUnaryGeneratorImageFilter.h.
References DynamicThreadedGenerateDataWithFunctor(), m_DynamicThreadedGenerateDataFunction, and itk::Object::Modified().
|
inline |
Definition at line 127 of file itkUnaryGeneratorImageFilter.h.
References DynamicThreadedGenerateDataWithFunctor(), m_DynamicThreadedGenerateDataFunction, and itk::Object::Modified().
|
private |
Definition at line 191 of file itkUnaryGeneratorImageFilter.h.
Referenced by SetFunctor(), SetFunctor(), SetFunctor(), SetFunctor(), and SetFunctor().