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: 2009-05-12 17:26:20 $
00007   Version:   $Revision: 1.6 $
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 {
00060 template <typename TInputImage, typename TOutputImage>
00061 class ITK_EXPORT CollidingFrontsImageFilter :
00062     public ImageToImageFilter< TInputImage, TOutputImage >
00063 {
00064 public:
00066   typedef CollidingFrontsImageFilter                      Self;
00067   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00068   typedef SmartPointer<Self>                              Pointer;
00069   typedef SmartPointer<const Self>                        ConstPointer;
00070 
00072   itkNewMacro(Self);
00073 
00075   itkTypeMacro(CollidingFrontsImageFilter, ImageToImageFilter);
00076 
00079   typedef typename TOutputImage::PixelType                 OutputPixelType;
00080   typedef typename TInputImage::PixelType                  InputPixelType;
00081   typedef typename NumericTraits<InputPixelType>::RealType RealType;
00082 
00085   itkStaticConstMacro(ImageDimension, unsigned int,
00086                       TOutputImage::ImageDimension);
00087 
00089   typedef TInputImage                       InputImageType;
00090   typedef typename InputImageType::Pointer  InputImagePointer;
00091   typedef TOutputImage                      OutputImageType;
00092   typedef typename OutputImageType::Pointer OutputImagePointer;
00093 
00095   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00096 
00098   typedef itk::FastMarchingUpwindGradientImageFilter<TInputImage,TOutputImage> FastMarchingUpwindGradientImageFilterType;
00099 
00101   typedef typename FastMarchingUpwindGradientImageFilterType::PixelType
00102                                                    PixelType;
00103   typedef typename FastMarchingUpwindGradientImageFilterType::NodeType
00104                                                    NodeType;
00105   typedef typename FastMarchingUpwindGradientImageFilterType::NodeContainer
00106                                                    NodeContainer;
00107   typedef typename FastMarchingUpwindGradientImageFilterType::NodeContainerPointer
00108                                                    NodeContainerPointer;
00109   typedef typename FastMarchingUpwindGradientImageFilterType::GradientImageType
00110                                                    GradientImageType;
00111   typedef typename FastMarchingUpwindGradientImageFilterType::IndexType  IndexType;
00112 
00115   void SetSeedPoints1( NodeContainer * points )
00116     {
00117     m_SeedPoints1 = points;
00118     this->Modified();
00119     }
00121 
00123   NodeContainerPointer GetSeedPoints1( )
00124     { return m_SeedPoints1; }
00125 
00128   void SetSeedPoints2( NodeContainer * points )
00129     {
00130     m_SeedPoints2 = points;
00131     this->Modified();
00132     }
00134 
00136   NodeContainerPointer GetSeedPoints2( )
00137     { return m_SeedPoints2; }
00138 
00139   itkSetMacro(NegativeEpsilon, double);
00140   itkGetConstMacro(NegativeEpsilon, double);
00141 
00142   itkSetMacro(ApplyConnectivity, bool);
00143   itkGetConstMacro(ApplyConnectivity, bool);
00144   itkBooleanMacro(ApplyConnectivity);
00145 
00146   itkSetMacro(StopOnTargets, bool);
00147   itkGetConstMacro(StopOnTargets, bool);
00148   itkBooleanMacro(StopOnTargets);
00149 
00150 #ifdef ITK_USE_CONCEPT_CHECKING
00151 
00152   itkConceptMacro(InputHasNumericTraitsCheck,
00153                   (Concept::HasNumericTraits<InputPixelType>));
00154 
00156 #endif
00157 
00158 protected:
00159   CollidingFrontsImageFilter();
00160   virtual ~CollidingFrontsImageFilter() {}
00161 
00162   void GenerateData();
00163 
00164   void PrintSelf(std::ostream&, Indent) const;
00165   
00166 private:
00167   CollidingFrontsImageFilter(const Self&); //purposely not implemented
00168   void operator=(const Self&); //purposely not implemented
00169 
00170   NodeContainerPointer m_SeedPoints1;
00171   NodeContainerPointer m_SeedPoints2;
00172 
00173   bool m_StopOnTargets;
00174   bool m_ApplyConnectivity;
00175 
00176   double m_NegativeEpsilon;
00177 };
00178   
00179 } // end namespace itk
00180 
00181 #ifndef ITK_MANUAL_INSTANTIATION
00182 #include "itkCollidingFrontsImageFilter.txx"
00183 #endif
00184 
00185 #endif
00186 

Generated at Thu May 28 09:37:34 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000