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/03/24 16:03:17 $
00007   Version:   $Revision: 1.14 $
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:
00061 
00063   typedef ConfidenceConnectedImageFilter Self;
00064   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00065   typedef SmartPointer<Self> Pointer;
00066   typedef SmartPointer<const Self> ConstPointer;
00067 
00069   itkNewMacro(Self);
00070 
00072   itkTypeMacro(ConfidenceConnectedImageFilter,
00073                ImageToImageFilter);
00074 
00075   typedef TInputImage InputImageType;
00076   typedef typename InputImageType::Pointer      InputImagePointer;
00077   typedef typename InputImageType::RegionType   InputImageRegionType; 
00078   typedef typename InputImageType::PixelType    InputImagePixelType; 
00079   typedef typename InputImageType::IndexType    IndexType;
00080   typedef typename InputImageType::SizeType     SizeType;
00081   
00082   typedef TOutputImage OutputImageType;
00083   typedef typename OutputImageType::Pointer     OutputImagePointer;
00084   typedef typename OutputImageType::RegionType  OutputImageRegionType; 
00085   typedef typename OutputImageType::PixelType   OutputImagePixelType; 
00086   
00087   typedef std::vector< IndexType >              SeedsContainerType;
00088 
00089   typedef typename NumericTraits< 
00090                 InputImagePixelType >::RealType InputRealType;
00091 
00092 
00093   void PrintSelf ( std::ostream& os, Indent indent ) const;
00094 
00096   void SetSeed(const IndexType & seed)
00097   {
00098     m_Seeds.clear();
00099     this->AddSeed( seed );
00100   };
00102 
00103   
00105   void ClearSeeds()
00106   {
00107     m_Seeds.clear();
00108   };
00110 
00111 
00113   void AddSeed(const IndexType & seed)
00114   {
00115     m_Seeds.push_back( seed );
00116     this->Modified();
00117   };
00119 
00122   itkSetMacro(Multiplier, double);
00123   itkGetMacro(Multiplier, double);
00125 
00127   itkSetMacro(NumberOfIterations, unsigned int);
00128   itkGetMacro(NumberOfIterations, unsigned int);
00130 
00132   itkSetMacro(ReplaceValue, OutputImagePixelType);
00133   itkGetMacro(ReplaceValue, OutputImagePixelType);
00135 
00138   itkSetMacro( InitialNeighborhoodRadius, unsigned int );
00139   itkGetConstReferenceMacro( InitialNeighborhoodRadius, unsigned int );
00141 
00145   itkGetConstReferenceMacro( Mean, InputRealType );
00146 
00150   itkGetConstReferenceMacro( Variance, InputRealType );
00151 
00152 #ifdef ITK_USE_CONCEPT_CHECKING
00153 
00154   itkConceptMacro(InputHasNumericTraitsCheck,
00155     (Concept::HasNumericTraits<InputImagePixelType>));
00156   itkConceptMacro(OutputHasNumericTraitsCheck,
00157     (Concept::HasNumericTraits<OutputImagePixelType>));
00158 
00160 #endif
00161 
00162 protected:
00163   ConfidenceConnectedImageFilter();
00164   ~ConfidenceConnectedImageFilter(){};
00165   
00166   // Override since the filter needs all the data for the algorithm
00167   void GenerateInputRequestedRegion();
00168 
00169   // Override since the filter produces the entire dataset
00170   void EnlargeOutputRequestedRegion(DataObject *output);
00171 
00172   void GenerateData();
00173   
00174 private:
00175   ConfidenceConnectedImageFilter(const Self&); //purposely not implemented
00176   void operator=(const Self&); //purposely not implemented
00177 
00178   SeedsContainerType      m_Seeds;
00179   double                  m_Multiplier;
00180   unsigned int            m_NumberOfIterations;
00181   OutputImagePixelType    m_ReplaceValue;
00182   unsigned int            m_InitialNeighborhoodRadius;
00183   InputRealType           m_Mean;
00184   InputRealType           m_Variance;
00185 };
00186 
00187 
00188 } // end namespace itk
00189 
00190 #ifndef ITK_MANUAL_INSTANTIATION
00191 #include "itkConfidenceConnectedImageFilter.txx"
00192 #endif
00193 
00194 #endif
00195 

Generated at Fri Sep 8 02:52:55 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000