ITK  6.0.0
Insight Toolkit
itkMaskFeaturePointSelectionFilter.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 itkMaskFeaturePointSelectionFilter_h
19#define itkMaskFeaturePointSelectionFilter_h
20
23#include "itkImage.h"
24#include "itkPointSet.h"
27#include "itkMatrix.h"
28#include "itkConceptChecking.h"
29#include <vector>
30
31
32namespace itk
33{
59template <typename TImage,
60 typename TMask = TImage,
61 typename TFeatures = PointSet<Matrix<SpacePrecisionType, TImage::ImageDimension, TImage::ImageDimension>,
62 TImage::ImageDimension>>
63class ITK_TEMPLATE_EXPORT MaskFeaturePointSelectionFilter : public ImageToMeshFilter<TImage, TFeatures>
64{
65public:
66 ITK_DISALLOW_COPY_AND_MOVE(MaskFeaturePointSelectionFilter);
67
73
75 itkNewMacro(Self);
76
78 itkOverrideGetNameOfClassMacro(MaskFeaturePointSelectionFilter);
79
80 static constexpr unsigned int ImageDimension = 3u;
81
87
89 using ImageType = TImage;
91 using ImagePixelType = typename ImageType::PixelType;
92
94 using MaskType = TMask;
96 using MaskPixelType = typename MaskType::PixelType;
97
99 using FeaturePointsType = TFeatures;
101 using StructureTensorType = typename FeaturePointsType::PixelType;
103
105 enum
106 {
107 VERTEX_CONNECTIVITY = 0,
108 EDGE_CONNECTIVITY = 1,
109 FACE_CONNECTIVITY = 2
110 };
111
116 itkSetMacro(NonConnectivity, unsigned int);
117 itkGetMacro(NonConnectivity, unsigned int);
126 itkSetMacro(BlockRadius, SizeType);
127 itkGetConstReferenceMacro(BlockRadius, SizeType);
131 itkSetMacro(ComputeStructureTensors, bool);
132 itkGetMacro(ComputeStructureTensors, bool);
133 itkBooleanMacro(ComputeStructureTensors);
137 itkSetClampMacro(SelectFraction, double, 0, 1);
138 itkGetMacro(SelectFraction, double);
141#ifdef ITK_USE_CONCEPT_CHECKING
142 // Begin concept checking
146 // End concept checking
147#endif
148
149protected:
152 void
153 PrintSelf(std::ostream & os, Indent indent) const override;
154
155 void
156 GenerateData() override;
157
162 void
164
165private:
166 unsigned int m_NonConnectivity{};
167 std::vector<OffsetType> m_NonConnectivityOffsets{};
168 SizeType m_BlockRadius{};
169 double m_SelectFraction{};
170 bool m_ComputeStructureTensors{};
171};
172} // end namespace itk
173
174#ifndef ITK_MANUAL_INSTANTIATION
175# include "itkMaskFeaturePointSelectionFilter.hxx"
176#endif
177
178#endif
An image region represents a structured region of data.
ImageToMeshFilter is the base class for all process objects that output Mesh data and require image d...
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Generate a PointSet containing the feature points selected from a masked 3D input image.
~MaskFeaturePointSelectionFilter() override=default
itkSetInputMacro(MaskImage, MaskType)
typename FeaturePointsType::Pointer FeaturePointsPointer
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetInputMacro(MaskImage, MaskType)
typename FeaturePointsType::PointType PointType
typename FeaturePointsType::PixelType StructureTensorType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:69