Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkConfidenceConnectedImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkConfidenceConnectedImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/08/01 23:06:11 $
00007   Version:   $Revision: 1.15 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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   };
00101 
00102   
00104   void ClearSeeds()
00105   {
00106     m_Seeds.clear();
00107   };
00109 
00110 
00112   void AddSeed(const IndexType & seed)
00113   {
00114     m_Seeds.push_back( seed );
00115     this->Modified();
00116   };
00118 
00121   itkSetMacro(Multiplier, double);
00122   itkGetMacro(Multiplier, double);
00124 
00126   itkSetMacro(NumberOfIterations, unsigned int);
00127   itkGetMacro(NumberOfIterations, unsigned int);
00129 
00131   itkSetMacro(ReplaceValue, OutputImagePixelType);
00132   itkGetMacro(ReplaceValue, OutputImagePixelType);
00134 
00137   itkSetMacro( InitialNeighborhoodRadius, unsigned int );
00138   itkGetConstReferenceMacro( InitialNeighborhoodRadius, unsigned int );
00140 
00144   itkGetConstReferenceMacro( Mean, InputRealType );
00145 
00149   itkGetConstReferenceMacro( Variance, InputRealType );
00150 
00151 #ifdef ITK_USE_CONCEPT_CHECKING
00152 
00153   itkConceptMacro(InputHasNumericTraitsCheck,
00154     (Concept::HasNumericTraits<InputImagePixelType>));
00155   itkConceptMacro(OutputHasNumericTraitsCheck,
00156     (Concept::HasNumericTraits<OutputImagePixelType>));
00157 
00159 #endif
00160 
00161 protected:
00162   ConfidenceConnectedImageFilter();
00163   ~ConfidenceConnectedImageFilter(){};
00164   
00165   // Override since the filter needs all the data for the algorithm
00166   void GenerateInputRequestedRegion();
00167 
00168   // Override since the filter produces the entire dataset
00169   void EnlargeOutputRequestedRegion(DataObject *output);
00170 
00171   void GenerateData();
00172   
00173 private:
00174   ConfidenceConnectedImageFilter(const Self&); //purposely not implemented
00175   void operator=(const Self&); //purposely not implemented
00176 
00177   SeedsContainerType      m_Seeds;
00178   double                  m_Multiplier;
00179   unsigned int            m_NumberOfIterations;
00180   OutputImagePixelType    m_ReplaceValue;
00181   unsigned int            m_InitialNeighborhoodRadius;
00182   InputRealType           m_Mean;
00183   InputRealType           m_Variance;
00184 };
00185 
00186 
00187 } // end namespace itk
00188 
00189 #ifndef ITK_MANUAL_INSTANTIATION
00190 #include "itkConfidenceConnectedImageFilter.txx"
00191 #endif
00192 
00193 #endif
00194 

Generated at Sun Sep 23 12:15:15 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000