ITK  4.3.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<class TImage>
53 class ITK_EXPORT LabelSelectionLabelMapFilter :
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 
71  typedef typename Superclass::AttributeAccessorType AttributeAccessorType;
73 
74  typedef typename Superclass::AttributeSetType AttributeSetType;
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 
89 /* itkConceptMacro(InputEqualityComparableCheck,
90  (Concept::EqualityComparable<InputImagePixelType>));
91  itkConceptMacro(IntConvertibleToInputCheck,
92  (Concept::Convertible<int, InputImagePixelType>));
93  itkConceptMacro(InputOStreamWritableCheck,
94  (Concept::OStreamWritable<InputImagePixelType>));*/
95 
97 #endif
98 
99  const AttributeSetType & GetLabelSet() const
100  {
101  return this->GetAttributeSet();
102  }
103 
104  void SetLabelSet( const AttributeSetType & set )
105  {
106  this->SetAttributeSet( set );
107  }
108 
110  void SetLabel( const AttributeValueType & attr )
111  {
112  this->SetAttribute( attr );
113  }
114 
115  void ClearLabelSet()
116  {
117  this->ClearAttributeSet();
118  }
119 
120  void AddLabel( const AttributeValueType & attr )
121  {
122  this->AddAttribute( attr );
123  }
124 
125 protected:
128 
129 private:
130  LabelSelectionLabelMapFilter(const Self&); //purposely not implemented
131  void operator=(const Self&); //purposely not implemented
132 
133 }; // end of class
134 
135 } // end namespace itk
136 
137 #endif
138