ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkVectorNeighborhoodOperatorImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkVectorNeighborhoodOperatorImageFilter_h
19 #define __itkVectorNeighborhoodOperatorImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 #include "itkImage.h"
25 
26 namespace itk
27 {
57 template< class TInputImage, class TOutputImage >
59  public ImageToImageFilter< TInputImage, TOutputImage >
60 {
61 public:
67 
69  itkNewMacro(Self);
70 
73 
76  typedef typename TInputImage::Pointer InputImagePointer;
77  typedef typename TOutputImage::Pointer OutputImagePointer;
78  typedef typename TOutputImage::PixelType OutputPixelType;
79  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
80  typedef typename TInputImage::PixelType InputPixelType;
81  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
82  typedef typename OutputPixelType::ValueType ScalarValueType;
83 
85  itkStaticConstMacro(ImageDimension, unsigned int,
86  TOutputImage::ImageDimension);
87 
89  typedef TInputImage InputImageType;
90  typedef TOutputImage OutputImageType;
91 
94 
96  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
97 
101  void SetOperator(const Neighborhood< ScalarValueType,
102  itkGetStaticConstMacro(ImageDimension) > & p)
103  {
104  m_Operator = p;
105  this->Modified();
106  }
108 
114  void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
115  { m_BoundsCondition = i; }
116 
124  virtual void GenerateInputRequestedRegion()
125  throw ( InvalidRequestedRegionError );
126 
127 #ifdef ITK_USE_CONCEPT_CHECKING
128 
129  itkConceptMacro( InputHasNumericTraitsCheck,
131  itkConceptMacro( OutputHasNumericTraitsCheck,
133 
135 #endif
136 protected:
140 
151  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
152  ThreadIdType threadId);
153 
154  void PrintSelf(std::ostream & os, Indent indent) const
155  { Superclass::PrintSelf(os, indent); }
156 private:
157  VectorNeighborhoodOperatorImageFilter(const Self &); //purposely not
158  // implemented
159  void operator=(const Self &); //purposely not
160 
161  // implemented
162 
165 
169 };
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkVectorNeighborhoodOperatorImageFilter.hxx"
174 #endif
175 
176 #endif
177