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

itkShapeDetectionLevelSetFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShapeDetectionLevelSetFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/05/10 22:56:16 $
00007   Version:   $Revision: 1.18 $
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 _itkShapeDetectionLevelSetFilter_h
00018 #define _itkShapeDetectionLevelSetFilter_h
00019 
00020 #include "itkLevelSet.h"
00021 #include "itkLevelSetImageFilter.h"
00022 #include "itkExtensionVelocitiesImageFilter.h"
00023 #include "itkNumericTraits.h"
00024 
00025 namespace itk
00026 {
00091 template <class TLevelSet, class TEdgeImage>
00092 class ITK_EXPORT ShapeDetectionLevelSetFilter :
00093   public LevelSetImageFilter<TLevelSet>
00094 {
00095 public:
00097   typedef ShapeDetectionLevelSetFilter Self;
00098   typedef LevelSetImageFilter<TLevelSet> Superclass;
00099   typedef SmartPointer<Self> Pointer;
00100   typedef SmartPointer<const Self>  ConstPointer;
00101 
00103   itkNewMacro(Self);
00104 
00106   itkTypeMacro(ShapeDetectionLevelSetFilter, LevelSetImageFilter);
00107 
00109   typedef LevelSetTypeDefault<TLevelSet>  LevelSetType;
00110   typedef typename LevelSetType::LevelSetImageType  LevelSetImageType;
00111   typedef typename LevelSetType::LevelSetPointer  LevelSetPointer;
00112   typedef typename LevelSetType::PixelType  PixelType;
00113   typedef typename LevelSetType::NodeType NodeType;
00114   typedef typename LevelSetType::NodeContainer NodeContainer;
00115   typedef typename LevelSetType::NodeContainerPointer NodeContainerPointer;
00116 
00118   typedef TEdgeImage EdgeImageType;
00119 
00121   typedef typename EdgeImageType::Pointer EdgeImagePointer;
00122   typedef typename EdgeImageType::ConstPointer EdgeImageConstPointer;
00123 
00125   void SetEdgeImage( const EdgeImageType * ptr );
00126   const EdgeImageType * GetEdgeImage(void);
00127 
00134   itkSetClampMacro( LengthPenaltyStrength, double, 0.0,
00135     NumericTraits<double>::max() );
00136   itkGetMacro( LengthPenaltyStrength, double );
00137 
00142   itkSetMacro( PropagateOutwards, bool );
00143   itkGetMacro( PropagateOutwards, bool );
00144 
00146   NodeContainerPointer GetOutputNarrowBand()
00147     { return m_OutputNarrowBand; }
00148 
00149 protected:
00150   ShapeDetectionLevelSetFilter();
00151   ~ShapeDetectionLevelSetFilter(){};
00152   void PrintSelf(std::ostream& os, Indent indent) const;
00153 
00154   virtual void AllocateOutput();
00155   void GenerateData();
00156   virtual void GenerateDataFull();
00157   virtual void GenerateDataNarrowBand();
00158   virtual void GenerateInputRequestedRegion();
00159 
00160   void SetOutputNarrowBand( NodeContainer *ptr )
00161     { m_OutputNarrowBand = ptr; }
00162 
00163 private:
00164   ShapeDetectionLevelSetFilter(const Self&); //purposely not implemented
00165   void operator=(const Self&); //purposely not implemented
00166   
00167   typedef typename TEdgeImage::PixelType EdgePixelType;
00168   typedef ExtensionVelocitiesImageFilter<TLevelSet,EdgePixelType,1> 
00169       ExtenderType;
00170 
00171   double                                m_LengthPenaltyStrength;
00172   bool                                  m_PropagateOutwards;
00173   typename ExtenderType::Pointer        m_Extender;
00174   NodeContainerPointer                  m_OutputNarrowBand;
00175 
00176 };
00177 
00178 } // namespace itk
00179 
00180 #ifndef ITK_MANUAL_INSTANTIATION
00181 #include "itkShapeDetectionLevelSetFilter.txx"
00182 #endif
00183 
00184 #endif

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