ITK  5.1.0
Insight Segmentation and Registration Toolkit
itkMeanImageFilter.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 itkMeanImageFilter_h
19 #define itkMeanImageFilter_h
20 
21 #include "itkBoxImageFilter.h"
22 #include "itkImage.h"
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
47 template <typename TInputImage, typename TOutputImage>
48 class ITK_TEMPLATE_EXPORT MeanImageFilter : public BoxImageFilter<TInputImage, TOutputImage>
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_ASSIGN(MeanImageFilter);
52 
54  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
55  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
56 
58  using InputImageType = TInputImage;
59  using OutputImageType = TOutputImage;
60 
66 
68  itkNewMacro(Self);
69 
71  itkTypeMacro(MeanImageFilter, BoxImageFilter);
72 
74  using InputPixelType = typename InputImageType::PixelType;
75  using OutputPixelType = typename OutputImageType::PixelType;
77 
80 
82 
83 #ifdef ITK_USE_CONCEPT_CHECKING
84  // Begin concept checking
85  itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputPixelType>));
86  // End concept checking
87 #endif
88 
89 protected:
91  ~MeanImageFilter() override = default;
92 
103  void
104  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
105 };
106 } // end namespace itk
108 
109 #ifndef ITK_MANUAL_INSTANTIATION
110 # include "itkMeanImageFilter.hxx"
111 #endif
112 
113 #endif
itk::MeanImageFilter
Applies an averaging filter to an image.
Definition: itkMeanImageFilter.h:48
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:712
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkImage.h
itk::SmartPointer< Self >
itk::BoxImageFilter
A base class for all the filters working on a box neighborhood.
Definition: itkBoxImageFilter.h:40
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BoxImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkBoxImageFilter.h:64
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::MeanImageFilter::InputRealType
typename NumericTraits< InputPixelType >::RealType InputRealType
Definition: itkMeanImageFilter.h:76
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::MeanImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkMeanImageFilter.h:81
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itkBoxImageFilter.h
itkNumericTraits.h
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90