ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkMaskFeaturePointSelectionFilter.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 itkMaskFeaturePointSelectionFilter_h
19 #define itkMaskFeaturePointSelectionFilter_h
20 
21 #include "itkImageToMeshFilter.h"
23 #include "itkImage.h"
24 #include "itkPointSet.h"
27 #include "itkMatrix.h"
28 #include "itkConceptChecking.h"
29 #include <vector>
30 
31 
32 namespace itk
33 {
58 template<
59  typename TImage,
60  typename TMask = TImage,
61  typename TFeatures = PointSet< Matrix< SpacePrecisionType, TImage::ImageDimension, TImage::ImageDimension>, TImage::ImageDimension > >
62 class MaskFeaturePointSelectionFilter: public ImageToMeshFilter< TImage, TFeatures >
63 {
64 public:
70 
72  itkNewMacro(Self);
73 
76 
77  itkStaticConstMacro(ImageDimension, unsigned, 3u);
78 
84 
86  typedef TImage ImageType;
87  typedef typename ImageType::ConstPointer ImageConstPointer;
88  typedef typename ImageType::PixelType ImagePixelType;
89 
91  typedef TMask MaskType;
92  typedef typename MaskType::ConstPointer MaskConstPointer;
93  typedef typename MaskType::PixelType MaskPixelType;
94 
96  typedef TFeatures FeaturePointsType;
97  typedef typename FeaturePointsType::Pointer FeaturePointsPointer;
98  typedef typename FeaturePointsType::PixelType StructureTensorType;
99  typedef typename FeaturePointsType::PointType PointType;
100 
102  enum
103  {
107  };
108 
113  itkSetMacro(NonConnectivity, unsigned);
114  itkGetMacro(NonConnectivity, unsigned);
116 
118  itkSetInputMacro(MaskImage, MaskType);
119  itkGetInputMacro(MaskImage, MaskType);
121 
123  itkSetMacro(BlockRadius, SizeType);
124  itkGetConstReferenceMacro(BlockRadius, SizeType);
126 
128  itkSetMacro(ComputeStructureTensors, bool);
129  itkGetMacro(ComputeStructureTensors, bool);
130  itkBooleanMacro(ComputeStructureTensors);
132 
134  itkSetClampMacro(SelectFraction, double, 0, 1);
135  itkGetMacro(SelectFraction, double);
137 
138 #ifdef ITK_USE_CONCEPT_CHECKING
139  // Begin concept checking
140  itkConceptMacro( ImageDimensionShouldBe3,
142  itkConceptMacro( MaskDimensionShouldBe3,
144  itkConceptMacro( PointDimensionShouldBe3,
146  // End concept checking
147 #endif
148 
149 protected:
152  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
153 
154  void GenerateData() ITK_OVERRIDE;
155 
160  void ComputeConnectivityOffsets( void ) throw ( ExceptionObject );
161 
162 private:
163  // purposely not implemented
165  void operator=(const MaskFeaturePointSelectionFilter &);
166 
172 };
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkMaskFeaturePointSelectionFilter.hxx"
177 #endif
178 
179 #endif
Light weight base class for most itk classes.
Represent the offset between two n-dimensional indexes in a n-dimensional image.
Definition: itkOffset.h:55
An image region represents a structured region of data.
ImageToMeshFilter< TImage, TFeatures > Superclass
ImageToMeshFilter is the base class for all process objects that output Mesh data and require image d...
Generate a PointSet containing the feature points selected from a masked 3D input image...
Standard exception handling object.
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:71