ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkLabelSelectionLabelMapFilter.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 itkLabelSelectionLabelMapFilter_h
19 #define itkLabelSelectionLabelMapFilter_h
20 
22 #include "itkLabelObject.h"
24 #include <set>
25 
26 
27 namespace itk {
52 template<typename TImage>
54  public AttributeSelectionLabelMapFilter<TImage, typename Functor::LabelLabelObjectAccessor< typename TImage::LabelObjectType > >
55 {
56 public:
63 
65  typedef TImage ImageType;
66  typedef typename ImageType::Pointer ImagePointer;
67  typedef typename ImageType::ConstPointer ImageConstPointer;
68  typedef typename ImageType::PixelType PixelType;
69  typedef typename ImageType::IndexType IndexType;
70 
73 
75 
77  itkStaticConstMacro(ImageDimension, unsigned int,
78  TImage::ImageDimension);
79 
81  itkNewMacro(Self);
82 
84  itkTypeMacro(LabelSelectionLabelMapFilter,
86 
87 #ifdef ITK_USE_CONCEPT_CHECKING
88  // Begin concept checking
89 /* itkConceptMacro(InputEqualityComparableCheck,
90  (Concept::EqualityComparable<InputImagePixelType>));
91  itkConceptMacro(IntConvertibleToInputCheck,
92  (Concept::Convertible<int, InputImagePixelType>));
93  itkConceptMacro(InputOStreamWritableCheck,
94  (Concept::OStreamWritable<InputImagePixelType>));*/
95  // End concept checking
96 #endif
97 
98  const AttributeSetType & GetLabelSet() const
99  {
100  return this->GetAttributeSet();
101  }
102 
103  void SetLabelSet( const AttributeSetType & set )
104  {
105  this->SetAttributeSet( set );
106  }
107 
109  void SetLabel( const AttributeValueType & attr )
110  {
111  this->SetAttribute( attr );
112  }
113 
115  {
116  this->ClearAttributeSet();
117  }
118 
119  void AddLabel( const AttributeValueType & attr )
120  {
121  this->AddAttribute( attr );
122  }
123 
124 protected:
126  ~LabelSelectionLabelMapFilter() ITK_OVERRIDE {};
127 
128 private:
129  ITK_DISALLOW_COPY_AND_ASSIGN(LabelSelectionLabelMapFilter);
130 
131 }; // end of class
132 
133 } // end namespace itk
134 
135 #endif
Light weight base class for most itk classes.
AttributeSelectionLabelMapFilter< TImage, typename Functor::LabelLabelObjectAccessor< typename TImage::LabelObjectType > > Superclass
Superclass::AttributeValueType AttributeValueType
Superclass::AttributeAccessorType AttributeAccessorType
remove the objects according to the value of their attribute
const AttributeSetType & GetLabelSet() const
void SetLabel(const AttributeValueType &attr)
void SetLabelSet(const AttributeSetType &set)
void AddLabel(const AttributeValueType &attr)
AttributeAccessorType::AttributeValueType AttributeValueType
remove the objects according to the value of their attribute