ITK  5.1.0
Insight Toolkit
itkConfidenceConnectedImageFilter.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 itkConfidenceConnectedImageFilter_h
19 #define itkConfidenceConnectedImageFilter_h
20 
21 #include "itkImage.h"
22 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
62 template <typename TInputImage, typename TOutputImage>
63 class ITK_TEMPLATE_EXPORT ConfidenceConnectedImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
64 {
65 public:
66  ITK_DISALLOW_COPY_AND_ASSIGN(ConfidenceConnectedImageFilter);
67 
73 
75  itkNewMacro(Self);
76 
79 
80  using InputImageType = TInputImage;
81  using InputImagePointer = typename InputImageType::Pointer;
83  using InputImagePixelType = typename InputImageType::PixelType;
86 
87  using OutputImageType = TOutputImage;
88  using OutputImagePointer = typename OutputImageType::Pointer;
90  using OutputImagePixelType = typename OutputImageType::PixelType;
91 
92  using SeedsContainerType = std::vector<IndexType>;
93 
95 
96  void
97  PrintSelf(std::ostream & os, Indent indent) const override;
98 
100  void
101  SetSeed(const IndexType & seed);
102 
104  void
105  ClearSeeds();
106 
108  void
109  AddSeed(const IndexType & seed);
110 
113  itkSetMacro(Multiplier, double);
114  itkGetConstMacro(Multiplier, double);
116 
118  itkSetMacro(NumberOfIterations, unsigned int);
119  itkGetConstMacro(NumberOfIterations, unsigned int);
121 
123  itkSetMacro(ReplaceValue, OutputImagePixelType);
124  itkGetConstMacro(ReplaceValue, OutputImagePixelType);
126 
129  itkSetMacro(InitialNeighborhoodRadius, unsigned int);
130  itkGetConstReferenceMacro(InitialNeighborhoodRadius, unsigned int);
132 
136  itkGetConstReferenceMacro(Mean, InputRealType);
137 
141  itkGetConstReferenceMacro(Variance, InputRealType);
142 
144  virtual const SeedsContainerType &
145  GetSeeds() const;
146 
147 #ifdef ITK_USE_CONCEPT_CHECKING
148  // Begin concept checking
151  // End concept checking
152 #endif
153 
154 protected:
156  ~ConfidenceConnectedImageFilter() override = default;
157 
158  // Override since the filter needs all the data for the algorithm
159  void
160  GenerateInputRequestedRegion() override;
161 
162  // Override since the filter produces the entire dataset
163  void
164  EnlargeOutputRequestedRegion(DataObject * output) override;
165 
166  void
167  GenerateData() override;
168 
169 private:
171  double m_Multiplier;
172  unsigned int m_NumberOfIterations;
177 };
178 } // end namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 # include "itkConfidenceConnectedImageFilter.hxx"
182 #endif
183 
184 #endif
itk::ConfidenceConnectedImageFilter::m_Multiplier
double m_Multiplier
Definition: itkConfidenceConnectedImageFilter.h:171
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:712
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::ConfidenceConnectedImageFilter::SizeType
typename InputImageType::SizeType SizeType
Definition: itkConfidenceConnectedImageFilter.h:85
itk::ConfidenceConnectedImageFilter::m_ReplaceValue
OutputImagePixelType m_ReplaceValue
Definition: itkConfidenceConnectedImageFilter.h:173
itk::ConfidenceConnectedImageFilter::IndexType
typename InputImageType::IndexType IndexType
Definition: itkConfidenceConnectedImageFilter.h:84
itk::ConfidenceConnectedImageFilter::InputRealType
typename NumericTraits< InputImagePixelType >::RealType InputRealType
Definition: itkConfidenceConnectedImageFilter.h:94
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itkImage.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
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::ConfidenceConnectedImageFilter::m_Mean
InputRealType m_Mean
Definition: itkConfidenceConnectedImageFilter.h:175
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::ConfidenceConnectedImageFilter
Segment pixels with similar statistics using connectivity.
Definition: itkConfidenceConnectedImageFilter.h:63
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ConfidenceConnectedImageFilter::m_NumberOfIterations
unsigned int m_NumberOfIterations
Definition: itkConfidenceConnectedImageFilter.h:172
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
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::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::ConfidenceConnectedImageFilter::m_Variance
InputRealType m_Variance
Definition: itkConfidenceConnectedImageFilter.h:176
itk::ConfidenceConnectedImageFilter::m_InitialNeighborhoodRadius
unsigned int m_InitialNeighborhoodRadius
Definition: itkConfidenceConnectedImageFilter.h:174
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ConfidenceConnectedImageFilter::SeedsContainerType
std::vector< IndexType > SeedsContainerType
Definition: itkConfidenceConnectedImageFilter.h:92
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:288
itk::ConfidenceConnectedImageFilter::m_Seeds
SeedsContainerType m_Seeds
Definition: itkConfidenceConnectedImageFilter.h:170