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

itkVectorNeighborhoodOperatorImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorNeighborhoodOperatorImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/04/03 15:07:52 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) Insight Software 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 __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   }
00107 
00113   void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
00114   { m_BoundsCondition = i; }
00115 
00123   virtual void GenerateInputRequestedRegion() throw (InvalidRequestedRegionError);
00124 
00125 #ifdef ITK_USE_CONCEPT_CHECKING
00126 
00127   itkConceptMacro(InputHasNumericTraitsCheck,
00128     (Concept::HasNumericTraits<typename TInputImage::PixelType::ValueType>));
00129   itkConceptMacro(OutputHasNumericTraitsCheck,
00130     (Concept::HasNumericTraits<typename TOutputImage::PixelType::ValueType>));
00131 
00133 #endif
00134 
00135 protected:
00136   VectorNeighborhoodOperatorImageFilter() {}
00137   virtual ~VectorNeighborhoodOperatorImageFilter() {}
00138     
00149   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00150                             int threadId );
00151 
00152   void PrintSelf(std::ostream& os, Indent indent) const
00153   { Superclass::PrintSelf(os,indent);  }
00154 private:
00155   VectorNeighborhoodOperatorImageFilter(const Self&); //purposely not implemented
00156   void operator=(const Self&); //purposely not implemented
00157 
00159   Neighborhood<ScalarValueType, itkGetStaticConstMacro(ImageDimension)> m_Operator;
00160 
00163   ImageBoundaryConditionPointerType m_BoundsCondition;
00164 
00165 };
00166   
00167 } // end namespace itk
00168 
00169 #ifndef ITK_MANUAL_INSTANTIATION
00170 #include "itkVectorNeighborhoodOperatorImageFilter.txx"
00171 #endif
00172 
00173 #endif
00174 

Generated at Tue Jul 29 23:33:57 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000