00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkNeighborhoodOperatorImageFilter_h
00018
#define __itkNeighborhoodOperatorImageFilter_h
00019
00020
#include "itkImageToImageFilter.h"
00021
#include "itkNeighborhoodOperator.h"
00022
#include "itkImage.h"
00023
#include "itkImageBoundaryCondition.h"
00024
00025
namespace itk
00026 {
00044
template <
class TInputImage,
class TOutputImage>
00045 class ITK_EXPORT NeighborhoodOperatorImageFilter :
00046
public ImageToImageFilter< TInputImage, TOutputImage >
00047 {
00048
public:
00050 typedef NeighborhoodOperatorImageFilter
Self;
00051 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056
itkNewMacro(
Self);
00057
00059
itkTypeMacro(NeighborhoodOperatorImageFilter,
ImageToImageFilter);
00060
00063 typedef typename TOutputImage::PixelType
OutputPixelType;
00064 typedef typename TOutputImage::InternalPixelType
OutputInternalPixelType;
00065 typedef typename TInputImage::PixelType
InputPixelType;
00066 typedef typename TInputImage::InternalPixelType
InputInternalPixelType;
00067
00070
itkStaticConstMacro(ImageDimension,
unsigned int,
00071 TOutputImage::ImageDimension);
00072
00074 typedef TInputImage
InputImageType;
00075 typedef TOutputImage
OutputImageType;
00076 typedef typename InputImageType::Pointer
InputImagePointer;
00077
00079
typedef ImageBoundaryCondition<OutputImageType> *
00080 ImageBoundaryConditionPointerType;
00081
00083 typedef typename Superclass::OutputImageRegionType
OutputImageRegionType;
00084
00086 typedef Neighborhood<OutputPixelType, itkGetStaticConstMacro(ImageDimension)> OutputNeighborhoodType;
00087 typedef Neighborhood<InputPixelType, itkGetStaticConstMacro(ImageDimension)> InputNeighborhoodType;
00088
00092
void SetOperator(
const OutputNeighborhoodType &p)
00093 {
00094 m_Operator = p;
00095 this->Modified();
00096 }
00097
00103
void OverrideBoundaryCondition(
const ImageBoundaryConditionPointerType i)
00104 { m_BoundsCondition = i; }
00105
00113
virtual void GenerateInputRequestedRegion() throw (
InvalidRequestedRegionError);
00114
00115 protected:
00116 NeighborhoodOperatorImageFilter() {}
00117
virtual ~NeighborhoodOperatorImageFilter() {}
00118
00130
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00131
int threadId );
00132
00133
00134
void PrintSelf(std::ostream& os,
Indent indent)
const
00135
{
Superclass::PrintSelf(os, indent); }
00136 private:
00137 NeighborhoodOperatorImageFilter(
const Self&);
00138
void operator=(
const Self&);
00139
00141
InputNeighborhoodType m_Operator;
00142
00145
ImageBoundaryConditionPointerType m_BoundsCondition;
00146
00147 };
00148
00149 }
00150
00151
#ifndef ITK_MANUAL_INSTANTIATION
00152
#include "itkNeighborhoodOperatorImageFilter.txx"
00153
#endif
00154
00155
#endif