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 __itkLocalVariationImageFilter_h
00019 #define __itkLocalVariationImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022 #include "itkImage.h"
00023
00024 namespace itk
00025 {
00026
00027 template<class TPixelType>
00028 class SquaredEuclideanMetric
00029 {
00030 public:
00031 static double Calc(TPixelType p);
00032 };
00033
00046 template <class TInputImage, class TOutputImage>
00047 class LocalVariationImageFilter :
00048 public ImageToImageFilter< TInputImage, TOutputImage >
00049 {
00050 public:
00052 itkStaticConstMacro(InputImageDimension, unsigned int,
00053 TInputImage::ImageDimension);
00054 itkStaticConstMacro(OutputImageDimension, unsigned int,
00055 TOutputImage::ImageDimension);
00056
00058 typedef TInputImage InputImageType;
00059 typedef TOutputImage OutputImageType;
00060
00062 typedef LocalVariationImageFilter Self;
00063 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00064 typedef SmartPointer<Self> Pointer;
00065 typedef SmartPointer<const Self> ConstPointer;
00066
00068 itkNewMacro(Self);
00069
00071 itkTypeMacro(LocalVariationImageFilter, ImageToImageFilter);
00072
00074 typedef typename InputImageType::PixelType InputPixelType;
00075 typedef typename OutputImageType::PixelType OutputPixelType;
00076
00077 typedef typename InputImageType::RegionType InputImageRegionType;
00078 typedef typename OutputImageType::RegionType OutputImageRegionType;
00079
00080 typedef typename InputImageType::SizeType InputSizeType;
00081
00088 virtual void GenerateInputRequestedRegion()
00089 throw(InvalidRequestedRegionError);
00090
00091 protected:
00092 LocalVariationImageFilter();
00093 virtual ~LocalVariationImageFilter() {}
00094 void PrintSelf(std::ostream& os, Indent indent) const;
00095
00106 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00107 int threadId );
00108
00109 private:
00110 LocalVariationImageFilter(const Self&);
00111 void operator=(const Self&);
00112 };
00113
00114 }
00115
00116 #ifndef ITK_MANUAL_INSTANTIATION
00117 #include "itkLocalVariationImageFilter.txx"
00118 #endif
00119
00120 #endif //LocalVariationImageFilter