Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkNeighborhoodOperatorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNeighborhoodOperatorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/30 15:24:40 $
00007   Version:   $Revision: 1.25 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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&); //purposely not implemented
00138   void operator=(const Self&); //purposely not implemented
00139 
00141   InputNeighborhoodType m_Operator;
00142 
00145   ImageBoundaryConditionPointerType m_BoundsCondition;
00146 
00147 };
00148   
00149 } // end namespace itk
00150 
00151 #ifndef ITK_MANUAL_INSTANTIATION
00152 #include "itkNeighborhoodOperatorImageFilter.txx"
00153 #endif
00154 
00155 #endif

Generated at Fri May 21 01:15:08 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000