ITK  5.1.0
Insight Toolkit
itkMovingHistogramMorphologyImageFilter.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 itkMovingHistogramMorphologyImageFilter_h
19 #define itkMovingHistogramMorphologyImageFilter_h
20 
21 #include "itkMorphologyHistogram.h"
24 #include <list>
25 #include <map>
26 
27 namespace itk
28 {
29 
43 template <typename TInputImage, typename TOutputImage, typename TKernel, typename THistogram>
44 class ITK_TEMPLATE_EXPORT MovingHistogramMorphologyImageFilter
45  : public MovingHistogramImageFilter<TInputImage, TOutputImage, TKernel, THistogram>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(MovingHistogramMorphologyImageFilter);
49 
55 
57  itkNewMacro(Self);
58 
61 
63  using InputImageType = TInputImage;
64  using OutputImageType = TOutputImage;
66  using SizeType = typename TInputImage::SizeType;
68  using PixelType = typename TInputImage::PixelType;
69  using OffsetType = typename TInputImage::OffsetType;
70  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
71  using OutputPixelType = typename TOutputImage::PixelType;
72 
74  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
75 
77  using KernelType = TKernel;
78 
80  using KernelIteratorType = typename KernelType::ConstIterator;
81 
83  using RadiusType = typename KernelType::SizeType;
84 
85  using OffsetListType = typename std::list<OffsetType>;
86 
87  using OffsetMapType = typename std::map<OffsetType, OffsetListType, Functor::LexicographicCompare>;
88 
91  itkSetMacro(Boundary, PixelType);
92  itkGetConstMacro(Boundary, PixelType);
94 
97  static bool
99  {
100  return THistogram::UseVectorBasedAlgorithm();
101  }
102 
103 protected:
105  ~MovingHistogramMorphologyImageFilter() override = default;
106  void
107  PrintSelf(std::ostream & os, Indent indent) const override;
108 
110  // void ThreadedGenerateData (const OutputImageRegionType&
111  // outputRegionForThread,
112  // ThreadIdType threadId);
113 
116  void
117  ConfigureHistogram(THistogram & histogram) override;
118 
120 }; // end of class
121 } // end namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
124 # include "itkMovingHistogramMorphologyImageFilter.hxx"
125 #endif
126 
127 #endif
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::MovingHistogramMorphologyImageFilter::m_Boundary
PixelType m_Boundary
Definition: itkMovingHistogramMorphologyImageFilter.h:119
itk::MovingHistogramImageFilterBase::KernelIteratorType
typename KernelType::ConstIterator KernelIteratorType
Definition: itkMovingHistogramImageFilterBase.h:126
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkLexicographicCompare.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BoxImageFilter::RadiusType
typename TInputImage::SizeType RadiusType
Definition: itkBoxImageFilter.h:73
itk::BoxImageFilter::OffsetType
typename TInputImage::OffsetType OffsetType
Definition: itkBoxImageFilter.h:62
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::BoxImageFilter::IndexType
typename TInputImage::IndexType IndexType
Definition: itkBoxImageFilter.h:61
itk::MovingHistogramImageFilterBase::PixelType
typename TInputImage::PixelType PixelType
Definition: itkMovingHistogramImageFilterBase.h:114
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::MovingHistogramMorphologyImageFilter::GetUseVectorBasedAlgorithm
static bool GetUseVectorBasedAlgorithm()
Definition: itkMovingHistogramMorphologyImageFilter.h:98
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk::MovingHistogramImageFilter
Implements a generic moving histogram algorithm.
Definition: itkMovingHistogramImageFilter.h:88
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::MovingHistogramImageFilterBase::OffsetMapType
typename std::map< OffsetType, OffsetListType, Functor::LexicographicCompare > OffsetMapType
Definition: itkMovingHistogramImageFilterBase.h:133
itkMovingHistogramImageFilter.h
itk::BoxImageFilter::SizeType
typename TInputImage::SizeType SizeType
Definition: itkBoxImageFilter.h:60
itk::MovingHistogramMorphologyImageFilter
Base class for MovingHistogramDilateImageFilter and MovingHistogramErodeImageFilter.
Definition: itkMovingHistogramMorphologyImageFilter.h:44
itk::MovingHistogramImageFilterBase::OffsetListType
typename std::list< OffsetType > OffsetListType
Definition: itkMovingHistogramImageFilterBase.h:131
itkMorphologyHistogram.h
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::BoxImageFilter::RegionType
typename TInputImage::RegionType RegionType
Definition: itkBoxImageFilter.h:59