ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkStatisticsKeepNObjectsLabelMapFilter.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 __itkStatisticsKeepNObjectsLabelMapFilter_h
19 #define __itkStatisticsKeepNObjectsLabelMapFilter_h
20 
24 
25 namespace itk
26 {
45 template< typename TImage >
47  public ShapeKeepNObjectsLabelMapFilter< TImage >
48 {
49 public:
55 
57  typedef TImage ImageType;
58  typedef typename ImageType::Pointer ImagePointer;
59  typedef typename ImageType::ConstPointer ImageConstPointer;
60  typedef typename ImageType::PixelType PixelType;
61  typedef typename ImageType::IndexType IndexType;
62  typedef typename ImageType::LabelObjectType LabelObjectType;
63 
64  typedef typename LabelObjectType::AttributeType AttributeType;
65 
67  itkStaticConstMacro(ImageDimension, unsigned int,
68  TImage::ImageDimension);
69 
71  itkNewMacro(Self);
72 
76 
77 #ifdef ITK_USE_CONCEPT_CHECKING
78  // Begin concept checking
79 /* itkConceptMacro(InputEqualityComparableCheck,
80  (Concept::EqualityComparable<InputImagePixelType>));
81  itkConceptMacro(IntConvertibleToInputCheck,
82  (Concept::Convertible<int, InputImagePixelType>));
83  itkConceptMacro(InputOStreamWritableCheck,
84  (Concept::OStreamWritable<InputImagePixelType>));*/
85 // End concept checking
86 #endif
87 
88 protected:
91 
92  void GenerateData();
93 
94 private:
95  StatisticsKeepNObjectsLabelMapFilter(const Self &); //purposely not
96  // implemented
97  void operator=(const Self &); //purposely not
98  // implemented
99 }; // end of class
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkStatisticsKeepNObjectsLabelMapFilter.hxx"
104 #endif
105 
106 #endif
Light weight base class for most itk classes.
keep N objects according to their statistics attributes
Keep N objects according to their shape attributes.