ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkRegionalMinimaImageFilter.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 itkRegionalMinimaImageFilter_h
19 #define itkRegionalMinimaImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
51 template< typename TInputImage, typename TOutputImage >
52 class ITK_TEMPLATE_EXPORT RegionalMinimaImageFilter:
53  public ImageToImageFilter< TInputImage, TOutputImage >
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(RegionalMinimaImageFilter);
57 
63 
65  using InputImageType = TInputImage;
66  using OutputImageType = TOutputImage;
67  using InputImagePointer = typename InputImageType::Pointer;
68  using InputImageConstPointer = typename InputImageType::ConstPointer;
70  using InputImagePixelType = typename InputImageType::PixelType;
71  using OutputImagePointer = typename OutputImageType::Pointer;
72  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
74  using OutputImagePixelType = typename OutputImageType::PixelType;
75 
77  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
78  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
79 
81  itkNewMacro(Self);
82 
84  itkTypeMacro(RegionalMinimaImageFilter,
86 
93  itkSetMacro(FullyConnected, bool);
94  itkGetConstReferenceMacro(FullyConnected, bool);
95  itkBooleanMacro(FullyConnected);
97 
102  itkSetMacro(ForegroundValue, OutputImagePixelType);
103  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
105 
110  itkSetMacro(BackgroundValue, OutputImagePixelType);
111  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
113 
118  itkSetMacro(FlatIsMinima, bool);
119  itkGetConstMacro(FlatIsMinima, bool);
120  itkBooleanMacro(FlatIsMinima);
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124  // Begin concept checking
125  itkConceptMacro( InputHasPixelTraitsCheck,
127  itkConceptMacro( InputHasNumericTraitsCheck,
129  // End concept checking
130 #endif
131 
132 protected:
134  ~RegionalMinimaImageFilter() override = default;
135  void PrintSelf(std::ostream & os, Indent indent) const override;
136 
140  void GenerateInputRequestedRegion() override;
141 
143  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override;
144 
147  void GenerateData() override;
148 
149 private:
150  bool m_FullyConnected{ false };
151  bool m_FlatIsMinima{ true };
154 }; // end of class
155 } // end namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 #include "itkRegionalMinimaImageFilter.hxx"
159 #endif
160 
161 #endif
typename OutputImageType::ConstPointer OutputImageConstPointer
typename OutputImageType::Pointer OutputImagePointer
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 OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::Pointer InputImagePointer
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
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)
typename InputImageType::ConstPointer InputImageConstPointer
Produce a binary image where foreground is the regional minima of the input image.
Base class for all data objects in ITK.