RTK  1.4.0
Reconstruction Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | 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

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::DataObject::Pointer DataObjectPointer
 
typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef TInputImage::IndexType IndexType
 
typedef TInputImage::Pointer InputImagePointer
 
typedef TInputImage::PixelType PixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SimpleDataObjectDecorator< RealTypeRealObjectType
 
typedef itk::NumericTraits< PixelType >::RealType RealType
 
typedef TInputImage::RegionType RegionType
 
typedef TotalVariationImageFilter Self
 
typedef TInputImage::SizeType SizeType
 
typedef itk::ImageToImageFilter< TInputImage, TInputImage > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
const RealObjectTypeGetTotalVariationOutput () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
void SetUseImageSpacingOff ()
 
void SetUseImageSpacingOn ()
 
RealType GetTotalVariation () const
 
RealObjectTypeGetTotalVariationOutput ()
 
virtual void SetUseImageSpacing (bool _arg)
 
virtual bool GetUseImageSpacing () const
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = TInputImage::ImageDimension
 

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 ()
 
virtual ~TotalVariationImageFilter () override
 

Protected Attributes

bool m_UseImageSpacing
 

Private Member Functions

void operator= (const Self &)
 
 TotalVariationImageFilter (const Self &)
 

Private Attributes

itk::Array< RealTypem_SumOfSquareRoots
 

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

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

Definition at line 58 of file rtkTotalVariationImageFilter.h.

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

Smart Pointer type to a DataObject.

Definition at line 82 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef itk::ProcessObject::DataObjectPointerArraySizeType rtk::TotalVariationImageFilter< TInputImage >::DataObjectPointerArraySizeType

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

Definition at line 98 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef TInputImage::IndexType rtk::TotalVariationImageFilter< TInputImage >::IndexType

Definition at line 71 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef TInputImage::Pointer rtk::TotalVariationImageFilter< TInputImage >::InputImagePointer

Image related typedefs.

Definition at line 64 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef TInputImage::PixelType rtk::TotalVariationImageFilter< TInputImage >::PixelType

Definition at line 72 of file rtkTotalVariationImageFilter.h.

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

Definition at line 57 of file rtkTotalVariationImageFilter.h.

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

Type of DataObjects used for scalar outputs

Definition at line 85 of file rtkTotalVariationImageFilter.h.

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

Type to use for computations.

Definition at line 79 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef TInputImage::RegionType rtk::TotalVariationImageFilter< TInputImage >::RegionType

Definition at line 69 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef TotalVariationImageFilter rtk::TotalVariationImageFilter< TInputImage >::Self

Standard Self typedef

Definition at line 55 of file rtkTotalVariationImageFilter.h.

template<typename TInputImage >
typedef TInputImage::SizeType rtk::TotalVariationImageFilter< TInputImage >::SizeType

Definition at line 70 of file rtkTotalVariationImageFilter.h.

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

Definition at line 56 of file rtkTotalVariationImageFilter.h.

Constructor & Destructor Documentation

template<typename TInputImage >
rtk::TotalVariationImageFilter< TInputImage >::TotalVariationImageFilter ( )
protected
template<typename TInputImage >
virtual rtk::TotalVariationImageFilter< TInputImage >::~TotalVariationImageFilter ( )
inlineoverrideprotectedvirtual
template<typename TInputImage >
rtk::TotalVariationImageFilter< TInputImage >::TotalVariationImageFilter ( const Self )
private

Member Function Documentation

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

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

Referenced by rtk::TotalVariationImageFilter< TInputImage >::~TotalVariationImageFilter().

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

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

Referenced by rtk::TotalVariationImageFilter< TInputImage >::~TotalVariationImageFilter().

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

Initialize some accumulators before the threads run.

Referenced by rtk::TotalVariationImageFilter< TInputImage >::~TotalVariationImageFilter().

template<typename TInputImage >
virtual::itk::LightObject::Pointer rtk::TotalVariationImageFilter< TInputImage >::CreateAnother ( ) const
template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::EnlargeOutputRequestedRegion ( itk::DataObject data)
overrideprotected
template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::GenerateInputRequestedRegion ( )
overrideprotected
template<typename TInputImage >
virtual const char* rtk::TotalVariationImageFilter< TInputImage >::GetNameOfClass ( ) const
virtual

Runtime information support.

Reimplemented from itk::ImageSource< TOutputImage >.

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

Return the computed Minimum.

Definition at line 89 of file rtkTotalVariationImageFilter.h.

References rtk::TotalVariationImageFilter< TInputImage >::GetTotalVariationOutput().

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

Return the computed Minimum.

Referenced by rtk::TotalVariationImageFilter< TInputImage >::GetTotalVariation().

template<typename TInputImage >
const RealObjectType* rtk::TotalVariationImageFilter< TInputImage >::GetTotalVariationOutput ( ) const
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

template<typename TInputImage >
DataObjectPointer rtk::TotalVariationImageFilter< TInputImage >::MakeOutput ( DataObjectPointerArraySizeType  idx)
override
template<typename TInputImage >
static Pointer rtk::TotalVariationImageFilter< TInputImage >::New ( )
static

Method for creation through the object factory.

template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::operator= ( const Self )
private
template<typename TInputImage >
void rtk::TotalVariationImageFilter< TInputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected
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

Referenced by rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacingOff(), and rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacingOn().

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 116 of file rtkTotalVariationImageFilter.h.

References itkSetMacro, rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacing(), and rtk::TotalVariationImageFilter< TInputImage >::TotalVariationImageFilter().

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 111 of file rtkTotalVariationImageFilter.h.

References rtk::TotalVariationImageFilter< TInputImage >::SetUseImageSpacing().

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

Multi-thread version GenerateData.

Referenced by rtk::TotalVariationImageFilter< TInputImage >::~TotalVariationImageFilter().

Member Data Documentation

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

Image related typedefs.

Definition at line 76 of file rtkTotalVariationImageFilter.h.

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

Definition at line 159 of file rtkTotalVariationImageFilter.h.

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

Definition at line 153 of file rtkTotalVariationImageFilter.h.


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