ITK  5.1.0
Insight Toolkit
itkBinaryGrindPeakImageFilter.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 itkBinaryGrindPeakImageFilter_h
19 #define itkBinaryGrindPeakImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
25 
46 template <typename TInputImage>
47 class ITK_TEMPLATE_EXPORT BinaryGrindPeakImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryGrindPeakImageFilter);
51 
57 
59  using InputImageType = TInputImage;
60  using OutputImageType = TInputImage;
61  using InputImagePointer = typename InputImageType::Pointer;
62  using InputImageConstPointer = typename InputImageType::ConstPointer;
64  using InputImagePixelType = typename InputImageType::PixelType;
65  using OutputImagePointer = typename OutputImageType::Pointer;
66  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
68  using OutputImagePixelType = typename OutputImageType::PixelType;
69 
71  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
72  static constexpr unsigned int OutputImageDimension = OutputImageType::ImageDimension;
73 
75  itkNewMacro(Self);
76 
79 
86  itkSetMacro(FullyConnected, bool);
87  itkGetConstReferenceMacro(FullyConnected, bool);
88  itkBooleanMacro(FullyConnected);
90 
91 #ifdef ITK_USE_CONCEPT_CHECKING
92  // Begin concept checking
94  // End concept checking
95 #endif
96 
99  itkSetMacro(ForegroundValue, InputImagePixelType);
100 
103  itkGetMacro(ForegroundValue, InputImagePixelType);
104 
106  itkSetMacro(BackgroundValue, InputImagePixelType);
107 
109  itkGetMacro(BackgroundValue, InputImagePixelType);
110 
111 protected:
113  ~BinaryGrindPeakImageFilter() override = default;
114  void
115  PrintSelf(std::ostream & os, Indent indent) const override;
116 
120  void
121  GenerateInputRequestedRegion() override;
122 
124  void
125  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
126 
129  void
130  GenerateData() override;
131 
132 private:
134 
136 
137  bool m_FullyConnected{ false };
138 
139 }; // end of class
140 
141 } // end namespace itk
142 
143 #ifndef ITK_MANUAL_INSTANTIATION
144 # include "itkBinaryGrindPeakImageFilter.hxx"
145 #endif
146 
147 #endif
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:634
itk::BinaryGrindPeakImageFilter
Remove the objects not connected to the boundary of the image.
Definition: itkBinaryGrindPeakImageFilter.h:47
itk::BinaryGrindPeakImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkBinaryGrindPeakImageFilter.h:62
itk::BinaryGrindPeakImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkBinaryGrindPeakImageFilter.h:67
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::BinaryGrindPeakImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkBinaryGrindPeakImageFilter.h:64
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::BinaryGrindPeakImageFilter::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkBinaryGrindPeakImageFilter.h:65
itk::BinaryGrindPeakImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkBinaryGrindPeakImageFilter.h:61
itk::BinaryGrindPeakImageFilter::m_BackgroundValue
InputImagePixelType m_BackgroundValue
Definition: itkBinaryGrindPeakImageFilter.h:135
itkImageToImageFilter.h
itk::BinaryGrindPeakImageFilter::OutputImageType
TInputImage OutputImageType
Definition: itkBinaryGrindPeakImageFilter.h:60
itk::BinaryGrindPeakImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkBinaryGrindPeakImageFilter.h:63
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::BinaryGrindPeakImageFilter::InputImageType
TInputImage InputImageType
Definition: itkBinaryGrindPeakImageFilter.h:59
itk::BinaryGrindPeakImageFilter::m_ForegroundValue
InputImagePixelType m_ForegroundValue
Definition: itkBinaryGrindPeakImageFilter.h:133
itk::BinaryGrindPeakImageFilter::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkBinaryGrindPeakImageFilter.h:68
itk::BinaryGrindPeakImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkBinaryGrindPeakImageFilter.h:66
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293