SimpleITK  1.3.0.dev466
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::LabelVotingImageFilter Class Reference

This filter performs pixelwise voting among an arbitrary number of input images, where each of them represents a segmentation of the same scene (i.e., image). More...

#include <sitkLabelVotingImageFilter.h>

+ Inheritance diagram for itk::simple::LabelVotingImageFilter:
+ Collaboration diagram for itk::simple::LabelVotingImageFilter:

Public Types

typedef typelist::MakeTypeList< BasicPixelID< uint8_t >, BasicPixelID< uint16_t >, BasicPixelID< uint32_t >, BasicPixelID< uint64_t > >::Type PixelIDTypeList
 
typedef LabelVotingImageFilter Self
 
- Public Types inherited from itk::simple::ImageFilter< 3 >
typedef ImageFilter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

Image Execute (const std::vector< Image > &images)
 
Image Execute (const Image &image1)
 
Image Execute (const Image &image1, const Image &image2)
 
Image Execute (const Image &image1, const Image &image2, const Image &image3)
 
Image Execute (const Image &image1, const Image &image2, const Image &image3, const Image &image4)
 
Image Execute (const Image &image1, const Image &image2, const Image &image3, const Image &image4, const Image &image5)
 
Image Execute (const std::vector< Image > &images, uint64_t labelForUndecidedPixels)
 
Image Execute (const Image &image1, uint64_t labelForUndecidedPixels)
 
Image Execute (const Image &image1, const Image &image2, uint64_t labelForUndecidedPixels)
 
Image Execute (const Image &image1, const Image &image2, const Image &image3, uint64_t labelForUndecidedPixels)
 
Image Execute (const Image &image1, const Image &image2, const Image &image3, const Image &image4, uint64_t labelForUndecidedPixels)
 
Image Execute (const Image &image1, const Image &image2, const Image &image3, const Image &image4, const Image &image5, uint64_t labelForUndecidedPixels)
 
uint64_t GetLabelForUndecidedPixels () const
 
std::string GetName () const
 
 LabelVotingImageFilter ()
 
SelfSetLabelForUndecidedPixels (uint64_t LabelForUndecidedPixels)
 
std::string ToString () const
 
virtual ~LabelVotingImageFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter< 3 >
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef Image(Self::* MemberFunctionType) (const std::vector< Image > &)
 

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const std::vector< Image > &images)
 

Private Attributes

uint64_t m_LabelForUndecidedPixels
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 3 >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

This filter performs pixelwise voting among an arbitrary number of input images, where each of them represents a segmentation of the same scene (i.e., image).

Label voting is a simple method of classifier combination applied to image segmentation. Typically, the accuracy of the combined segmentation exceeds the accuracy of any of the input segmentations. Voting is therefore commonly used as a way of boosting segmentation performance.

The use of label voting for combination of multiple segmentations is described in

T. Rohlfing and C. R. Maurer, Jr., "Multi-classifier framework for atlas-based image segmentation," Pattern Recognition Letters, 2005.

INPUTS
All input volumes to this filter must be segmentations of an image, that is, they must have discrete pixel values where each value represents a different segmented object.

Input volumes must all contain the same size RequestedRegions. Not all input images must contain all possible labels, but all label values must have the same meaning in all images.

OUTPUTS
The voting filter produces a single output volume. Each output pixel contains the label that occurred most often among the labels assigned to this pixel in all the input volumes, that is, the label that received the maximum number of "votes" from the input pixels.. If the maximum number of votes is not unique, i.e., if more than one label have a maximum number of votes, an "undecided" label is assigned to that output pixel.

By default, the label used for undecided pixels is the maximum label value used in the input images plus one. Since it is possible for an image with 8 bit pixel values to use all 256 possible label values, it is permissible to combine 8 bit (i.e., byte) images into a 16 bit (i.e., short) output image.

PARAMETERS
The label used for "undecided" labels can be set using SetLabelForUndecidedPixels. This functionality can be unset by calling UnsetLabelForUndecidedPixels.
Author
Torsten Rohlfing, SRI International, Neuroscience Program
See also
itk::simple::LabelVoting for the procedural interface

Definition at line 63 of file sitkLabelVotingImageFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::LabelVotingImageFilter::MemberFunctionType) (const std::vector< Image > &)
private

Setup for member function dispatching

Definition at line 123 of file sitkLabelVotingImageFilter.h.

Define the pixels types supported by this filter

Definition at line 78 of file sitkLabelVotingImageFilter.h.

Definition at line 67 of file sitkLabelVotingImageFilter.h.

Constructor & Destructor Documentation

virtual itk::simple::LabelVotingImageFilter::~LabelVotingImageFilter ( )
virtual

Destructor

itk::simple::LabelVotingImageFilter::LabelVotingImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

Image itk::simple::LabelVotingImageFilter::Execute ( const std::vector< Image > &  images)

Execute the filter on the input images

Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
const Image image3 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
const Image image3,
const Image image4 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
const Image image3,
const Image image4,
const Image image5 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const std::vector< Image > &  images,
uint64_t  labelForUndecidedPixels 
)

Execute the filter on the input images with the given parameters

Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
uint64_t  labelForUndecidedPixels 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
uint64_t  labelForUndecidedPixels 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
const Image image3,
uint64_t  labelForUndecidedPixels 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
const Image image3,
const Image image4,
uint64_t  labelForUndecidedPixels 
)
Image itk::simple::LabelVotingImageFilter::Execute ( const Image image1,
const Image image2,
const Image image3,
const Image image4,
const Image image5,
uint64_t  labelForUndecidedPixels 
)
template<class TImageType >
Image itk::simple::LabelVotingImageFilter::ExecuteInternal ( const std::vector< Image > &  images)
private
uint64_t itk::simple::LabelVotingImageFilter::GetLabelForUndecidedPixels ( ) const
inline

Get label value used for undecided pixels. After updating the filter, this function returns the actual label value used for undecided pixels in the current output. Note that this value is overwritten when SetLabelForUndecidedPixels is called and the new value only becomes effective upon the next filter update.

Definition at line 91 of file sitkLabelVotingImageFilter.h.

std::string itk::simple::LabelVotingImageFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 93 of file sitkLabelVotingImageFilter.h.

Self& itk::simple::LabelVotingImageFilter::SetLabelForUndecidedPixels ( uint64_t  LabelForUndecidedPixels)
inline

Set label value for undecided pixels.

Definition at line 86 of file sitkLabelVotingImageFilter.h.

std::string itk::simple::LabelVotingImageFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

Definition at line 128 of file sitkLabelVotingImageFilter.h.

Member Data Documentation

uint64_t itk::simple::LabelVotingImageFilter::m_LabelForUndecidedPixels
private

Definition at line 133 of file sitkLabelVotingImageFilter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::LabelVotingImageFilter::m_MemberFactory
private

Definition at line 130 of file sitkLabelVotingImageFilter.h.


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