ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkNeighborhoodOperatorImageFilter.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 itkNeighborhoodOperatorImageFilter_h
19 #define itkNeighborhoodOperatorImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 #include "itkImage.h"
25 
26 namespace itk
27 {
50 template< typename TInputImage, typename TOutputImage, typename TOperatorValueType = typename TOutputImage::PixelType >
52  public ImageToImageFilter< TInputImage, TOutputImage >
53 {
54 public:
60 
62  itkNewMacro(Self);
63 
66 
69  typedef typename TOutputImage::PixelType OutputPixelType;
70  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
71  typedef typename TInputImage::PixelType InputPixelType;
72  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
73  typedef TOperatorValueType OperatorValueType;
74 
77 
80  itkStaticConstMacro(ImageDimension, unsigned int,
81  TOutputImage::ImageDimension);
82  itkStaticConstMacro(InputImageDimension, unsigned int,
83  TInputImage::ImageDimension);
85 
87  typedef TInputImage InputImageType;
88  typedef TOutputImage OutputImageType;
89  typedef typename InputImageType::Pointer InputImagePointer;
90 
94 
97 
100 
103  itkGetStaticConstMacro(ImageDimension) > OutputNeighborhoodType;
104 
109  {
110  m_Operator = p;
111  this->Modified();
112  }
114 
117  { return m_Operator; }
118 
125  { m_BoundsCondition = i; }
126 
129  { return m_BoundsCondition; }
130 
138  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
139 
140 #ifdef ITK_USE_CONCEPT_CHECKING
141  // Begin concept checking
142  itkConceptMacro( SameDimensionCheck,
144  itkConceptMacro( OperatorConvertibleToOutputCheck,
146  itkConceptMacro( InputConvertibleToOperatorCheck,
148  itkConceptMacro( OperatorMultiplyOperatorCheck,
150  itkConceptMacro( OperatorAdditiveOperatorsCheck,
152  // End concept checking
153 #endif
154 
155 protected:
159 
171  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
172  ThreadIdType threadId) ITK_OVERRIDE;
173 
174  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
175  { Superclass::PrintSelf(os, indent); }
176 
177 private:
178  NeighborhoodOperatorImageFilter(const Self &); //purposely not implemented
179  void operator=(const Self &); //purposely not implemented
180 
183 
187 
190 };
191 } // end namespace itk
192 
193 #ifndef ITK_MANUAL_INSTANTIATION
194 #include "itkNeighborhoodOperatorImageFilter.hxx"
195 #endif
196 
197 #endif
ImageBoundaryConditionPointerType GetBoundaryCondition()
virtual void PrintSelf(std::ostream &os, Indent indent) const override
A light-weight container object for storing an N-dimensional neighborhood of values.
TOutputImage::InternalPixelType OutputInternalPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
Base class for all process objects that output image data.
ImageToImageFilter< TInputImage, TOutputImage > Superclass
virtual void GenerateInputRequestedRegion() override
const OutputNeighborhoodType & GetOperator() const
Neighborhood< OperatorValueType, itkGetStaticConstMacro(ImageDimension) > OutputNeighborhoodType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
NumericTraits< InputPixelType >::ValueType InputPixelValueType
virtual void Modified() const
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Superclass::OutputImageRegionType OutputImageRegionType
ZeroFluxNeumannBoundaryCondition< InputImageType > DefaultBoundaryCondition
void SetOperator(const OutputNeighborhoodType &p)
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::OutputImageRegionType OutputImageRegionType
Define additional traits for native types such as int or float.
Applies a single NeighborhoodOperator to an image region.
#define itkConceptMacro(name, concept)
ImageBoundaryCondition< InputImageType > * ImageBoundaryConditionPointerType
void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
NumericTraits< OutputPixelType >::RealType ComputingPixelType