ITK  5.4.0
Insight Toolkit
itkVectorConfidenceConnectedImageFilter.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  * https://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 itkVectorConfidenceConnectedImageFilter_h
19 #define itkVectorConfidenceConnectedImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
59 template <typename TInputImage, typename TOutputImage>
60 class ITK_TEMPLATE_EXPORT VectorConfidenceConnectedImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
61 {
62 public:
63  ITK_DISALLOW_COPY_AND_MOVE(VectorConfidenceConnectedImageFilter);
64 
70 
72  itkNewMacro(Self);
73 
75  itkOverrideGetNameOfClassMacro(VectorConfidenceConnectedImageFilter);
76 
77  using InputImageType = TInputImage;
80  using InputImagePixelType = typename InputImageType::PixelType;
83 
84  using OutputImageType = TOutputImage;
87  using OutputImagePixelType = typename OutputImageType::PixelType;
88 
89  using SeedsContainerType = std::vector<IndexType>;
90 
92 
95 
97 
98  void
99  PrintSelf(std::ostream & os, Indent indent) const override;
100 
102  void
103  SetSeed(const IndexType & seed);
104 
106  void
107  AddSeed(const IndexType & seed);
108 
110  void
111  ClearSeeds();
112 
115  itkSetMacro(Multiplier, double);
116  itkGetConstMacro(Multiplier, double);
120  itkSetMacro(NumberOfIterations, unsigned int);
121  itkGetConstMacro(NumberOfIterations, unsigned int);
125  itkSetMacro(ReplaceValue, OutputImagePixelType);
126  itkGetConstMacro(ReplaceValue, OutputImagePixelType);
131  itkSetMacro(InitialNeighborhoodRadius, unsigned int);
132  itkGetConstReferenceMacro(InitialNeighborhoodRadius, unsigned int);
136  const MeanVectorType &
137  GetMean() const;
138 
140  const CovarianceMatrixType &
141  GetCovariance() const;
142 
144  virtual const SeedsContainerType &
145  GetSeeds() const;
146 
147 
148 #ifdef ITK_USE_CONCEPT_CHECKING
149  // Begin concept checking
150  itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputImagePixelType>));
153  // End concept checking
154 #endif
155 
156 protected:
158 
159  // Override since the filter needs all the data for the algorithm
160  void
161  GenerateInputRequestedRegion() override;
162 
163  // Override since the filter produces the entire dataset
164  void
165  EnlargeOutputRequestedRegion(DataObject * output) override;
166 
167  void
168  GenerateData() override;
169 
170 private:
172  double m_Multiplier{};
173  unsigned int m_NumberOfIterations{};
174  OutputImagePixelType m_ReplaceValue{};
175  unsigned int m_InitialNeighborhoodRadius{};
176 
177  DistanceThresholdFunctionPointer m_ThresholdFunction{};
178 };
179 } // end namespace itk
180 
181 #ifndef ITK_MANUAL_INSTANTIATION
182 # include "itkVectorConfidenceConnectedImageFilter.hxx"
183 #endif
184 
185 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:636
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:714
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::VectorConfidenceConnectedImageFilter::IndexType
typename InputImageType::IndexType IndexType
Definition: itkVectorConfidenceConnectedImageFilter.h:81
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::MahalanobisDistanceThresholdImageFunction::CovarianceMatrixType
vnl_matrix< double > CovarianceMatrixType
Definition: itkMahalanobisDistanceThresholdImageFunction.h:86
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::MahalanobisDistanceThresholdImageFunction::MeanVectorType
vnl_vector< double > MeanVectorType
Definition: itkMahalanobisDistanceThresholdImageFunction.h:89
itk::VectorConfidenceConnectedImageFilter::MeanVectorType
typename DistanceThresholdFunctionType::MeanVectorType MeanVectorType
Definition: itkVectorConfidenceConnectedImageFilter.h:94
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::VectorConfidenceConnectedImageFilter::DistanceThresholdFunctionPointer
typename DistanceThresholdFunctionType::Pointer DistanceThresholdFunctionPointer
Definition: itkVectorConfidenceConnectedImageFilter.h:96
itk::VectorConfidenceConnectedImageFilter::SeedsContainerType
std::vector< IndexType > SeedsContainerType
Definition: itkVectorConfidenceConnectedImageFilter.h:89
itkMahalanobisDistanceThresholdImageFunction.h
itk::VectorConfidenceConnectedImageFilter
Segment pixels with similar statistics using connectivity.
Definition: itkVectorConfidenceConnectedImageFilter.h:60
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::VectorConfidenceConnectedImageFilter::CovarianceMatrixType
typename DistanceThresholdFunctionType::CovarianceMatrixType CovarianceMatrixType
Definition: itkVectorConfidenceConnectedImageFilter.h:93
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::MahalanobisDistanceThresholdImageFunction
Returns true if the pixel value of a vector image has a Mahalanobis distance below the value specifie...
Definition: itkMahalanobisDistanceThresholdImageFunction.h:50
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:306
itk::VectorConfidenceConnectedImageFilter::SizeType
typename InputImageType::SizeType SizeType
Definition: itkVectorConfidenceConnectedImageFilter.h:82
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293