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

itkCollidingFrontsImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCollidingFrontsImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/04/04 13:20:12 $
00007   Version:   $Revision: 1.2 $
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 
00018 #ifndef __itkCollidingFrontsImageFilter_h
00019 #define __itkCollidingFrontsImageFilter_h
00020 
00021 #include "itkFastMarchingUpwindGradientImageFilter.h"
00022 #include "itkImageToImageFilter.h"
00023 #include "itkImage.h"
00024 
00025 namespace itk
00026 {
00055 template <typename TInputImage, typename TOutputImage>
00056 class CollidingFrontsImageFilter :
00057     public ImageToImageFilter< TInputImage, TOutputImage >
00058 {
00059 public:
00061   typedef CollidingFrontsImageFilter Self;
00062   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00063   typedef SmartPointer<Self> Pointer;
00064   typedef SmartPointer<const Self>  ConstPointer;
00065 
00067   itkNewMacro(Self);
00068 
00070   itkTypeMacro(CollidingFrontsImageFilter, ImageToImageFilter);
00071 
00074   typedef typename TOutputImage::PixelType OutputPixelType;
00075   typedef typename TInputImage::PixelType InputPixelType;
00076   typedef typename NumericTraits<InputPixelType>::RealType RealType;
00077 
00080   itkStaticConstMacro(ImageDimension, unsigned int,
00081                       TOutputImage::ImageDimension);
00082 
00084   typedef TInputImage  InputImageType;
00085   typedef TOutputImage OutputImageType;
00086   typedef typename InputImageType::Pointer InputImagePointer;
00087   typedef typename OutputImageType::Pointer OutputImagePointer;
00088 
00090   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00091 
00093   typedef itk::FastMarchingUpwindGradientImageFilter<TInputImage,TOutputImage> FastMarchingUpwindGradientImageFilterType;
00094 
00096   typedef typename FastMarchingUpwindGradientImageFilterType::PixelType  PixelType;
00097   typedef typename FastMarchingUpwindGradientImageFilterType::NodeType NodeType;
00098   typedef typename FastMarchingUpwindGradientImageFilterType::NodeContainer NodeContainer;
00099   typedef typename FastMarchingUpwindGradientImageFilterType::NodeContainerPointer NodeContainerPointer;
00100   typedef typename FastMarchingUpwindGradientImageFilterType::GradientImageType GradientImageType;
00101   typedef typename FastMarchingUpwindGradientImageFilterType::IndexType  IndexType;
00102 
00105   void SetSeedPoints1( NodeContainer * points )
00106     {
00107     m_SeedPoints1 = points;
00108     this->Modified();
00109     };
00111 
00113   NodeContainerPointer GetSeedPoints1( )
00114     { return m_SeedPoints1; };
00115 
00118   void SetSeedPoints2( NodeContainer * points )
00119     {
00120     m_SeedPoints2 = points;
00121     this->Modified();
00122     };
00124 
00126   NodeContainerPointer GetSeedPoints2( )
00127     { return m_SeedPoints2; };
00128 
00129   itkSetMacro(NegativeEpsilon, double);
00130   itkGetMacro(NegativeEpsilon, double);
00131 
00132   itkSetMacro(ApplyConnectivity, bool);
00133   itkGetMacro(ApplyConnectivity, bool);
00134   itkBooleanMacro(ApplyConnectivity);
00135 
00136 #ifdef ITK_USE_CONCEPT_CHECKING
00137 
00138   itkConceptMacro(InputHasNumericTraitsCheck,
00139                   (Concept::HasNumericTraits<InputPixelType>));
00140 
00142 #endif
00143 
00144 protected:
00145   CollidingFrontsImageFilter();
00146   virtual ~CollidingFrontsImageFilter() {}
00147 
00148   void GenerateData();
00149 
00150   void PrintSelf(std::ostream&, Indent) const;
00151   
00152 private:
00153   CollidingFrontsImageFilter(const Self&); //purposely not implemented
00154   void operator=(const Self&); //purposely not implemented
00155 
00156   NodeContainerPointer m_SeedPoints1;
00157   NodeContainerPointer m_SeedPoints2;
00158 
00159   bool m_ApplyConnectivity;
00160 
00161   double m_NegativeEpsilon;
00162 };
00163   
00164 } // end namespace itk
00165 
00166 #ifndef ITK_MANUAL_INSTANTIATION
00167 #include "itkCollidingFrontsImageFilter.txx"
00168 #endif
00169 
00170 #endif
00171 

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