ITK  5.0.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< typename TInputImage, typename TOutputImage >
58 class ITK_TEMPLATE_EXPORT VectorNeighborhoodOperatorImageFilter:
59  public ImageToImageFilter< TInputImage, TOutputImage >
60 {
61 public:
62  ITK_DISALLOW_COPY_AND_ASSIGN(VectorNeighborhoodOperatorImageFilter);
63 
69 
71  itkNewMacro(Self);
72 
75 
78  using InputImagePointer = typename TInputImage::Pointer;
79  using OutputImagePointer = typename TOutputImage::Pointer;
80  using OutputPixelType = typename TOutputImage::PixelType;
81  using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
82  using InputPixelType = typename TInputImage::PixelType;
83  using InputInternalPixelType = typename TInputImage::InternalPixelType;
84  using ScalarValueType = typename OutputPixelType::ValueType;
85 
87  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
88 
90  using InputImageType = TInputImage;
91  using OutputImageType = TOutputImage;
92 
95 
97  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
98 
103  Self::ImageDimension > & p)
104  {
105  m_Operator = p;
106  this->Modified();
107  }
109 
116  { m_BoundsCondition = i; }
117 
125  void GenerateInputRequestedRegion() override;
126 
127 #ifdef ITK_USE_CONCEPT_CHECKING
128  // Begin concept checking
129  itkConceptMacro( InputHasNumericTraitsCheck,
131  itkConceptMacro( OutputHasNumericTraitsCheck,
133  // End concept checking
134 #endif
135 
136 protected:
138  m_BoundsCondition(nullptr)
139  {
140  this->DynamicMultiThreadingOn();
141  }
142 
143  ~VectorNeighborhoodOperatorImageFilter() override = default;
144 
155  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
156 
157 
158  void PrintSelf(std::ostream & os, Indent indent) const override
159  { Superclass::PrintSelf(os, indent); }
160 
161 private:
164 
168 };
169 } // end namespace itk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 #include "itkVectorNeighborhoodOperatorImageFilter.hxx"
173 #endif
174 
175 #endif
typename OutputImageType::Pointer OutputImagePointer
A light-weight container object for storing an N-dimensional neighborhood of values.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename TInputImage::InternalPixelType InputInternalPixelType
void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
Neighborhood< ScalarValueType, Self::ImageDimension > m_Operator
typename InputImageType::Pointer InputImagePointer
void SetOperator(const Neighborhood< ScalarValueType, Self::ImageDimension > &p)
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename TOutputImage::InternalPixelType OutputInternalPixelType
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
#define itkConceptMacro(name, concept)
Applies a single scalar NeighborhoodOperator to an itk::Vector image region.
void PrintSelf(std::ostream &os, Indent indent) const override