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: 2008-10-17 20:50:03 $
00007   Version:   $Revision: 1.11 $
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> *ImageBoundaryConditionPointerType;
00092 
00094   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00095 
00099   void SetOperator(const Neighborhood<ScalarValueType,
00100                    itkGetStaticConstMacro(ImageDimension)> &p)
00101     {
00102     m_Operator = p;
00103     this->Modified();
00104     }
00106 
00112   void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
00113     { m_BoundsCondition = i; }
00114 
00122   virtual void GenerateInputRequestedRegion() throw (InvalidRequestedRegionError);
00123 
00124 #ifdef ITK_USE_CONCEPT_CHECKING
00125 
00126   itkConceptMacro(InputHasNumericTraitsCheck,
00127     (Concept::HasNumericTraits<typename TInputImage::PixelType::ValueType>));
00128   itkConceptMacro(OutputHasNumericTraitsCheck,
00129     (Concept::HasNumericTraits<typename TOutputImage::PixelType::ValueType>));
00130 
00132 #endif
00133 
00134 protected:
00135   VectorNeighborhoodOperatorImageFilter() {}
00136   virtual ~VectorNeighborhoodOperatorImageFilter() {}
00137     
00148   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00149                             int threadId );
00150 
00151   void PrintSelf(std::ostream& os, Indent indent) const
00152   { Superclass::PrintSelf(os,indent);  }
00153 private:
00154   VectorNeighborhoodOperatorImageFilter(const Self&); //purposely not implemented
00155   void operator=(const Self&); //purposely not implemented
00156 
00158   Neighborhood<ScalarValueType, itkGetStaticConstMacro(ImageDimension)> m_Operator;
00159 
00162   ImageBoundaryConditionPointerType m_BoundsCondition;
00163 
00164 };
00165   
00166 } // end namespace itk
00167 
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkVectorNeighborhoodOperatorImageFilter.txx"
00170 #endif
00171 
00172 #endif
00173 

Generated at Mon Jul 12 2010 20:12:47 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000