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

This filter performs a segmentation of the details supFilter and infFilter extracted with the morphological pyramid. More...

#include <otbMorphologicalPyramidSegmentationFilter.h>

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

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef InputImageListType::Pointer InputImageListPointerType
 
typedef
Superclass::InputImageListType 
InputImageListType
 
typedef InputImageType::Pointer InputImagePointerType
 
typedef Superclass::InputImageType InputImageType
 
typedef InputImageType::PixelType InputPixelType
 
typedef std::vector
< OutputPixelType
NumberOfObjectsVectorType
 
typedef
OutputImageListType::Iterator 
OutputImageListIteratorType
 
typedef
OutputImageListType::Pointer 
OutputImageListPointerType
 
typedef
Superclass::OutputImageListType 
OutputImageListType
 
typedef
Superclass::OutputImagePointerType 
OutputImagePointerType
 
typedef Superclass::OutputImageType OutputImageType
 
typedef OutputImageType::PixelType OutputPixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef
MorphologicalPyramidSegmentationFilter 
Self
 
typedef
ImageListToImageListFilter
< TInputImage, TOutputImage > 
Superclass
 
- Public Types inherited from otb::ImageListToImageListFilter< TInputImage, TOutputImage >
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
InputImageListType::ConstPointer 
InputImageListConstPointer
 
typedef InputImageListType::Pointer InputImageListPointerType
 
typedef ImageList< InputImageTypeInputImageListType
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef
InputImageType::ConstPointer 
InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef
Superclass::OutputImageListPointerType 
OutputImageListPointerType
 
typedef
Superclass::OutputImageListType 
OutputImageListType
 
typedef
Superclass::OutputImagePointerType 
OutputImagePointer
 
typedef Superclass::OutputImageType OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ImageListToImageListFilter Self
 
typedef InputImageType::SizeType SizeType
 
typedef ImageListSource
< TOutputImage > 
Superclass
 
typedef InputImageType::ValueType ValueType
 
- Public Types inherited from otb::ImageListSource< TOutputImage >
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::DataObject::Pointer DataObjectPointer
 
typedef
OutputImageListType::ConstPointer 
OutputImageListConstPointerType
 
typedef
OutputImageListType::Pointer 
OutputImageListPointerType
 
typedef ImageList
< OutputImageType
OutputImageListType
 
typedef OutputImageType::Pointer OutputImagePointerType
 
typedef TOutputImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ImageListSource Self
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
InputImageListTypeGetBrighterDetails (void)
 
virtual double GetConnectedThresholdQuantile ()
 
InputImageListTypeGetDarkerDetails (void)
 
virtual unsigned long GetMinimumObjectSize ()
 
virtual const char * GetNameOfClass () const
 
NumberOfObjectsVectorType GetNumberOfObjectsVector (void)
 
InputImageTypeGetReferenceImage (void)
 
virtual double GetSeedsQuantile ()
 
void SetBrighterDetails (InputImageListType *imageList)
 
virtual void SetConnectedThresholdQuantile (double _arg)
 
void SetDarkerDetails (InputImageListType *imageList)
 
virtual void SetMinimumObjectSize (unsigned long _arg)
 
void SetReferenceImage (InputImageType *image)
 
virtual void SetSeedsQuantile (double _arg)
 
- Public Member Functions inherited from otb::ImageListToImageListFilter< TInputImage, TOutputImage >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual InputImageListTypeGetInput (void)
 
virtual void SetInput (const InputImageListType *imageList)
 
- Public Member Functions inherited from otb::ImageListSource< TOutputImage >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual OutputImageListTypeGetOutput (void)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::ImageListToImageListFilter< TInputImage, TOutputImage >
static Pointer New ()
 
- Static Public Member Functions inherited from otb::ImageListSource< TOutputImage >
static Pointer New ()
 

Static Public Attributes

static const unsigned int InputImageDimension = TInputImage::ImageDimension
 
- Static Public Attributes inherited from otb::ImageListToImageListFilter< TInputImage, TOutputImage >
static const unsigned int InputImageDimension = TInputImage::ImageDimension
 

Protected Member Functions

 MorphologicalPyramidSegmentationFilter ()
 
virtual ~MorphologicalPyramidSegmentationFilter ()
 
virtual void GenerateData ()
 
virtual void GenerateOutputInformation ()
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 
- Protected Member Functions inherited from otb::ImageListToImageListFilter< TInputImage, TOutputImage >
 ImageListToImageListFilter ()
 
virtual ~ImageListToImageListFilter ()
 
- Protected Member Functions inherited from otb::ImageListSource< TOutputImage >
 ImageListSource ()
 
virtual ~ImageListSource ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 

Private Attributes

double m_ConnectedThresholdQuantile
 
unsigned long m_MinimumObjectSize
 
NumberOfObjectsVectorType m_NumberOfObjectsVector
 
double m_SeedsQuantile
 

Detailed Description

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

This filter performs a segmentation of the details supFilter and infFilter extracted with the morphological pyramid.

The first step is to convert the multi-resolution analysis from the pyramid to a multi-scale one using the MRToMSConverter filter.

The segmentation algorithm used is based on seeds extraction using the ImageToPointSetFilter, followed by a connected threshold segmentation using the ConnectedThresholdImageFilter. A final relabelling step is done with the LabelImageFilter adn RelabelImageFilter to remove object whose sizes are to small regarding the MinimumObjectSize parameter. The threshold for seeds extraction and segmentation are computed using quantiles.

A pre processing step is applied by multiplying the full resolution brighter details (resp. darker details) with the original image (resp. the inverted original image). This perfoms an enhancement of the regions contour precision.

The details from the pyramid are set via the SetBrighterDetails() and SetDarkerDetails() methods. The brighter and darker details depends on the filter used in the pyramid analysis. If the OpeningClosing filter is used, then the brighter details are those from the supFilter image list, whereas if the ClosingOpening filter is used, the brighter details are those from the infFilter list.

The output of the segmentation filter is a single segmentation images list, containing first the brighter details segmentation from higher scale to lower, and then the darker details in the same order. The attention of the used is drawn to the fact that since the label filter used internally will deal with a large number of labels, so the OutputPixelType is required to be sufficiently precise. Unsigned short or Unsigned long would be a good choice, unless the user has a very good reason to think that a less precise type will be sufficient.

See Also
MorphologicalPyramidSynthesisFilter, OpeningClosingMorphologicalFilter, ClosingOpeningMorphologicalFilter, Segmenter, MRToMSConverter, Resampler

Definition at line 56 of file otbMorphologicalPyramidSegmentationFilter.h.

Member Typedef Documentation

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

Definition at line 64 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef InputImageListType::Pointer otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageListPointerType

Definition at line 83 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::InputImageListType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageListType

Definition at line 82 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef InputImageType::Pointer otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImagePointerType

Definition at line 81 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::InputImageType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageType

Input related typedefs

Definition at line 79 of file otbMorphologicalPyramidSegmentationFilter.h.

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

Definition at line 80 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef std::vector<OutputPixelType> otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::NumberOfObjectsVectorType

Vector of number of objects

Definition at line 85 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef OutputImageListType::Iterator otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::OutputImageListIteratorType

Definition at line 77 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef OutputImageListType::Pointer otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::OutputImageListPointerType

Definition at line 75 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::OutputImageListType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::OutputImageListType

Definition at line 74 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::OutputImagePointerType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::OutputImagePointerType

Definition at line 76 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::OutputImageType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::OutputImageType

Output related typedefs

Definition at line 72 of file otbMorphologicalPyramidSegmentationFilter.h.

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

Definition at line 73 of file otbMorphologicalPyramidSegmentationFilter.h.

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

Definition at line 63 of file otbMorphologicalPyramidSegmentationFilter.h.

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

Standard typedefs

Definition at line 61 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
typedef ImageListToImageListFilter<TInputImage, TOutputImage> otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::Superclass

Definition at line 62 of file otbMorphologicalPyramidSegmentationFilter.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 34 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage , class TOutputImage >
otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::~MorphologicalPyramidSegmentationFilter ( )
protectedvirtual

Destructor

Definition at line 46 of file otbMorphologicalPyramidSegmentationFilter.txx.

Member Function Documentation

template<class TInputImage, class TOutputImage>
virtual::itk::LightObject::Pointer otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::CreateAnother ( void  ) const
template<class TInputImage , class TOutputImage >
void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GenerateData ( void  )
protectedvirtual

Main computation method

Definition at line 140 of file otbMorphologicalPyramidSegmentationFilter.txx.

References otbMsgDevMacro.

template<class TInputImage, class TOutputImage>
virtual void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GenerateOutputInformation ( void  )
inlineprotectedvirtual

Definition at line 140 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage , class TOutputImage >
MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageListType * otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetBrighterDetails ( void  )

Get the brighter details from the pyramid. The brighter details are the supFilter or infFilter details from the pyramid, depending on the morphological filter used.

Returns
The brighter details extracted from the resampling operation.

Get the brighter details from the pyramid. The brighter details are the supFilter or infFilter details from the pyramid, depending on the morphological filter used.

Parameters
imageListThe brighter details extracted from the filtering operation.

Definition at line 104 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage, class TOutputImage>
virtual double otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetConnectedThresholdQuantile ( )
virtual
template<class TInputImage , class TOutputImage >
MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageListType * otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetDarkerDetails ( void  )

Get the darker details from the pyramid. The darker details are the supFilter or infFilter details from the pyramid, depending on the morphological filter used.

Returns
The darker details extracted from the resampling operation.

Definition at line 117 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage, class TOutputImage>
virtual unsigned long otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetMinimumObjectSize ( )
virtual
template<class TInputImage, class TOutputImage>
virtual const char* otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetNameOfClass ( ) const
virtual
template<class TInputImage , class TOutputImage >
MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::NumberOfObjectsVectorType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetNumberOfObjectsVector ( void  )

Get a vector containing the number of segmented objects for each image.

Returns
The vector.

Definition at line 130 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage , class TOutputImage >
MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageType * otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetReferenceImage ( void  )

Get the reference image

Returns
The reference image.

Definition at line 91 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage, class TOutputImage>
virtual double otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::GetSeedsQuantile ( )
virtual
template<class TInputImage, class TOutputImage>
static Pointer otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::New ( )
static

Creation through object factory macro

template<class TInputImage , class TOutputImage >
void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

Printself method

PrintSelf method

Reimplemented from otb::ImageListToImageListFilter< TInputImage, TOutputImage >.

Definition at line 203 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage , class TOutputImage >
void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::SetBrighterDetails ( InputImageListType imageList)

Set the brighter details from the pyramid. The brighter details are the supFilter or infFilter details from the pyramid, depending on the morphological filter used.

Parameters
imageListThe brighter details extracted from the filtering operation.

Definition at line 67 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage, class TOutputImage>
virtual void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::SetConnectedThresholdQuantile ( double  _arg)
virtual

Quantile for connected thresholding

template<class TInputImage , class TOutputImage >
void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::SetDarkerDetails ( InputImageListType imageList)

Set the darker details from the pyramid. The darker details are the supFilter or infFilter details from the pyramid, depending on the morphological filter used.

Parameters
imageListThe darker details extracted from the filtering operation.

Definition at line 79 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage, class TOutputImage>
virtual void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::SetMinimumObjectSize ( unsigned long  _arg)
virtual

Min object size parameter accessor

template<class TInputImage , class TOutputImage >
void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::SetReferenceImage ( InputImageType image)

Set the reference image.

Parameters
imageThe reference image which was decomposed by the pyramid.

Definition at line 55 of file otbMorphologicalPyramidSegmentationFilter.txx.

template<class TInputImage, class TOutputImage>
virtual void otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::SetSeedsQuantile ( double  _arg)
virtual

Quantile for seeds extraction

Member Data Documentation

template<class TInputImage, class TOutputImage>
const unsigned int otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::InputImageDimension = TInputImage::ImageDimension
static

Input image dimension constant macro

Definition at line 70 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
double otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::m_ConnectedThresholdQuantile
private

Quantile to set the connectedThresholdFilter threshold

Definition at line 150 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
unsigned long otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::m_MinimumObjectSize
private

Definition at line 146 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
NumberOfObjectsVectorType otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::m_NumberOfObjectsVector
private

Number of segmented objects per images

Definition at line 152 of file otbMorphologicalPyramidSegmentationFilter.h.

template<class TInputImage, class TOutputImage>
double otb::MorphologicalPyramidSegmentationFilter< TInputImage, TOutputImage >::m_SeedsQuantile
private

Quantile for seeds determination

Definition at line 148 of file otbMorphologicalPyramidSegmentationFilter.h.


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