ITK  5.1.0
Insight Toolkit
itkValuedRegionalExtremaImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkValuedRegionalExtremaImageFilter_h
19 #define itkValuedRegionalExtremaImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
24 #include <stack>
25 
26 namespace itk
27 {
77 template <typename TInputImage, typename TOutputImage, typename TFunction1, typename TFunction2>
78 class ITK_TEMPLATE_EXPORT ValuedRegionalExtremaImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
79 {
80 public:
81  ITK_DISALLOW_COPY_AND_ASSIGN(ValuedRegionalExtremaImageFilter);
82 
88 
90  using InputImageType = TInputImage;
91  using OutputImageType = TOutputImage;
92  using InputImagePointer = typename InputImageType::Pointer;
93  using InputImageConstPointer = typename InputImageType::ConstPointer;
95  using InputImagePixelType = typename InputImageType::PixelType;
97  using OutputImagePointer = typename OutputImageType::Pointer;
98  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
100  using OutputImagePixelType = typename OutputImageType::PixelType;
101 
103  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
104  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
105 
107  itkNewMacro(Self);
108 
111 
118  itkSetMacro(FullyConnected, bool);
119  itkGetConstReferenceMacro(FullyConnected, bool);
120  itkBooleanMacro(FullyConnected);
122 
126  itkSetMacro(MarkerValue, typename TInputImage::PixelType);
127  itkGetConstReferenceMacro(MarkerValue, typename TInputImage::PixelType);
129 
133  itkGetConstMacro(Flat, bool);
134 
135 #ifdef ITK_USE_CONCEPT_CHECKING
136  // Begin concept checking
139  // End concept checking
140 #endif
141 
142 protected:
144  ~ValuedRegionalExtremaImageFilter() override = default;
145  void
146  PrintSelf(std::ostream & os, Indent indent) const override;
147 
151  void
152  GenerateInputRequestedRegion() override;
153 
155  void
156  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
157 
158  void
159  GenerateData() override;
160 
161 private:
162  typename TInputImage::PixelType m_MarkerValue;
163 
164  bool m_FullyConnected{ false };
165  bool m_Flat{ false };
166 
171  using IndexStack = std::stack<OutIndexType>;
172 }; // end of class
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 # include "itkValuedRegionalExtremaImageFilter.hxx"
177 #endif
178 
179 #endif
itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, std::less< TInputImage::PixelType >, std::less< TOutputImage::PixelType > >::ISizeType
typename InputImageType::SizeType ISizeType
Definition: itkValuedRegionalExtremaImageFilter.h:96
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:712
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:153
itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, std::less< TInputImage::PixelType >, std::less< TOutputImage::PixelType > >::IndexStack
std::stack< OutIndexType > IndexStack
Definition: itkValuedRegionalExtremaImageFilter.h:171
itkConstantBoundaryCondition.h
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ValuedRegionalExtremaImageFilter::m_MarkerValue
TInputImage::PixelType m_MarkerValue
Definition: itkValuedRegionalExtremaImageFilter.h:162
itk::ValuedRegionalExtremaImageFilter
Uses a flooding algorithm to set all voxels that are not a regional extrema to the max or min of the ...
Definition: itkValuedRegionalExtremaImageFilter.h:78
itk::ConstShapedNeighborhoodIterator
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
Definition: itkConstShapedNeighborhoodIterator.h:71
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, std::less< TInputImage::PixelType >, std::less< TOutputImage::PixelType > >::InIndexType
typename InputImageType::IndexType InIndexType
Definition: itkValuedRegionalExtremaImageFilter.h:168
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::Concept::HasPixelTraits
Definition: itkConceptChecking.h:750
itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, std::less< TInputImage::PixelType >, std::less< TOutputImage::PixelType > >::OutIndexType
typename OutputImageType::IndexType OutIndexType
Definition: itkValuedRegionalExtremaImageFilter.h:167
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ImageToImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkImageToImageFilter.h:131
itk::ValuedRegionalExtremaImageFilter< TInputImage, TOutputImage, std::less< TInputImage::PixelType >, std::less< TOutputImage::PixelType > >::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkValuedRegionalExtremaImageFilter.h:98
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293