00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkContourMeanDistanceImageFilter_h
00018 #define __itkContourMeanDistanceImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNumericTraits.h"
00022
00023 namespace itk {
00024
00063 template<class TInputImage1, class TInputImage2>
00064 class ITK_EXPORT ContourMeanDistanceImageFilter :
00065 public ImageToImageFilter<TInputImage1, TInputImage1>
00066 {
00067 public:
00069 typedef ContourMeanDistanceImageFilter Self;
00070 typedef ImageToImageFilter<TInputImage1,TInputImage1> Superclass;
00071 typedef SmartPointer<Self> Pointer;
00072 typedef SmartPointer<const Self> ConstPointer;
00073
00075 itkNewMacro(Self);
00076
00078 itkTypeMacro(ContourMeanDistanceImageFilter, ImageToImageFilter);
00079
00081 typedef TInputImage1 InputImage1Type;
00082 typedef TInputImage2 InputImage2Type;
00083 typedef typename TInputImage1::Pointer InputImage1Pointer;
00084 typedef typename TInputImage2::Pointer InputImage2Pointer;
00085 typedef typename TInputImage1::ConstPointer InputImage1ConstPointer;
00086 typedef typename TInputImage2::ConstPointer InputImage2ConstPointer;
00087
00088 typedef typename TInputImage1::RegionType RegionType ;
00089 typedef typename TInputImage1::SizeType SizeType ;
00090 typedef typename TInputImage1::IndexType IndexType ;
00091
00092 typedef typename TInputImage1::PixelType InputImage1PixelType;
00093 typedef typename TInputImage2::PixelType InputImage2PixelType;
00094
00096 itkStaticConstMacro(ImageDimension, unsigned int,
00097 TInputImage1::ImageDimension);
00098
00100 typedef typename NumericTraits<InputImage1PixelType>::RealType RealType;
00101
00103 void SetInput1( const InputImage1Type * image )
00104 { this->SetInput( image ); }
00105
00107 void SetInput2( const InputImage2Type * image );
00108
00110 const InputImage1Type * GetInput1(void)
00111 { return this->GetInput(); }
00112
00114 const InputImage2Type * GetInput2(void);
00115
00117 itkGetMacro(MeanDistance,RealType);
00118
00119 protected:
00120 ContourMeanDistanceImageFilter();
00121 ~ContourMeanDistanceImageFilter(){};
00122 void PrintSelf(std::ostream& os, Indent indent) const;
00123
00125 void GenerateData();
00126
00127
00128 void GenerateInputRequestedRegion();
00129
00130
00131 void EnlargeOutputRequestedRegion(DataObject *data);
00132
00133 private:
00134 ContourMeanDistanceImageFilter(const Self&);
00135 void operator=(const Self&);
00136
00137 RealType m_MeanDistance;
00138
00139 } ;
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkContourMeanDistanceImageFilter.txx"
00145 #endif
00146
00147 #endif