SimpleITK
1.2.4
|
Segment pixels with similar statistics using connectivity. More...
#include <sitkConfidenceConnectedImageFilter.h>
Public Types | |
typedef BasicPixelIDTypeList | PixelIDTypeList |
typedef ConfidenceConnectedImageFilter | Self |
Public Types inherited from itk::simple::ImageFilter< 1 > | |
typedef ImageFilter | Self |
Public Types inherited from itk::simple::ProcessObject | |
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 |
virtual | ~ConfidenceConnectedImageFilter () |
Public Member Functions inherited from itk::simple::ImageFilter< 1 > | |
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 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 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::ProcessObject * | GetActiveProcess () |
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< 1 > | |
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::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 46 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Setup for member function dispatching
Definition at line 169 of file sitkConfidenceConnectedImageFilter.h.
Define the pixels types supported by this filter
Definition at line 58 of file sitkConfidenceConnectedImageFilter.h.
Definition at line 48 of file sitkConfidenceConnectedImageFilter.h.
|
virtual |
Destructor
itk::simple::ConfidenceConnectedImageFilter::ConfidenceConnectedImageFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
|
inline |
AddSeed - Add a seed to the end of the list
Definition at line 145 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
ClearSeeds - Clear out all seeds in the list
Definition at line 130 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 90 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 107 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 80 of file sitkConfidenceConnectedImageFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 152 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get the number of iterations
Definition at line 70 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get value to replace thresholded pixels
Definition at line 100 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Get SeedList
Definition at line 124 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 115 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Get/Set the radius of the neighborhood over which the statistics are evaluated
Definition at line 85 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 75 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set/Get the number of iterations
Definition at line 65 of file sitkConfidenceConnectedImageFilter.h.
Set/Get value to replace thresholded pixels
Definition at line 95 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
SetSeed - Set list to a single seed
Definition at line 137 of file sitkConfidenceConnectedImageFilter.h.
|
inline |
Set SeedList
Definition at line 118 of file sitkConfidenceConnectedImageFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 173 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 180 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 183 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 175 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 179 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 178 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 181 of file sitkConfidenceConnectedImageFilter.h.
|
private |
List of interor seed points used to initialize the region growing segmentation
Definition at line 189 of file sitkConfidenceConnectedImageFilter.h.
|
private |
Definition at line 185 of file sitkConfidenceConnectedImageFilter.h.