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

itkSimpleFuzzyConnectednessImageFilterBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSimpleFuzzyConnectednessImageFilterBase.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:39:01 $
00007   Version:   $Revision: 1.14 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkSimpleFuzzyConnectednessImageFilterBase_h
00018 #define __itkSimpleFuzzyConnectednessImageFilterBase_h
00019 
00020 #include "itkImage.h"
00021 #include "itkImageToImageFilter.h"
00022 #include <vnl/vnl_matrix_fixed.h>
00023 
00024 #include <queue>
00025 
00026 namespace itk{
00027 
00056 template <class TInputImage, class TOutputImage>
00057 class SimpleFuzzyConnectednessImageFilterBase:
00058   public ImageToImageFilter<TInputImage,TOutputImage>
00059 {
00060 public:
00062   typedef SimpleFuzzyConnectednessImageFilterBase       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(SimpleFuzzyConnectednessImageFilterBase,ImageToImageFilter);
00072 
00074   itkStaticConstMacro(ImageDimension, unsigned int,
00075                       TInputImage::ImageDimension);
00076 
00078   typedef TInputImage InputImageType;
00079   typedef TOutputImage OutputImageType;
00080   typedef Image <unsigned short, itkGetStaticConstMacro(ImageDimension)> UShortImage;
00081   typedef typename TInputImage::IndexType IndexType;
00082   typedef typename TInputImage::SizeType SizeType;
00083   typedef typename TInputImage::PixelType PixelType;
00084   typedef typename UShortImage::Pointer FuzzyScene;
00085   typedef std::queue<IndexType> QueueType;
00086   typedef typename TOutputImage::RegionType RegionType;
00087   
00090   itkSetMacro(Weight, double);
00091   itkGetMacro(Weight, double);
00092   
00094   itkSetMacro(Threshold, double);
00095   itkGetMacro(Threshold, double);
00096 
00098   void SetObjectsSeed(const IndexType & seed);
00099   
00101   void MakeSegmentObject();
00102 
00104   FuzzyScene GetFuzzyScene(void)
00105     { return m_FuzzyScene; };
00106 
00108   void UpdateThreshold(const double x);
00109   
00110 protected:
00111   SimpleFuzzyConnectednessImageFilterBase();
00112   ~SimpleFuzzyConnectednessImageFilterBase();
00113 
00115   void GenerateData();
00116 
00117   double m_Weight;
00118   double m_Threshold;
00119   IndexType m_ObjectsSeed;
00120   SizeType m_Size;
00121 
00122   typename InputImageType::ConstPointer m_InputImage;
00123   typename UShortImage::Pointer m_FuzzyScene;
00124   typename OutputImageType::Pointer m_SegmentObject; 
00125   
00126   QueueType m_Queue;
00127 
00128   void PushNeighbors(const IndexType &center);
00129 
00131   virtual double FuzzyAffinity(const PixelType f1, const PixelType f2)
00132     { return 0; }
00133 
00134   double FindStrongPath(const IndexType &center);
00135 
00136  private:
00137   SimpleFuzzyConnectednessImageFilterBase(const Self&); //purposely not implemented
00138   void operator=(const Self&); //purposely not implemented
00139 
00140 };
00141 
00142 
00143 } 
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkSimpleFuzzyConnectednessImageFilterBase.txx"
00147 #endif
00148 
00149 #endif

Generated at Wed Mar 12 01:13:10 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000