OTB  9.0.0
Orfeo Toolbox
Public Types | List of all members
otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage > Class Template Reference

#include <otbMeanShiftSmoothingImageFilter.h>

+ Inheritance diagram for otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >:
+ Collaboration diagram for otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef double RealType
 
typedef MeanShiftSmoothingImageFilter Self
 
typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
 
typedef TInputImage InputImageType
 
typedef InputImageType::Pointer InputImagePointerType
 
typedef InputImageType::PixelType InputPixelType
 
typedef InputImageType::IndexType InputIndexType
 
typedef InputImageType::SizeType InputSizeType
 
typedef InputImageType::IndexValueType InputIndexValueType
 
typedef InputImageType::PointType PointType
 
typedef InputImageType::RegionType RegionType
 
typedef InputImageType::SizeType SizeType
 
typedef TOutputImage OutputImageType
 
typedef OutputImageType::Pointer OutputImagePointerType
 
typedef OutputImageType::PixelType OutputPixelType
 
typedef OutputImageType::RegionType OutputRegionType
 
typedef TOutputIterationImage OutputIterationImageType
 
typedef unsigned long LabelType
 
typedef otb::Image< LabelType, InputImageType::ImageDimension > OutputLabelImageType
 
typedef otb::VectorImage< RealType, InputImageType::ImageDimension > OutputSpatialImageType
 
typedef OutputSpatialImageType::Pointer OutputSpatialImagePointerType
 
typedef OutputSpatialImageType::PixelType OutputSpatialPixelType
 
typedef TKernel KernelType
 
typedef itk::VariableLengthVector< RealTypeRealVector
 
typedef otb::VectorImage< RealType, InputImageType::ImageDimension > RealVectorImageType
 
typedef otb::Image< unsigned short, InputImageType::ImageDimension > ModeTableImageType
 
static const unsigned int ImageDimension = InputImageType::ImageDimension
 
RealType m_RangeBandwidth
 
RealType m_RangeBandwidthRamp
 
RealType m_SpatialBandwidth
 
InputSizeType m_SpatialRadius
 
double m_Threshold
 
unsigned int m_MaxIterationNumber
 
KernelType m_Kernel
 
unsigned int m_NumberOfComponentsPerPixel
 
RealVectorImageType::Pointer m_JointImage
 
ModeTableImageType::Pointer m_ModeTable
 
bool m_ModeSearch
 
itk::VariableLengthVector< LabelTypem_NumLabels
 
unsigned int m_ThreadIdNumberOfBits
 
InputIndexType m_GlobalShift
 
virtual const char * GetNameOfClass () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual void SetSpatialBandwidth (RealType _arg)
 
virtual const RealTypeGetSpatialBandwidth () const
 
virtual void SetRangeBandwidth (RealType _arg)
 
virtual const RealTypeGetRangeBandwidth () const
 
virtual void SetRangeBandwidthRamp (RealType _arg)
 
virtual const RealTypeGetRangeBandwidthRamp () const
 
virtual const unsigned int & GetMaxIterationNumber () const
 
virtual void SetMaxIterationNumber (unsigned int _arg)
 
virtual const double & GetThreshold () const
 
virtual void SetThreshold (double _arg)
 
virtual void SetModeSearch (bool _arg)
 
virtual const bool & GetModeSearch () const
 
virtual void SetGlobalShift (InputIndexType _arg)
 
const OutputSpatialImageTypeGetSpatialOutput () const
 
const OutputImageTypeGetRangeOutput () const
 
const OutputIterationImageTypeGetIterationOutput () const
 
const OutputLabelImageTypeGetLabelOutput () const
 
OutputSpatialImageTypeGetSpatialOutput ()
 
OutputImageTypeGetRangeOutput ()
 
OutputIterationImageTypeGetIterationOutput ()
 
OutputLabelImageTypeGetLabelOutput ()
 
static Pointer New ()
 
void GenerateOutputInformation (void) override
 
void GenerateInputRequestedRegion () override
 
void BeforeThreadedGenerateData () override
 
void ThreadedGenerateData (const OutputRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
 
void AfterThreadedGenerateData () override
 
void AllocateOutputs () override
 
 MeanShiftSmoothingImageFilter ()
 
 ~MeanShiftSmoothingImageFilter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void CalculateMeanShiftVector (const typename RealVectorImageType::Pointer inputImagePtr, const RealVector &jointPixel, const OutputRegionType &outputRegion, const RealVector &bandwidth, RealVector &meanShiftVector)
 
 MeanShiftSmoothingImageFilter (const Self &)=delete
 
void operator= (const Self &)=delete
 

Detailed Description

template<class TInputImage, class TOutputImage, class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
class otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >

Mean shift is an edge-preserving smoothing algorithm often used in image processing and segmentation. It will iteratively smooth a given pixel with its neighbors that are within a spatial distance (set using SetSpatialBandwidth()) and within a spectral range (set using SetRangeBandwidth()). The resulting filtered image can be retrieved by GetOutput() or GetRangeOutput(). Parameter SetRangeBandwidthRamp() allows linearly adapting the range bandwidth to the intensity of each channel if set greater than 0 (default value is 0).

There are additional output images, as explained below. Internally, the algorithm will iteratively update a pixel both in position and spectral value, with respect to its neighbors, until convergence to a local mode. The map of the distance traveled by pixels is obtained by GetSpatialOutput(). A map of detected local modes is also available in GetLabelOutput() if mode search is set to true (default set to false) and can be seen as a first segmentation of the input image, although usually highly oversegmented. Finally, GetIterationOutput() will return the number of algorithm iterations for each pixel.

The class template parameter TKernel allows one to choose how pixels in the spatial and spectral neighborhood of a given pixel participate in the smoothed result. By default, a uniform kernel is used (KernelUniform), giving an equal weight to all neighbor pixels. KernelGaussian can also be used, although the computation time is significantly higher. The TKernel class should define operator(), taking a squared norm as parameter and returning a real value between 0 and 1. It should also define GetRadius(), converting the spatial bandwidth parameter to the spatial radius defining how many pixels are in the processing window local to a pixel.

MeanShiftVector squared norm is compared with Threshold (set using Get/Set accessor) to define pixel convergence (1e-3 by default). MaxIterationNumber defines maximum iteration number for each pixel convergence (set using Get/Set accessor). Set to 4 by default. ModeSearch is a boolean value, to choose between optimized and non optimized algorithm. If set to true (by default), assign mode value to each pixel on a path covered in convergence steps.

For more information on mean shift techniques, one might consider reading the following article:

D. Comaniciu, P. Meer, "Mean Shift: A Robust Approach Toward Feature Space Analysis," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603-619, May, 2002 D. Comaniciu, P. Meer, "Robust analysis of feature spaces: color image segmentation," cvpr, p. 750, 1997 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'97), 1997 D. Comaniciu, P. Meer, "Mean Shift Analysis and Applications," iccv, p. 1197, Seventh International Conference on Computer Vision (ICCV'99) - Volume 2, 1999

See also
MeanShiftSegmentationFilter

Definition at line 467 of file otbMeanShiftSmoothingImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef itk::SmartPointer<const Self> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::ConstPointer

Definition at line 474 of file otbMeanShiftSmoothingImageFilter.h.

◆ InputImagePointerType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::InputImagePointerType

Template parameters typedefs

Definition at line 487 of file otbMeanShiftSmoothingImageFilter.h.

◆ InputImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef TInputImage otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::InputImageType

Template parameters typedefs

Definition at line 480 of file otbMeanShiftSmoothingImageFilter.h.

◆ InputIndexType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::IndexType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::InputIndexType

Template parameters typedefs

Definition at line 489 of file otbMeanShiftSmoothingImageFilter.h.

◆ InputIndexValueType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::IndexValueType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::InputIndexValueType

Template parameters typedefs

Definition at line 491 of file otbMeanShiftSmoothingImageFilter.h.

◆ InputPixelType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::PixelType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::InputPixelType

Template parameters typedefs

Definition at line 488 of file otbMeanShiftSmoothingImageFilter.h.

◆ InputSizeType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::SizeType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::InputSizeType

Template parameters typedefs

Definition at line 490 of file otbMeanShiftSmoothingImageFilter.h.

◆ KernelType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef TKernel otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::KernelType

Template parameters typedefs

Definition at line 510 of file otbMeanShiftSmoothingImageFilter.h.

◆ LabelType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef unsigned long otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::LabelType

Template parameters typedefs

Definition at line 503 of file otbMeanShiftSmoothingImageFilter.h.

◆ ModeTableImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef otb::Image<unsigned short, InputImageType::ImageDimension> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::ModeTableImageType

Template parameters typedefs

Definition at line 516 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputImagePointerType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef OutputImageType::Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputImagePointerType

Template parameters typedefs

Definition at line 497 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef TOutputImage otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputImageType

Template parameters typedefs

Definition at line 496 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputIterationImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef TOutputIterationImage otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputIterationImageType

Template parameters typedefs

Definition at line 501 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputLabelImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef otb::Image<LabelType, InputImageType::ImageDimension> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputLabelImageType

Template parameters typedefs

Definition at line 504 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputPixelType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef OutputImageType::PixelType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputPixelType

Template parameters typedefs

Definition at line 498 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputRegionType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef OutputImageType::RegionType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputRegionType

Template parameters typedefs

Definition at line 499 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputSpatialImagePointerType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef OutputSpatialImageType::Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputSpatialImagePointerType

Template parameters typedefs

Definition at line 507 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputSpatialImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef otb::VectorImage<RealType, InputImageType::ImageDimension> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputSpatialImageType

Template parameters typedefs

Definition at line 506 of file otbMeanShiftSmoothingImageFilter.h.

◆ OutputSpatialPixelType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef OutputSpatialImageType::PixelType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputSpatialPixelType

Template parameters typedefs

Definition at line 508 of file otbMeanShiftSmoothingImageFilter.h.

◆ Pointer

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef itk::SmartPointer<Self> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::Pointer

Definition at line 473 of file otbMeanShiftSmoothingImageFilter.h.

◆ PointType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::PointType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::PointType

Template parameters typedefs

Definition at line 492 of file otbMeanShiftSmoothingImageFilter.h.

◆ RealType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef double otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::RealType

Definition at line 475 of file otbMeanShiftSmoothingImageFilter.h.

◆ RealVector

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef itk::VariableLengthVector<RealType> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::RealVector

Template parameters typedefs

Definition at line 514 of file otbMeanShiftSmoothingImageFilter.h.

◆ RealVectorImageType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef otb::VectorImage<RealType, InputImageType::ImageDimension> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::RealVectorImageType

Template parameters typedefs

Definition at line 515 of file otbMeanShiftSmoothingImageFilter.h.

◆ RegionType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::RegionType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::RegionType

Template parameters typedefs

Definition at line 493 of file otbMeanShiftSmoothingImageFilter.h.

◆ Self

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef MeanShiftSmoothingImageFilter otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::Self

Standard class typedef

Definition at line 471 of file otbMeanShiftSmoothingImageFilter.h.

◆ SizeType

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef InputImageType::SizeType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SizeType

Template parameters typedefs

Definition at line 494 of file otbMeanShiftSmoothingImageFilter.h.

◆ Superclass

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
typedef itk::ImageToImageFilter<TInputImage, TOutputImage> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::Superclass

Definition at line 472 of file otbMeanShiftSmoothingImageFilter.h.

Constructor & Destructor Documentation

◆ MeanShiftSmoothingImageFilter() [1/2]

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::MeanShiftSmoothingImageFilter
protected

◆ ~MeanShiftSmoothingImageFilter()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::~MeanShiftSmoothingImageFilter
overrideprotected

Destructor

Definition at line 65 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ MeanShiftSmoothingImageFilter() [2/2]

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::MeanShiftSmoothingImageFilter ( const Self )
privatedelete

Template parameters typedefs

Member Function Documentation

◆ AfterThreadedGenerateData()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::AfterThreadedGenerateData
overrideprotected

Template parameters typedefs

Definition at line 771 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ AllocateOutputs()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::AllocateOutputs
overrideprotected

Allocates the outputs (need to be reimplemented since outputs have different type)

Definition at line 126 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ BeforeThreadedGenerateData()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::BeforeThreadedGenerateData
overrideprotected

Template parameters typedefs

Definition at line 222 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ CalculateMeanShiftVector()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::CalculateMeanShiftVector ( const typename RealVectorImageType::Pointer  inputImagePtr,
const RealVector jointPixel,
const OutputRegionType outputRegion,
const RealVector bandwidth,
RealVector meanShiftVector 
)
protectedvirtual

◆ CreateAnother()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual::itk::LightObject::Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::CreateAnother ( void  ) const

Template parameters typedefs

◆ GenerateInputRequestedRegion()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GenerateInputRequestedRegion
overrideprotected

Template parameters typedefs

Definition at line 164 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ GenerateOutputInformation()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GenerateOutputInformation ( void  )
overrideprotected

GenerateOutputInformation Define output pixel size

Definition at line 147 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ GetIterationOutput() [1/2]

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
OutputIterationImageType* otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetIterationOutput ( )

Returns the number of iterations done at each pixel

◆ GetIterationOutput() [2/2]

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
const MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputIterationImageType * otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetIterationOutput

Returns the const number of iterations map.

Definition at line 99 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ GetLabelOutput() [1/2]

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
OutputLabelImageType* otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetLabelOutput ( )

Returns the image of region labels. This output does not have sense without mode search optimization (each label codes for one mode)

◆ GetLabelOutput() [2/2]

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
const MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputLabelImageType * otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetLabelOutput

Returns the const image of region labels. This output does not have sense without mode search optimization (each label codes for one mode)

Definition at line 113 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ GetMaxIterationNumber()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const unsigned int& otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetMaxIterationNumber ( ) const
virtual

Sets the maximum number of algorithm iterations

◆ GetModeSearch()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const bool& otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetModeSearch ( ) const
virtual

Template parameters typedefs

◆ GetNameOfClass()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const char* otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetNameOfClass ( ) const
virtual

Type macro

◆ GetRangeBandwidth()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const RealType& otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetRangeBandwidth ( ) const
virtual

Template parameters typedefs

◆ GetRangeBandwidthRamp()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const RealType& otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetRangeBandwidthRamp ( ) const
virtual

Template parameters typedefs

◆ GetRangeOutput() [1/2]

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
OutputImageType* otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetRangeOutput ( )

Returns the spectral image output

◆ GetRangeOutput() [2/2]

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputImageType * otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetRangeOutput

Returns the const spectral image output

Definition at line 85 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ GetSpatialBandwidth()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const RealType& otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetSpatialBandwidth ( ) const
virtual

Template parameters typedefs

◆ GetSpatialOutput() [1/2]

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
OutputSpatialImageType* otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetSpatialOutput ( )

Returns the spatial image output,spatial image output is a displacement map (pixel position after convergence minus pixel index)

◆ GetSpatialOutput() [2/2]

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::OutputSpatialImageType * otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetSpatialOutput

Returns the const spatial image output,spatial image output is a displacement map (pixel position after convergence minus pixel index)

Definition at line 71 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ GetThreshold()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual const double& otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::GetThreshold ( ) const
virtual

Sets the threshold value for the mean shift vector's squared norm, under which convergence is assumed

◆ New()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
static Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::New ( )
static

Template parameters typedefs

◆ operator=()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::operator= ( const Self )
privatedelete

Template parameters typedefs

◆ PrintSelf()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

PrintSelf method

Definition at line 817 of file otbMeanShiftSmoothingImageFilter.hxx.

◆ SetGlobalShift()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetGlobalShift ( InputIndexType  _arg)
virtual

Global shift allows tackling down numerical instabilities by aligning pixel indices when performing tile processing

◆ SetMaxIterationNumber()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetMaxIterationNumber ( unsigned int  _arg)
virtual

Template parameters typedefs

◆ SetModeSearch()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetModeSearch ( bool  _arg)
virtual

Toggle mode search, which is enabled by default. When off, the output label image is not available Be careful, with this option, the result will slightly depend on thread number.

◆ SetRangeBandwidth()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetRangeBandwidth ( RealType  _arg)
virtual

Sets the spectral bandwidth (or radius for a uniform kernel) for pixels to be included in the same mode

◆ SetRangeBandwidthRamp()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetRangeBandwidthRamp ( RealType  _arg)
virtual

Sets the range bandwidth ramp. If > 0, the range bandwidth will be y = RangeBandwidthRamp * x + RangeBandwidth, where x is the band value.

◆ SetSpatialBandwidth()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetSpatialBandwidth ( RealType  _arg)
virtual

Sets the spatial bandwidth (or radius in the case of a uniform kernel) of the neighborhood for each pixel

◆ SetThreshold()

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
virtual void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::SetThreshold ( double  _arg)
virtual

Template parameters typedefs

◆ ThreadedGenerateData()

template<class TInputImage , class TOutputImage , class TKernel , class TOutputIterationImage >
void otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::ThreadedGenerateData ( const OutputRegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
overrideprotected

MeanShiftFilter 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"

See also
ImageToImageFilter::ThreadedGenerateData(), ImageToImageFilter::GenerateData()

Definition at line 533 of file otbMeanShiftSmoothingImageFilter.hxx.

Member Data Documentation

◆ ImageDimension

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
const unsigned int otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::ImageDimension = InputImageType::ImageDimension
static

Template parameters typedefs

Definition at line 512 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_GlobalShift

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
InputIndexType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_GlobalShift
private

◆ m_JointImage

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
RealVectorImageType::Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_JointImage
private

Input data in the joint spatial-range domain, scaled by the bandwidths

Definition at line 668 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_Kernel

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
KernelType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_Kernel
private

Kernel object, implementing operator() which returns a weight between 0 and 1 depending on the squared norm given in parameter

Definition at line 662 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_MaxIterationNumber

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
unsigned int otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_MaxIterationNumber
private

Maximum number of iterations

Definition at line 658 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_ModeSearch

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
bool otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_ModeSearch
private

Boolean to enable mode search

Definition at line 679 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_ModeTable

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
ModeTableImageType::Pointer otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_ModeTable
private

Image to store the status at each pixel: 0 : no mode has been found yet 1 : a mode has been assigned to this pixel 2 : pixel is in the path of the currently processed pixel and a mode will be assigned to it

Definition at line 676 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_NumberOfComponentsPerPixel

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
unsigned int otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_NumberOfComponentsPerPixel
private

Number of components per pixel in the input image

Definition at line 665 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_NumLabels

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
itk::VariableLengthVector<LabelType> otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_NumLabels
private

Mode counters (local to each thread)

Definition at line 687 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_RangeBandwidth

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
RealType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_RangeBandwidth
private

Range bandwidth

Definition at line 643 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_RangeBandwidthRamp

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
RealType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_RangeBandwidthRamp
private

Coefficient

Definition at line 646 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_SpatialBandwidth

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
RealType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_SpatialBandwidth
private

Spatial bandwidth

Definition at line 649 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_SpatialRadius

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
InputSizeType otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_SpatialRadius
private

Radius of pixel neighborhood, determined by the kernel from the spatial bandwidth

Definition at line 652 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_ThreadIdNumberOfBits

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
unsigned int otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_ThreadIdNumberOfBits
private

Number of bits used to represent the threadId in the most significant bits of labels

Definition at line 691 of file otbMeanShiftSmoothingImageFilter.h.

◆ m_Threshold

template<class TInputImage , class TOutputImage , class TKernel = Meanshift::KernelUniform, class TOutputIterationImage = otb::Image<unsigned int, TInputImage::ImageDimension>>
double otb::MeanShiftSmoothingImageFilter< TInputImage, TOutputImage, TKernel, TOutputIterationImage >::m_Threshold
private

Threshold on the squared norm of the mean shift vector to decide when to stop iterating

Definition at line 655 of file otbMeanShiftSmoothingImageFilter.h.


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