ITK  5.3.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 
45 template <typename TInputImage>
46 class ITK_TEMPLATE_EXPORT BinaryGrindPeakImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_MOVE(BinaryGrindPeakImageFilter);
50 
56 
58  using InputImageType = TInputImage;
59  using OutputImageType = TInputImage;
60  using InputImagePointer = typename InputImageType::Pointer;
61  using InputImageConstPointer = typename InputImageType::ConstPointer;
63  using InputImagePixelType = typename InputImageType::PixelType;
64  using OutputImagePointer = typename OutputImageType::Pointer;
65  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
67  using OutputImagePixelType = typename OutputImageType::PixelType;
68 
70  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
71  static constexpr unsigned int OutputImageDimension = OutputImageType::ImageDimension;
72 
74  itkNewMacro(Self);
75 
78 
85  itkSetMacro(FullyConnected, bool);
86  itkGetConstReferenceMacro(FullyConnected, bool);
87  itkBooleanMacro(FullyConnected);
89 
90 #ifdef ITK_USE_CONCEPT_CHECKING
91  // Begin concept checking
93  // End concept checking
94 #endif
95 
98  itkSetMacro(ForegroundValue, InputImagePixelType);
99 
102  itkGetMacro(ForegroundValue, InputImagePixelType);
103 
105  itkSetMacro(BackgroundValue, InputImagePixelType);
106 
108  itkGetMacro(BackgroundValue, InputImagePixelType);
109 
110 protected:
112  ~BinaryGrindPeakImageFilter() override = default;
113  void
114  PrintSelf(std::ostream & os, Indent indent) const override;
115 
119  void
120  GenerateInputRequestedRegion() override;
121 
123  void
124  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
125 
128  void
129  GenerateData() override;
130 
131 private:
133 
135 
136  bool m_FullyConnected{ false };
137 
138 }; // end of class
139 
140 } // end namespace itk
141 
142 #ifndef ITK_MANUAL_INSTANTIATION
143 # include "itkBinaryGrindPeakImageFilter.hxx"
144 #endif
145 
146 #endif
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:636
itk::BinaryGrindPeakImageFilter
Remove the objects not connected to the boundary of the image.
Definition: itkBinaryGrindPeakImageFilter.h:46
itk::BinaryGrindPeakImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkBinaryGrindPeakImageFilter.h:61
itk::BinaryGrindPeakImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkBinaryGrindPeakImageFilter.h:66
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:63
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:64
itk::BinaryGrindPeakImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkBinaryGrindPeakImageFilter.h:60
itk::BinaryGrindPeakImageFilter::m_BackgroundValue
InputImagePixelType m_BackgroundValue
Definition: itkBinaryGrindPeakImageFilter.h:134
itkImageToImageFilter.h
itk::BinaryGrindPeakImageFilter::OutputImageType
TInputImage OutputImageType
Definition: itkBinaryGrindPeakImageFilter.h:59
itk::BinaryGrindPeakImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkBinaryGrindPeakImageFilter.h:62
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::BinaryGrindPeakImageFilter::InputImageType
TInputImage InputImageType
Definition: itkBinaryGrindPeakImageFilter.h:58
itk::BinaryGrindPeakImageFilter::m_ForegroundValue
InputImagePixelType m_ForegroundValue
Definition: itkBinaryGrindPeakImageFilter.h:132
itk::BinaryGrindPeakImageFilter::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkBinaryGrindPeakImageFilter.h:67
itk::BinaryGrindPeakImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkBinaryGrindPeakImageFilter.h:65
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293