00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkConfidenceConnectedImageFilter_h
00018
#define __itkConfidenceConnectedImageFilter_h
00019
00020
#include "itkImage.h"
00021
#include "itkImageToImageFilter.h"
00022
00023
namespace itk{
00024
00056
template <
class TInputImage,
class TOutputImage>
00057 class ITK_EXPORT ConfidenceConnectedImageFilter:
00058
public ImageToImageFilter<TInputImage,TOutputImage>
00059 {
00060
public:
00062
typedef ConfidenceConnectedImageFilter
Self;
00063 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00064 typedef SmartPointer<Self> Pointer;
00065 typedef SmartPointer<const Self> ConstPointer;
00066
00068
itkNewMacro(
Self);
00069
00071
itkTypeMacro(ConfidenceConnectedImageFilter,
00072
ImageToImageFilter);
00073
00074
typedef TInputImage
InputImageType;
00075 typedef typename InputImageType::Pointer
InputImagePointer;
00076 typedef typename InputImageType::RegionType
InputImageRegionType;
00077 typedef typename InputImageType::PixelType
InputImagePixelType;
00078 typedef typename InputImageType::IndexType
IndexType;
00079 typedef typename InputImageType::SizeType
SizeType;
00080
00081
typedef TOutputImage
OutputImageType;
00082 typedef typename OutputImageType::Pointer
OutputImagePointer;
00083 typedef typename OutputImageType::RegionType
OutputImageRegionType;
00084 typedef typename OutputImageType::PixelType
OutputImagePixelType;
00085
00086
typedef std::vector< IndexType >
SeedsContainerType;
00087
00088
typedef typename NumericTraits<
00089
InputImagePixelType >::RealType
InputRealType;
00090
00091
00092
void PrintSelf ( std::ostream& os,
Indent indent )
const;
00093
00095
void SetSeed(
const IndexType & seed)
00096 {
00097 m_Seeds.clear();
00098 this->AddSeed( seed );
00099 };
00100
00101
00103
void AddSeed(
const IndexType & seed)
00104 {
00105 m_Seeds.push_back( seed );
00106 this->Modified();
00107 };
00108
00111
itkSetMacro(Multiplier,
double);
00112
itkGetMacro(Multiplier,
double);
00113
00115
itkSetMacro(NumberOfIterations,
unsigned int);
00116
itkGetMacro(NumberOfIterations,
unsigned int);
00117
00119
itkSetMacro(ReplaceValue, OutputImagePixelType);
00120
itkGetMacro(ReplaceValue, OutputImagePixelType);
00121
00124
itkSetMacro( InitialNeighborhoodRadius,
unsigned int );
00125
itkGetConstReferenceMacro( InitialNeighborhoodRadius,
unsigned int );
00126
00130
itkGetConstReferenceMacro( Mean, InputRealType );
00131
00135
itkGetConstReferenceMacro( Variance, InputRealType );
00136
00137
00138
protected:
00139 ConfidenceConnectedImageFilter();
00140 ~ConfidenceConnectedImageFilter(){};
00141
00142
00143
void GenerateInputRequestedRegion();
00144
00145
00146
void EnlargeOutputRequestedRegion(DataObject *output);
00147
00148
void GenerateData();
00149
00150
private:
00151 ConfidenceConnectedImageFilter(
const Self&);
00152
void operator=(
const Self&);
00153
00154
SeedsContainerType m_Seeds;
00155
double m_Multiplier;
00156
unsigned int m_NumberOfIterations;
00157
OutputImagePixelType m_ReplaceValue;
00158
unsigned int m_InitialNeighborhoodRadius;
00159
InputRealType m_Mean;
00160
InputRealType m_Variance;
00161 };
00162
00163
00164 }
00165
00166
#ifndef ITK_MANUAL_INSTANTIATION
00167
#include "itkConfidenceConnectedImageFilter.txx"
00168
#endif
00169
00170
#endif