itkCollidingFrontsImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 typename InputImageType::Pointer InputImagePointer;
00086 typedef TOutputImage OutputImageType;
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
00097 PixelType;
00098 typedef typename FastMarchingUpwindGradientImageFilterType::NodeType
00099 NodeType;
00100 typedef typename FastMarchingUpwindGradientImageFilterType::NodeContainer
00101 NodeContainer;
00102 typedef typename FastMarchingUpwindGradientImageFilterType::NodeContainerPointer
00103 NodeContainerPointer;
00104 typedef typename FastMarchingUpwindGradientImageFilterType::GradientImageType
00105 GradientImageType;
00106 typedef typename FastMarchingUpwindGradientImageFilterType::IndexType IndexType;
00107
00110 void SetSeedPoints1( NodeContainer * points )
00111 {
00112 m_SeedPoints1 = points;
00113 this->Modified();
00114 }
00116
00118 NodeContainerPointer GetSeedPoints1( )
00119 { return m_SeedPoints1; }
00120
00123 void SetSeedPoints2( NodeContainer * points )
00124 {
00125 m_SeedPoints2 = points;
00126 this->Modified();
00127 }
00129
00131 NodeContainerPointer GetSeedPoints2( )
00132 { return m_SeedPoints2; }
00133
00134 itkSetMacro(NegativeEpsilon, double);
00135 itkGetMacro(NegativeEpsilon, double);
00136
00137 itkSetMacro(ApplyConnectivity, bool);
00138 itkGetMacro(ApplyConnectivity, bool);
00139 itkBooleanMacro(ApplyConnectivity);
00140
00141 #ifdef ITK_USE_CONCEPT_CHECKING
00142
00143 itkConceptMacro(InputHasNumericTraitsCheck,
00144 (Concept::HasNumericTraits<InputPixelType>));
00145
00147 #endif
00148
00149 protected:
00150 CollidingFrontsImageFilter();
00151 virtual ~CollidingFrontsImageFilter() {}
00152
00153 void GenerateData();
00154
00155 void PrintSelf(std::ostream&, Indent) const;
00156
00157 private:
00158 CollidingFrontsImageFilter(const Self&);
00159 void operator=(const Self&);
00160
00161 NodeContainerPointer m_SeedPoints1;
00162 NodeContainerPointer m_SeedPoints2;
00163
00164 bool m_ApplyConnectivity;
00165
00166 double m_NegativeEpsilon;
00167 };
00168
00169 }
00170
00171 #ifndef ITK_MANUAL_INSTANTIATION
00172 #include "itkCollidingFrontsImageFilter.txx"
00173 #endif
00174
00175 #endif
00176