00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkSmoothingRecursiveGaussianImageFilter_h
00018
#define __itkSmoothingRecursiveGaussianImageFilter_h
00019
00020
#include "itkRecursiveGaussianImageFilter.h"
00021
#include "itkCastImageFilter.h"
00022
#include "itkImage.h"
00023
#include "itkPixelTraits.h"
00024
#include "itkCommand.h"
00025
00026
00027
namespace itk
00028 {
00029
00041
template <
typename TInputImage,
00042
typename TOutputImage= TInputImage >
00043 class ITK_EXPORT SmoothingRecursiveGaussianImageFilter:
00044
public ImageToImageFilter<TInputImage,TOutputImage>
00045 {
00046
public:
00048 typedef SmoothingRecursiveGaussianImageFilter
Self;
00049 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00050 typedef SmartPointer<Self> Pointer;
00051 typedef SmartPointer<const Self> ConstPointer;
00052
00053
00055 typedef TInputImage
InputImageType;
00056 typedef TOutputImage
OutputImageType;
00057 typedef typename TInputImage::PixelType
PixelType;
00058 typedef typename NumericTraits<PixelType>::RealType RealType;
00059
00060
00062
itkStaticConstMacro(ImageDimension,
unsigned int,
00063 TInputImage::ImageDimension);
00064
00069 typedef float InternalRealType;
00070
typedef Image<
InternalRealType,
00071 itkGetStaticConstMacro(ImageDimension) >
RealImageType;
00072
00074
typedef RecursiveGaussianImageFilter<
00075
InputImageType,
00076
RealImageType
00077 >
FirstGaussianFilterType;
00078
00080
typedef RecursiveGaussianImageFilter<
00081
RealImageType,
00082
RealImageType
00083 >
InternalGaussianFilterType;
00084
00086
typedef CastImageFilter<
00087
RealImageType,
00088
OutputImageType
00089 >
CastingFilterType;
00090
00091
00093 typedef typename InternalGaussianFilterType::Pointer
InternalGaussianFilterPointer;
00094
00096 typedef typename FirstGaussianFilterType::Pointer
FirstGaussianFilterPointer;
00097
00099 typedef typename CastingFilterType::Pointer
CastingFilterPointer;
00100
00102 typedef typename OutputImageType::Pointer
OutputImagePointer;
00103
00105 typedef MemberCommand< Self > CommandType;
00106 typedef typename CommandType::Pointer
CommandPointer;
00107
00109
itkNewMacro(
Self);
00110
00112
void SetSigma(
RealType sigma );
00113
00115
void SetNormalizeAcrossScale(
bool normalizeInScaleSpace );
00116
itkGetMacro( NormalizeAcrossScale,
bool );
00117
00123
virtual void GenerateInputRequestedRegion() throw(
InvalidRequestedRegionError);
00124
00125 protected:
00126 SmoothingRecursiveGaussianImageFilter();
00127 virtual ~SmoothingRecursiveGaussianImageFilter() {};
00128 void PrintSelf(std::ostream& os,
Indent indent)
const;
00129
00131
void GenerateData(
void );
00132
00133
00134
void EnlargeOutputRequestedRegion(
DataObject *output);
00135
00137
void ReportProgress(
const Object * object,
const EventObject & event );
00138
00139
private:
00140 SmoothingRecursiveGaussianImageFilter(
const Self&);
00141
void operator=(
const Self&);
00142
00143
InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension-1];
00144
FirstGaussianFilterPointer m_FirstSmoothingFilter;
00145
CastingFilterPointer m_CastingFilter;
00146
00147
CommandPointer m_ProgressCommand;
00148
float m_Progress;
00149
00151
bool m_NormalizeAcrossScale;
00152
00153 };
00154
00155 }
00156
00157
#ifndef ITK_MANUAL_INSTANTIATION
00158
#include "itkSmoothingRecursiveGaussianImageFilter.txx"
00159
#endif
00160
00161
#endif
00162
00163
00164
00165