|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Perform a generic pixel-wise, index-aware operation on an input image to produce an output image. More...
#include <itkIndexedUnaryFunctorImageFilter.h>


Public Types | |
| typedef IndexedUnaryFunctorImageFilter | Self |
| Standard class typedefs. More... | |
| typedef InPlaceImageFilter< TInputImage, TOutputImage > | Superclass |
| typedef SmartPointer< Self > | Pointer |
| typedef SmartPointer< const Self > | ConstPointer |
| typedef TFunction | FunctorType |
| Type of the functor used for the pixel-wise operation. More... | |
| typedef TInputImage | InputImageType |
| Input image type. More... | |
| typedef InputImageType::ConstPointer | InputImagePointer |
| Input image const pointer type. More... | |
| typedef InputImageType::RegionType | InputImageRegionType |
| Input image region type. More... | |
| typedef InputImageType::PixelType | InputImagePixelType |
| Input pixel type. More... | |
| typedef TOutputImage | OutputImageType |
| Output image type. More... | |
| typedef OutputImageType::Pointer | OutputImagePointer |
| Output image pointer type. More... | |
| typedef OutputImageType::RegionType | OutputImageRegionType |
| Output image region type. More... | |
| typedef OutputImageType::PixelType | OutputImagePixelType |
| Output pixel type. More... | |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| Run-time type information (and related methods). More... | |
| FunctorType & | GetFunctor () |
| Get a mutable reference to the functor object. More... | |
| const FunctorType & | GetFunctor () const |
| Get a const reference to the functor object. More... | |
| void | SetFunctor (const FunctorType &functor) |
| Set the functor object. More... | |
Static Public Member Functions | |
| static Pointer | New () |
| Method for creation through the object factory. More... | |
Protected Member Functions | |
| IndexedUnaryFunctorImageFilter () | |
| virtual | ~IndexedUnaryFunctorImageFilter () |
| void | GenerateOutputInformation () override |
| void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override |
Perform a generic pixel-wise, index-aware operation on an input image to produce an output image.
This filter is similar to itk::UnaryFunctorImageFilter, but it passes both the pixel value and its image index to the functor. This is useful for operations where the spatial position of a pixel within the image is relevant for computing the output (e.g., spatially varying decay correction in PET SUV calculations).
No upstream ITK filter exposes "(pixel value, image index) -> output pixel" directly. itk::UnaryFunctorImageFilter passes only the pixel value; itk::UnaryGeneratorImageFilter is region-based (functor signature is (input, region, threadId, ProgressReporter)) and not pixel-based. Hand-rolling around itk::ImageRegionConstIteratorWithIndex / itk::ImageRegionIterator – which is what this filter does – is the standard way to close that gap.
| TInputImage | Type of the input image. |
| TOutputImage | Type of the output image. |
| TFunction | Functor type. Must define operator()(const InputPixelType&, const IndexType&) and operator!=(). |
The functor is called for each pixel as:
Definition at line 56 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef SmartPointer< const Self > itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::ConstPointer |
Definition at line 63 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef TFunction itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::FunctorType |
Type of the functor used for the pixel-wise operation.
Definition at line 72 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef InputImageType::PixelType itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::InputImagePixelType |
Input pixel type.
Definition at line 77 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef InputImageType::ConstPointer itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::InputImagePointer |
Input image const pointer type.
Definition at line 75 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef InputImageType::RegionType itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::InputImageRegionType |
Input image region type.
Definition at line 76 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef TInputImage itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::InputImageType |
Input image type.
Definition at line 74 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef OutputImageType::PixelType itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::OutputImagePixelType |
Output pixel type.
Definition at line 82 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef OutputImageType::Pointer itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::OutputImagePointer |
Output image pointer type.
Definition at line 80 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef OutputImageType::RegionType itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::OutputImageRegionType |
Output image region type.
Definition at line 81 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef TOutputImage itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::OutputImageType |
Output image type.
Definition at line 79 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef SmartPointer< Self > itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::Pointer |
Definition at line 62 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef IndexedUnaryFunctorImageFilter itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::Self |
Standard class typedefs.
Definition at line 60 of file itkIndexedUnaryFunctorImageFilter.h.
| typedef InPlaceImageFilter< TInputImage, TOutputImage > itk::IndexedUnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction >::Superclass |
Definition at line 61 of file itkIndexedUnaryFunctorImageFilter.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 121 of file itkIndexedUnaryFunctorImageFilter.h.
|
overrideprotected |
IndexedUnaryFunctorImageFilter can produce an image which is a different resolution than its input image. As such, IndexedUnaryFunctorImageFilter needs to provide an implementation for GenerateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.
|
virtual |
Run-time type information (and related methods).
|
inline |
Get a mutable reference to the functor object.
The functor is returned by reference because functors do not have to derive from itk::LightObject and thus may not have a reference count.
Definition at line 92 of file itkIndexedUnaryFunctorImageFilter.h.
|
inline |
Get a const reference to the functor object.
Definition at line 99 of file itkIndexedUnaryFunctorImageFilter.h.
|
static |
Method for creation through the object factory.
|
inline |
Set the functor object.
Replaces the current functor with a copy of the specified functor. This allows configuring functor parameters (e.g., injected activity, body weight) before running the filter. Requires operator!=() to be defined on the functor type.
| [in] | functor | The functor to copy into this filter. |
Definition at line 110 of file itkIndexedUnaryFunctorImageFilter.h.
|
overrideprotected |
IndexedUnaryFunctorImageFilter can be implemented as a multithreaded filter. Therefore, this implementation provides a ThreadedGenerateData() routine which is called for each processing thread. The output image data is allocated automatically by the superclass prior to calling ThreadedGenerateData(). ThreadedGenerateData can only write to the portion of the output image specified by the parameter "outputRegionForThread"