RTK  2.6.0
Reconstruction Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
rtk::TotalVariationImageFilter< TInputImage > Class Template Reference

#include <rtkTotalVariationImageFilter.h>

+ Inheritance diagram for rtk::TotalVariationImageFilter< TInputImage >:
+ Collaboration diagram for rtk::TotalVariationImageFilter< TInputImage >:

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
using DataObjectPointer = typename itk::DataObject::Pointer
 
using DataObjectPointerArraySizeType = itk::ProcessObject::DataObjectPointerArraySizeType
 
using IndexType = typename TInputImage::IndexType
 
using InputImagePointer = typename TInputImage::Pointer
 
using PixelType = typename TInputImage::PixelType
 
using Pointer = itk::SmartPointer< Self >
 
using RealObjectType = itk::SimpleDataObjectDecorator< RealType >
 
using RealType = typename itk::NumericTraits< PixelType >::RealType
 
using RegionType = typename TInputImage::RegionType
 
using Self = TotalVariationImageFilter
 
using SizeType = typename TInputImage::SizeType
 
using Superclass = itk::ImageToImageFilter< TInputImage, TInputImage >
 
- Public Types inherited from ImageSource< TInputImage >
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::DataObjectIdentifierType DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef Superclass::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef typename OutputImageType::PixelType OutputImagePixelType
 
typedef typename OutputImageType::Pointer OutputImagePointer
 
typedef typename OutputImageType::RegionType OutputImageRegionType
 
typedef TInputImage OutputImageType
 
typedef SmartPointer< SelfPointer
 
typedef ImageSource Self
 
typedef ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
const RealObjectTypeGetTotalVariationOutput () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType output) override
 
void SetUseImageSpacingOff ()
 
void SetUseImageSpacingOn ()
 
virtual const char * GetNameOfClass () const
 
RealType GetTotalVariation () const
 
RealObjectTypeGetTotalVariationOutput ()
 
virtual void SetUseImageSpacing (bool _arg)
 
virtual bool GetUseImageSpacing () const
 
- Public Member Functions inherited from ImageSource< TInputImage >
OutputImageTypeGetOutput (unsigned int idx)
 
const OutputImageTypeGetOutput () const
 
OutputImageTypeGetOutput ()
 
const OutputImageTypeGetOutput () const
 
OutputImageTypeGetOutput ()
 
virtual void GraftNthOutput (unsigned int idx, DataObject *graft)
 
virtual void GraftNthOutput (unsigned int idx, DataObject *graft)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *graft)
 
virtual void GraftOutput (DataObject *graft)
 
virtual void GraftOutput (DataObject *graft)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *graft)
 
ProcessObject::DataObjectPointer MakeOutput (const ProcessObject::DataObjectIdentifierType &) override
 
ProcessObject::DataObjectPointer MakeOutput (const ProcessObject::DataObjectIdentifierType &) override
 
ProcessObject::DataObjectPointer MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 
ProcessObject::DataObjectPointer MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TInputImage::ImageDimension
 
- Static Public Attributes inherited from ImageSource< TInputImage >
static constexpr unsigned int OutputImageDimension
 

Protected Member Functions

void AfterThreadedGenerateData () override
 
void AllocateOutputs () override
 
void BeforeThreadedGenerateData () override
 
void EnlargeOutputRequestedRegion (itk::DataObject *data) override
 
void GenerateInputRequestedRegion () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
void ThreadedGenerateData (const RegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 
 TotalVariationImageFilter ()
 
 ~TotalVariationImageFilter () override=default
 
- Protected Member Functions inherited from ImageSource< TInputImage >
void ClassicMultiThread (ThreadFunctionType callbackFunction)
 
virtual void DynamicMultiThreadingOn ()
 
virtual void DynamicMultiThreadingOn ()
 
virtual void DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread)
 
virtual void DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread)
 
void GenerateData () override
 
virtual bool GetDynamicMultiThreading () const
 
virtual bool GetDynamicMultiThreading () const
 
virtual const ImageRegionSplitterBase * GetImageRegionSplitter () const
 
 ImageSource ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetDynamicMultiThreading (bool _arg)
 
virtual void SetDynamicMultiThreading (bool _arg)
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion)
 
virtual void ThreadedGenerateData (const OutputImageRegionType &region, ThreadIdType threadId)
 
virtual void ThreadedGenerateData (const OutputImageRegionType &region, ThreadIdType threadId)
 
 ~ImageSource () override=default
 

Protected Attributes

bool m_UseImageSpacing
 
- Protected Attributes inherited from ImageSource< TInputImage >
bool m_DynamicMultiThreading
 

Private Attributes

itk::Array< RealTypem_SumOfSquareRoots
 

Additional Inherited Members

- Static Protected Member Functions inherited from ImageSource< TInputImage >
static const ImageRegionSplitterBase * GetGlobalDefaultSplitter ()
 
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreaderCallback (void *arg)
 

Detailed Description

template<typename TInputImage>
class rtk::TotalVariationImageFilter< TInputImage >

Compute the total variation of an Image.

TotalVariationImageFilter computes the total variation, defined as the L1 norm of the image of the L2 norm of the gradient, of an image. The filter needs all of its input image. It behaves as a filter with an input and output. Thus it can be inserted in a pipeline with other filters and the total variation will only be recomputed if a downstream filter changes.

The filter passes its input through unmodified. The filter is threaded.

Definition at line 50 of file rtkTotalVariationImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 59 of file rtkTotalVariationImageFilter.h.

◆ DataObjectPointer

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::DataObjectPointer = typename itk::DataObject::Pointer

Smart Pointer type to a DataObject.

Definition at line 87 of file rtkTotalVariationImageFilter.h.

◆ DataObjectPointerArraySizeType

Make a DataObject of the correct type to be used as the specified output.

Definition at line 108 of file rtkTotalVariationImageFilter.h.

◆ IndexType

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::IndexType = typename TInputImage::IndexType

Definition at line 77 of file rtkTotalVariationImageFilter.h.

◆ InputImagePointer

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::InputImagePointer = typename TInputImage::Pointer

Image related type alias.

Definition at line 73 of file rtkTotalVariationImageFilter.h.

◆ PixelType

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::PixelType = typename TInputImage::PixelType

Definition at line 78 of file rtkTotalVariationImageFilter.h.

◆ Pointer

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::Pointer = itk::SmartPointer<Self>

Definition at line 58 of file rtkTotalVariationImageFilter.h.

◆ RealObjectType

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::RealObjectType = itk::SimpleDataObjectDecorator<RealType>

Type of DataObjects used for scalar outputs

Definition at line 90 of file rtkTotalVariationImageFilter.h.

◆ RealType

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::RealType = typename itk::NumericTraits<PixelType>::RealType

Type to use for computations.

Definition at line 84 of file rtkTotalVariationImageFilter.h.

◆ RegionType

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::RegionType = typename TInputImage::RegionType

Definition at line 75 of file rtkTotalVariationImageFilter.h.

◆ Self

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::Self = TotalVariationImageFilter

Standard Self type alias

Definition at line 56 of file rtkTotalVariationImageFilter.h.

◆ SizeType

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::SizeType = typename TInputImage::SizeType

Definition at line 76 of file rtkTotalVariationImageFilter.h.

◆ Superclass

template<typename TInputImage >
using rtk::TotalVariationImageFilter< TInputImage >::Superclass = itk::ImageToImageFilter<TInputImage, TInputImage>

Definition at line 57 of file rtkTotalVariationImageFilter.h.

Constructor & Destructor Documentation

◆ TotalVariationImageFilter()

template<typename TInputImage >
rtk::TotalVariationImageFilter< TInputImage >::TotalVariationImageFilter ( )
protected

◆ ~TotalVariationImageFilter()

template<typename TInputImage >
rtk::TotalVariationImageFilter< TInputImage >::~TotalVariationImageFilter ( )
overrideprotecteddefault

Member Function Documentation

◆ AfterThreadedGenerateData()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::AfterThreadedGenerateData ( )
overrideprotectedvirtual

Do final mean and variance computation from data accumulated in threads.

Reimplemented from itk::ImageSource< TOutputImage >.

◆ AllocateOutputs()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::AllocateOutputs ( )
overrideprotectedvirtual

Pass the input through unmodified. Do this by Grafting in the AllocateOutputs method.

Reimplemented from itk::ImageSource< TOutputImage >.

◆ BeforeThreadedGenerateData()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::BeforeThreadedGenerateData ( )
overrideprotectedvirtual

Initialize some accumulators before the threads run.

Reimplemented from itk::ImageSource< TOutputImage >.

◆ CreateAnother()

template<typename TInputImage >
virtual::itk::LightObject::Pointer rtk::TotalVariationImageFilter< TInputImage >::CreateAnother ( ) const
virtual

Reimplemented from itk::Object.

◆ EnlargeOutputRequestedRegion()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::EnlargeOutputRequestedRegion ( itk::DataObject data)
overrideprotectedvirtual

Reimplemented from itk::ProcessObject.

◆ GenerateInputRequestedRegion()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::GenerateInputRequestedRegion ( )
overrideprotectedvirtual

Reimplemented from itk::ProcessObject.

◆ GetNameOfClass()

template<typename TInputImage >
virtual const char* rtk::TotalVariationImageFilter< TInputImage >::GetNameOfClass ( ) const
virtual

Runtime information support.

Reimplemented from itk::ImageSource< TOutputImage >.

◆ GetTotalVariation()

template<typename TInputImage >
RealType rtk::TotalVariationImageFilter< TInputImage >::GetTotalVariation ( ) const
inline

Return the computed Minimum.

Definition at line 95 of file rtkTotalVariationImageFilter.h.

◆ GetTotalVariationOutput() [1/2]

template<typename TInputImage >
RealObjectType* rtk::TotalVariationImageFilter< TInputImage >::GetTotalVariationOutput ( )

Return the computed Minimum.

◆ GetTotalVariationOutput() [2/2]

template<typename TInputImage >
const RealObjectType* rtk::TotalVariationImageFilter< TInputImage >::GetTotalVariationOutput ( ) const

◆ GetUseImageSpacing()

template<typename TInputImage >
virtual bool rtk::TotalVariationImageFilter< TInputImage >::GetUseImageSpacing ( ) const
virtual

Set/Get whether or not the filter will use the spacing of the input image in its calculations

◆ MakeOutput()

template<typename TInputImage >
DataObjectPointer rtk::TotalVariationImageFilter< TInputImage >::MakeOutput ( DataObjectPointerArraySizeType  output)
overridevirtual

Reimplemented from itk::ImageSource< TOutputImage >.

◆ New()

template<typename TInputImage >
static Pointer rtk::TotalVariationImageFilter< TInputImage >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

Reimplemented from itk::ImageSource< TOutputImage >.

◆ SetUseImageSpacing()

template<typename TInputImage >
virtual void rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacing ( bool  _arg)
virtual

Set/Get whether or not the filter will use the spacing of the input image in its calculations

◆ SetUseImageSpacingOff()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacingOff ( )
inline

Ignore the image spacing. Use this option if you want derivatives in isotropic pixel space. Default is UseImageSpacingOn.

Definition at line 130 of file rtkTotalVariationImageFilter.h.

◆ SetUseImageSpacingOn()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacingOn ( )
inline

Use the image spacing information in calculations. Use this option if you want derivatives in physical space. Default is UseImageSpacingOn.

Definition at line 122 of file rtkTotalVariationImageFilter.h.

◆ ThreadedGenerateData()

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::ThreadedGenerateData ( const RegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
overrideprotected

Multi-thread version GenerateData.

Member Data Documentation

◆ ImageDimension

template<typename TInputImage >
constexpr unsigned int rtk::TotalVariationImageFilter< TInputImage >::ImageDimension = TInputImage::ImageDimension
static

Image related type alias.

Definition at line 81 of file rtkTotalVariationImageFilter.h.

◆ m_SumOfSquareRoots

template<typename TInputImage >
itk::Array<RealType> rtk::TotalVariationImageFilter< TInputImage >::m_SumOfSquareRoots
private

Definition at line 177 of file rtkTotalVariationImageFilter.h.

◆ m_UseImageSpacing

template<typename TInputImage >
bool rtk::TotalVariationImageFilter< TInputImage >::m_UseImageSpacing
protected

Definition at line 174 of file rtkTotalVariationImageFilter.h.


The documentation for this class was generated from the following file: