ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVectorConfidenceConnectedImageFilter.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 itkVectorConfidenceConnectedImageFilter_h
19 #define itkVectorConfidenceConnectedImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
58 template< typename TInputImage, typename TOutputImage >
59 class ITK_TEMPLATE_EXPORT VectorConfidenceConnectedImageFilter:
60  public ImageToImageFilter< TInputImage, TOutputImage >
61 {
62 public:
63  ITK_DISALLOW_COPY_AND_ASSIGN(VectorConfidenceConnectedImageFilter);
64 
70 
72  itkNewMacro(Self);
73 
77 
78  using InputImageType = TInputImage;
79  using InputImagePointer = typename InputImageType::Pointer;
81  using InputImagePixelType = typename InputImageType::PixelType;
84 
85  using OutputImageType = TOutputImage;
86  using OutputImagePointer = typename OutputImageType::Pointer;
88  using OutputImagePixelType = typename OutputImageType::PixelType;
89 
90  using SeedsContainerType = std::vector< IndexType >;
91 
93 
96 
98 
99  void PrintSelf(std::ostream & os, Indent indent) const override;
100 
102  void SetSeed(const IndexType & seed);
103 
105  void AddSeed(const IndexType & seed);
106 
108  void ClearSeeds();
109 
112  itkSetMacro(Multiplier, double);
113  itkGetConstMacro(Multiplier, double);
115 
117  itkSetMacro(NumberOfIterations, unsigned int);
118  itkGetConstMacro(NumberOfIterations, unsigned int);
120 
122  itkSetMacro(ReplaceValue, OutputImagePixelType);
123  itkGetConstMacro(ReplaceValue, OutputImagePixelType);
125 
128  itkSetMacro(InitialNeighborhoodRadius, unsigned int);
129  itkGetConstReferenceMacro(InitialNeighborhoodRadius, unsigned int);
131 
133  const MeanVectorType & GetMean() const;
134 
136  const CovarianceMatrixType & GetCovariance() const;
137 
139  virtual const SeedsContainerType &GetSeeds() const;
140 
141 
142 #ifdef ITK_USE_CONCEPT_CHECKING
143  // Begin concept checking
144  itkConceptMacro( OutputEqualityComparableCheck,
146  itkConceptMacro( InputHasNumericTraitsCheck,
148  itkConceptMacro( OutputOStreamWritableCheck,
150  // End concept checking
151 #endif
152 
153 protected:
155 
156  // Override since the filter needs all the data for the algorithm
157  void GenerateInputRequestedRegion() override;
158 
159  // Override since the filter produces the entire dataset
160  void EnlargeOutputRequestedRegion(DataObject *output) override;
161 
162  void GenerateData() override;
163 
164 private:
166  double m_Multiplier;
167  unsigned int m_NumberOfIterations;
170 
172 };
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkVectorConfidenceConnectedImageFilter.hxx"
177 #endif
178 
179 #endif
typename OutputImageType::Pointer OutputImagePointer
typename DistanceThresholdFunctionType::Pointer DistanceThresholdFunctionPointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename DistanceThresholdFunctionType::CovarianceMatrixType CovarianceMatrixType
Base class for all process objects that output image data.
typename DistanceThresholdFunctionType::MeanVectorType MeanVectorType
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::Pointer InputImagePointer
Returns true if the pixel value of a vector image has a Mahalanobis distance below the value specifie...
typename OutputImageType::RegionType OutputImageRegionType
Segment pixels with similar statistics using connectivity.
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)
Base class for all data objects in ITK.