SimpleITK
1.0.1
|
Segment pixels with similar statistics using connectivity. More...
#include <sitkConfidenceConnectedImageFilter.h>
Public Types | |
typedef BasicPixelIDTypeList | PixelIDTypeList |
typedef ConfidenceConnectedImageFilter | Self |
![]() | |
typedef ImageFilter | Self |
![]() | |
typedef ProcessObject | Self |
Public Member Functions | |
Self & | AddSeed (const std::vector< unsigned int > &idx) |
Self & | ClearSeeds () |
ConfidenceConnectedImageFilter () | |
Image | Execute (const Image &image1) |
Image | Execute (const Image &image1, const std::vector< std::vector< unsigned int > > &seedList, unsigned int numberOfIterations, double multiplier, unsigned int initialNeighborhoodRadius, uint8_t replaceValue) |
unsigned int | GetInitialNeighborhoodRadius () const |
double | GetMean () const |
double | GetMultiplier () const |
std::string | GetName () const |
unsigned int | GetNumberOfIterations () const |
uint8_t | GetReplaceValue () const |
std::vector< std::vector< unsigned int > > | GetSeedList () const |
double | GetVariance () const |
Self & | SetInitialNeighborhoodRadius (unsigned int InitialNeighborhoodRadius) |
Self & | SetMultiplier (double Multiplier) |
Self & | SetNumberOfIterations (unsigned int NumberOfIterations) |
Self & | SetReplaceValue (uint8_t ReplaceValue) |
Self & | SetSeed (const std::vector< unsigned int > &idx) |
Self & | SetSeedList (const std::vector< std::vector< unsigned int > > &t) |
std::string | ToString () const |
~ConfidenceConnectedImageFilter () | |
![]() | |
ImageFilter () | |
virtual | ~ImageFilter ()=0 |
![]() | |
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 Image &image1) |
Private Member Functions | |
template<class TImageType > | |
Image | ExecuteInternal (const Image &image1) |
Private Attributes | |
unsigned int | m_InitialNeighborhoodRadius |
double | m_Mean |
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
double | m_Multiplier |
unsigned int | m_NumberOfIterations |
uint8_t | m_ReplaceValue |
std::vector< std::vector< unsigned int > > | m_SeedList |
double | m_Variance |
Friends | |
struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) throw () |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
![]() | |
NonCopyable () | |
![]() | |
static void | FixNonZeroIndex (TImageType *img) |
![]() | |
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::EventObject & | GetITKEventObject (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) |
Segment pixels with similar statistics using connectivity.
This filter extracts a connected set of pixels whose pixel intensities are consistent with the pixel statistics of a seed point. The mean and variance across a neighborhood (8-connected, 26-connected, etc.) are calculated for a seed point. Then pixels connected to this seed point whose values are within the confidence interval for the seed point are grouped. The width of the confidence interval is controlled by the "Multiplier" variable (the confidence interval is the mean plus or minus the "Multiplier" times the standard deviation). If the intensity variations across a segment were gaussian, a "Multiplier" setting of 2.5 would define a confidence interval wide enough to capture 99% of samples in the segment.
After this initial segmentation is calculated, the mean and variance are re-calculated. All the pixels in the previous segmentation are used to calculate the mean the standard deviation (as opposed to using the pixels in the neighborhood of the seed point). The segmentation is then recalculated using these refined estimates for the mean and variance of the pixel values. This process is repeated for the specified number of iterations. Setting the "NumberOfIterations" to zero stops the algorithm after the initial segmentation from the seed point.
NOTE: the lower and upper threshold are restricted to lie within the valid numeric limits of the input data pixel type. Also, the limits may be adjusted to contain the seed point's intensity.
Definition at line 52 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Setup for member function dispatching
Definition at line 175 of file sitkConfidenceConnectedImageFilter.h.
Define the pixels types supported by this filter
Definition at line 64 of file sitkConfidenceConnectedImageFilter.h.
Definition at line 54 of file sitkConfidenceConnectedImageFilter.h.
itk::simple::ConfidenceConnectedImageFilter::ConfidenceConnectedImageFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
itk::simple::ConfidenceConnectedImageFilter::~ConfidenceConnectedImageFilter | ( | ) |
Destructor
|
inline |
AddSeed - Add a seed to the end of the list
Definition at line 151 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
ClearSeeds - Clear out all seeds in the list
Definition at line 136 of file sitkConfidenceConnectedImageFilter.h.
Execute the filter on the input image
Image itk::simple::ConfidenceConnectedImageFilter::Execute | ( | const Image & | image1, |
const std::vector< std::vector< unsigned int > > & | seedList, | ||
unsigned int | numberOfIterations, | ||
double | multiplier, | ||
unsigned int | initialNeighborhoodRadius, | ||
uint8_t | replaceValue | ||
) |
Execute the filter on the input image with the given parameters
|
private |
|
inline |
Get/Set the radius of the neighborhood over which the statistics are evaluated
Definition at line 96 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Method to get access to the mean of the pixels accepted in the output region. This method should only be invoked after the filter has been executed using the Update() method.
This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
Definition at line 113 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get the multiplier to define the confidence interval. Multiplier can be anything greater than zero. A typical value is 2.5
Definition at line 86 of file sitkConfidenceConnectedImageFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 158 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get the number of iterations
Definition at line 76 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get value to replace thresholded pixels
Definition at line 106 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Get SeedList
Definition at line 130 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Method to get access to the variance of the pixels accepted in the output region. This method should only be invoked after the filter has been executed using the Update() method.
This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
Definition at line 121 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Get/Set the radius of the neighborhood over which the statistics are evaluated
Definition at line 91 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get the multiplier to define the confidence interval. Multiplier can be anything greater than zero. A typical value is 2.5
Definition at line 81 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get the number of iterations
Definition at line 71 of file sitkConfidenceConnectedImageFilter.h.
Set/Get value to replace thresholded pixels
Definition at line 101 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
SetSeed - Set list to a single seed
Definition at line 143 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set SeedList
Definition at line 124 of file sitkConfidenceConnectedImageFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 180 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 187 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 190 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 182 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 186 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 185 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 188 of file sitkConfidenceConnectedImageFilter.h.
|
private |
List of interor seed points used to initialize the region growing segmentation
Definition at line 196 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 192 of file sitkConfidenceConnectedImageFilter.h.