Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage > Class Template Reference

This filter implements the computation of the spectral angle distance with respect to a reference pixel. More...

#include <otbSpectralAngleDistanceImageFilter.h>

+ Inheritance diagram for otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >:
+ Collaboration diagram for otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
InputImageType::ConstPointer 
InputImageConstPointerType
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef InputImageType::PixelType InputPixelType
 
typedef OutputImageType::Pointer OutputImagePointerType
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TOutputImage OutputImageType
 
typedef OutputImageType::PixelType OutputPixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef
SpectralAngleDistanceImageFilter 
Self
 
typedef
itk::ImageToImageFilter
< TInputImage, TOutputImage > 
Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual const InputPixelTypeGetReferencePixel ()
 
virtual void SetReferencePixel (InputPixelType _arg)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageSource< TOutputImage >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter (void)
 

Protected Member Functions

 SpectralAngleDistanceImageFilter ()
 
virtual ~SpectralAngleDistanceImageFilter ()
 
void BeforeThreadedGenerateData ()
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
 

Private Member Functions

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

Private Attributes

InputPixelType m_ReferencePixel
 

Detailed Description

template<class TInputImage, class TOutputImage>
class otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >

This filter implements the computation of the spectral angle distance with respect to a reference pixel.

Spectral angle distance is an efficient way to convert spectral information to scalar data with respect to a reference pixel. The spectral angle distance is defined as:

\[SA = cos^{-1}\Big(\frac{{\sum_{b=1}^{n_{b}}}r(b)\cdot p(b)}{\sqrt{{\sum_{b=1}^{n_{b}}}r(b)^{2}{\sum_{b=1}^{n_{b}}p(b)^{2}}}}\Big) \]

with \(b\) being the spectral band, \(r\) the reference pixel and \(p\) the current pixel.

Since the spectral angle deals with multi-bands image, the InputImage pixels are suposed to support the [] operator, and the input image to support the GetNumberOfComponentsPerPixel() method.

See Also
VectorImage

This filter is implemented as a multithreaded filter.

Examples:
FeatureExtraction/ExtractRoadByStepsExample.cxx.

Definition at line 49 of file otbSpectralAngleDistanceImageFilter.h.

Member Typedef Documentation

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<const Self> otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::ConstPointer

Definition at line 57 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef InputImageType::ConstPointer otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::InputImageConstPointerType

Definition at line 67 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef InputImageType::RegionType otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::InputImageRegionType

Definition at line 68 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef TInputImage otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::InputImageType

Template parameters typedefs

Definition at line 63 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef InputImageType::PixelType otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::InputPixelType

Definition at line 69 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef OutputImageType::Pointer otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::OutputImagePointerType

Definition at line 71 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef OutputImageType::RegionType otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::OutputImageRegionType

Definition at line 72 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef TOutputImage otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::OutputImageType

Definition at line 70 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef OutputImageType::PixelType otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::OutputPixelType

Definition at line 73 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef itk::SmartPointer<Self> otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::Pointer

Definition at line 56 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef SpectralAngleDistanceImageFilter otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::Self

Standard typedefs

Definition at line 54 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
typedef itk::ImageToImageFilter<TInputImage, TOutputImage> otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::Superclass

Definition at line 55 of file otbSpectralAngleDistanceImageFilter.h.

Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage >
otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::SpectralAngleDistanceImageFilter ( )
protected

Constructor

Definition at line 35 of file otbSpectralAngleDistanceImageFilter.txx.

template<class TInputImage , class TOutputImage >
virtual otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::~SpectralAngleDistanceImageFilter ( )
inlineprotectedvirtual

Destructor

Definition at line 82 of file otbSpectralAngleDistanceImageFilter.h.

template<class TInputImage , class TOutputImage >
otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::SpectralAngleDistanceImageFilter ( const Self )
private

Member Function Documentation

template<class TInputImage , class TOutputImage >
void otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData ( void  )
protected

Definition at line 43 of file otbSpectralAngleDistanceImageFilter.txx.

template<class TInputImage , class TOutputImage >
virtual::itk::LightObject::Pointer otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::CreateAnother ( void  ) const
template<class TInputImage , class TOutputImage >
virtual const char* otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual

Creation through object factory macro

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage , class TOutputImage >
virtual const InputPixelType& otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::GetReferencePixel ( )
virtual

Get/Set the reference pixel

template<class TInputImage , class TOutputImage >
static Pointer otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::New ( )
static

Type macro

template<class TInputImage , class TOutputImage >
void otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::operator= ( const Self )
private
template<class TInputImage , class TOutputImage >
void otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

PrintSelf method

PrintSelf Method

Definition at line 128 of file otbSpectralAngleDistanceImageFilter.txx.

template<class TInputImage , class TOutputImage >
virtual void otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::SetReferencePixel ( InputPixelType  _arg)
virtual
template<class TInputImage , class TOutputImage >
void otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
itk::ThreadIdType  threadId 
)
protected

SpectralAngleDistanceImageFilter 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 54 of file otbSpectralAngleDistanceImageFilter.txx.

References itk::ImageConstIterator< TImage >::Get(), itk::ImageRegionConstIterator< TImage >::GoToBegin(), itk::ImageConstIterator< TImage >::IsAtEnd(), and itk::ImageRegionIterator< TImage >::Set().

Member Data Documentation

template<class TInputImage , class TOutputImage >
InputPixelType otb::SpectralAngleDistanceImageFilter< TInputImage, TOutputImage >::m_ReferencePixel
private

The reference pixel

Definition at line 105 of file otbSpectralAngleDistanceImageFilter.h.


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