00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkVectorNeighborhoodOperatorImageFilter_h
00018
#define __itkVectorNeighborhoodOperatorImageFilter_h
00019
00020
#include "itkImageToImageFilter.h"
00021
#include "itkNeighborhoodOperator.h"
00022
#include "itkImage.h"
00023
#include "itkImageBoundaryCondition.h"
00024
00025
namespace itk
00026 {
00055
template <
class TInputImage,
class TOutputImage>
00056 class ITK_EXPORT VectorNeighborhoodOperatorImageFilter :
00057
public ImageToImageFilter< TInputImage, TOutputImage >
00058 {
00059
public:
00061 typedef VectorNeighborhoodOperatorImageFilter
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(VectorNeighborhoodOperatorImageFilter,
ImageToImageFilter);
00071
00074 typedef typename TInputImage::Pointer
InputImagePointer;
00075 typedef typename TOutputImage::Pointer
OutputImagePointer;
00076 typedef typename TOutputImage::PixelType
OutputPixelType;
00077 typedef typename TOutputImage::InternalPixelType
OutputInternalPixelType;
00078 typedef typename TInputImage::PixelType
InputPixelType;
00079 typedef typename TInputImage::InternalPixelType
InputInternalPixelType;
00080 typedef typename OutputPixelType::ValueType
ScalarValueType;
00081
00083
itkStaticConstMacro(ImageDimension,
unsigned int,
00084 TOutputImage::ImageDimension );
00085
00087 typedef TInputImage
InputImageType;
00088 typedef TOutputImage
OutputImageType;
00089
00091
typedef ImageBoundaryCondition<OutputImageType> *
00092 ImageBoundaryConditionPointerType;
00093
00095 typedef typename Superclass::OutputImageRegionType
OutputImageRegionType;
00096
00100 void SetOperator(
const Neighborhood<
ScalarValueType,
00101
itkGetStaticConstMacro(ImageDimension)> &p)
00102 {
00103 m_Operator = p;
00104 this->Modified();
00105 }
00106
00112
void OverrideBoundaryCondition(
const ImageBoundaryConditionPointerType i)
00113 { m_BoundsCondition = i; }
00114
00122
virtual void GenerateInputRequestedRegion() throw (
InvalidRequestedRegionError);
00123
00124 protected:
00125 VectorNeighborhoodOperatorImageFilter() {}
00126 virtual ~VectorNeighborhoodOperatorImageFilter() {}
00127
00138
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00139
int threadId );
00140
00141
void PrintSelf(std::ostream& os,
Indent indent)
const
00142 {
Superclass::PrintSelf(os,indent); }
00143
private:
00144 VectorNeighborhoodOperatorImageFilter(
const Self&);
00145
void operator=(
const Self&);
00146
00148
Neighborhood<ScalarValueType, itkGetStaticConstMacro(ImageDimension)> m_Operator;
00149
00152 ImageBoundaryConditionPointerType m_BoundsCondition;
00153
00154 };
00155
00156 }
00157
00158
#ifndef ITK_MANUAL_INSTANTIATION
00159
#include "itkVectorNeighborhoodOperatorImageFilter.txx"
00160
#endif
00161
00162
#endif