ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtk::TotalVariationImageFilter< TInputImage > Class Template Reference

#include <rtkTotalVariationImageFilter.h>

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.

+ 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 itk::ImageToImageFilter< TInputImage, TInputImage >
using ConstPointer
 
using InputImageConstPointer
 
using InputImagePixelType
 
using InputImagePointer
 
using InputImageRegionType
 
using InputImageType
 
typedef typename OutputImageType::PixelType OutputImagePixelType
 
using OutputImagePixelType
 
typedef typename OutputImageType::RegionType OutputImageRegionType
 
using OutputImageRegionType
 
using Pointer
 
using Self
 
using Superclass
 
- Public Types inherited from itk::ImageSource< TInputImage >
using ConstPointer
 
using DataObjectIdentifierType
 
using DataObjectPointer
 
using DataObjectPointerArraySizeType
 
using OutputImagePixelType
 
using OutputImagePointer
 
using OutputImageRegionType
 
using OutputImageType
 
using Pointer
 
using Self
 
using Superclass
 
- Public Types inherited from itk::ProcessObject
using ConstPointer = SmartPointer<const Self>
 
using DataObjectIdentifierType = DataObject::DataObjectIdentifierType
 
using DataObjectPointer = DataObject::Pointer
 
using DataObjectPointerArray = std::vector<DataObjectPointer>
 
using DataObjectPointerArraySizeType = DataObjectPointerArray::size_type
 
using NameArray = std::vector<DataObjectIdentifierType>
 
using Pointer = SmartPointer<Self>
 
using Self = ProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightObject
 

Public Member Functions

virtual::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
RealType GetTotalVariation () const
 
RealObjectType * GetTotalVariationOutput ()
 
const RealObjectType * GetTotalVariationOutput () const
 
virtual bool GetUseImageSpacing () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType output) override
 
virtual void SetUseImageSpacing (bool _arg)
 
void SetUseImageSpacingOff ()
 
void SetUseImageSpacingOn ()
 
- Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
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 TInputImage *image)
 
virtual void SetInput (unsigned int, const TInputImage *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
 
- Public Member Functions inherited from itk::ImageSource< TInputImage >
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 (const ProcessObject::DataObjectIdentifierType &) override
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreaderBase * 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 (MultiThreaderBase *threader)
 
virtual void SetNumberOfWorkUnitsFromThreadRatio (ThreadIdType ratio)
 
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 numberOfWorkUnits)
 
virtual ThreadIdType GetNumberOfWorkUnits () const
 
- Public Member Functions inherited from itk::Object
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
 
- Public Member Functions inherited from itk::LightObject
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 Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
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 Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TInputImage::ImageDimension
 
- Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
static constexpr unsigned int InputImageDimension
 
static constexpr unsigned int InputImageDimension
 
static constexpr unsigned int OutputImageDimension
 
static constexpr unsigned int OutputImageDimension
 
- Static Public Attributes inherited from itk::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 itk::ImageToImageFilter< TInputImage, TInputImage >
virtual void CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
 
virtual void CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
 
virtual void CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
 
virtual void CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
 
 ImageToImageFilter ()
 
 ImageToImageFilter ()
 
void VerifyInputInformation () const override
 
void VerifyInputInformation () const override
 
 ~ImageToImageFilter () override=default
 
 ~ImageToImageFilter () override=default
 
- Protected Member Functions inherited from itk::ImageSource< TInputImage >
void ClassicMultiThread (ThreadFunctionType callbackFunction)
 
void GenerateData () override
 
virtual const ImageRegionSplitterBase * GetImageRegionSplitter () const
 
 ImageSource ()
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion)
 
 ~ImageSource () override=default
 
virtual void ThreadedGenerateData (const OutputImageRegionType &region, ThreadIdType threadId)
 
virtual void DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread)
 
virtual bool GetDynamicMultiThreading () const
 
virtual void SetDynamicMultiThreading (bool _arg)
 
virtual void DynamicMultiThreadingOn ()
 
virtual void DynamicMultiThreadingOff ()
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
void AddOptionalInputName (const DataObjectIdentifierType &)
 
void AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
DataObject * GetInput (const DataObjectIdentifierType &key)
 
const DataObject * GetInput (const DataObjectIdentifierType &key) const
 
virtual const DataObjectPointerArraySizeType & GetNumberOfRequiredInputs () const
 
virtual const DataObjectPointerArraySizeType & GetNumberOfRequiredOutputs () const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &name, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *object)
 
virtual void SetPrimaryOutput (DataObject *object)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyPreconditions () const
 
 ~ProcessObject () override
 
DataObject * GetInput (DataObjectPointerArraySizeType idx)
 
const DataObject * GetInput (DataObjectPointerArraySizeType idx) const
 
DataObject * GetPrimaryInput ()
 
const DataObject * GetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName () const
 
DataObject * GetOutput (const DataObjectIdentifierType &key)
 
const DataObject * GetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName () const
 
DataObject * GetOutput (DataObjectPointerArraySizeType i)
 
const DataObject * GetOutput (DataObjectPointerArraySizeType i) const
 
DataObject * GetPrimaryOutput ()
 
const DataObject * GetPrimaryOutput () const
 
virtual bool GetThreaderUpdateProgress () const
 
virtual void ThreaderUpdateProgressOn ()
 
virtual void ThreaderUpdateProgressOff ()
 
virtual void SetThreaderUpdateProgress (bool arg)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

bool m_UseImageSpacing
 
- Protected Attributes inherited from itk::ImageSource< TInputImage >
bool m_DynamicMultiThreading
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime {}
 
bool m_Updating {}
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Private Attributes

itk::Array< RealType > m_SumOfSquareRoots
 

Additional Inherited Members

- Protected Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage >
using InputToOutputRegionCopierType
 
using OutputToInputRegionCopierType
 
- Static Protected Member Functions inherited from itk::ImageSource< TInputImage >
static const ImageRegionSplitterBase * GetGlobalDefaultSplitter ()
 
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreaderCallback (void *arg)
 
- Static Protected Member Functions inherited from itk::ProcessObject
template<typename TSourceObject>
static void MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs)
 
static constexpr float progressFixedToFloat (uint32_t fixed)
 
static uint32_t progressFloatToFixed (float f)
 

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

◆ DataObjectPointerArraySizeType

template<typename TInputImage>
using rtk::TotalVariationImageFilter< TInputImage >::DataObjectPointerArraySizeType = itk::ProcessObject::DataObjectPointerArraySizeType

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

Definition at line 102 of file rtkTotalVariationImageFilter.h.

◆ IndexType

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

Definition at line 72 of file rtkTotalVariationImageFilter.h.

◆ InputImagePointer

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

Image related type alias.

Definition at line 68 of file rtkTotalVariationImageFilter.h.

◆ PixelType

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

Definition at line 73 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 85 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 79 of file rtkTotalVariationImageFilter.h.

◆ RegionType

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

Definition at line 70 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 71 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

Referenced by GetNameOfClass().

◆ ~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< TInputImage >.

◆ 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< TInputImage >.

◆ BeforeThreadedGenerateData()

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

Initialize some accumulators before the threads run.

Reimplemented from itk::ImageSource< TInputImage >.

◆ CreateAnother()

template<typename TInputImage>
virtual::itk::LightObject::Pointer rtk::TotalVariationImageFilter< TInputImage >::CreateAnother ( ) const
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.

◆ EnlargeOutputRequestedRegion()

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

Give the process object a chance to indicate that it will produce more output than it was requested to produce. For example, many imaging filters must compute the entire output at once or can only produce output in complete slices. Such filters cannot handle smaller requested regions. These filters must provide an implementation of this method, setting the output requested region to the size they will produce. By default, a process object does not modify the size of the output requested region.

Reimplemented from itk::ProcessObject.

◆ GenerateInputRequestedRegion()

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

What is the input requested region that is required to produce the output requested region? The base assumption for image processing filters is that the input requested region can be set to match the output requested region. If a filter requires more input (for instance a filter that uses neighborhoods needs more input than output to avoid introducing artificial boundary conditions) or less input (for instance a magnify filter) will have to override this method. In doing so, it should call its superclass' implementation as its first step. Note that imaging filters operate differently than the classes to this point in the class hierarchy. Up till now, the base assumption has been that the largest possible region will be requested of the input.

This implementation of GenerateInputRequestedRegion() only processes the inputs that are a subclass of the ImageBase<InputImageDimension>. If an input is another type of DataObject (including an Image of a different dimension), they are skipped by this method. The subclasses of ImageToImageFilter are responsible for providing an implementation of GenerateInputRequestedRegion() when there are multiple inputs of different types.

See also
ProcessObject::GenerateInputRequestedRegion(), ImageSource::GenerateInputRequestedRegion()

Reimplemented from itk::ImageToImageFilter< TInputImage, TInputImage >.

◆ GetNameOfClass()

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

Runtime information support.

Reimplemented from itk::ImageToImageFilter< TInputImage, TInputImage >.

References TotalVariationImageFilter().

◆ GetTotalVariation()

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

Return the computed Minimum.

Definition at line 90 of file rtkTotalVariationImageFilter.h.

References GetTotalVariationOutput().

◆ GetTotalVariationOutput() [1/2]

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

Referenced by GetTotalVariation().

◆ 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

◆ MakeOutput()

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

Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a SmartPointer to a DataObject. If a subclass of ImageSource has multiple outputs of different types, then that class must provide an implementation of MakeOutput().

Reimplemented from itk::ImageSource< TInputImage >.

◆ 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

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::ImageToImageFilter< TInputImage, TInputImage >.

◆ 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

Referenced by SetUseImageSpacingOff(), and SetUseImageSpacingOn().

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

References SetUseImageSpacing().

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

References SetUseImageSpacing().

◆ 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>
unsigned int rtk::TotalVariationImageFilter< TInputImage >::ImageDimension = TInputImage::ImageDimension
staticconstexpr

Image related type alias.

Definition at line 76 of file rtkTotalVariationImageFilter.h.

◆ m_SumOfSquareRoots

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

Definition at line 168 of file rtkTotalVariationImageFilter.h.

◆ m_UseImageSpacing

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

Definition at line 165 of file rtkTotalVariationImageFilter.h.


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