ITK  6.0.0
Insight Toolkit
itkLabelSelectionLabelMapFilter.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 itkLabelSelectionLabelMapFilter_h
19#define itkLabelSelectionLabelMapFilter_h
20
22#include "itkLabelObject.h"
24#include <set>
25
26
27namespace itk
28{
53template <typename TImage>
56 TImage,
57 typename Functor::LabelLabelObjectAccessor<typename TImage::LabelObjectType>>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(LabelSelectionLabelMapFilter);
61
64 using Superclass =
69
71 using ImageType = TImage;
74 using PixelType = typename ImageType::PixelType;
76
78 using typename Superclass::AttributeValueType;
79
80 using typename Superclass::AttributeSetType;
81
83 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
84
86 itkNewMacro(Self);
87
89 itkOverrideGetNameOfClassMacro(LabelSelectionLabelMapFilter);
90
91#ifdef ITK_USE_CONCEPT_CHECKING
92 // Begin concept checking
93 /* itkConceptMacro(InputEqualityComparableCheck,
94 (Concept::EqualityComparable<InputImagePixelType>));
95 itkConceptMacro(IntConvertibleToInputCheck,
96 (Concept::Convertible<int, InputImagePixelType>));
97 itkConceptMacro(InputOStreamWritableCheck,
98 (Concept::OStreamWritable<InputImagePixelType>));*/
99 // End concept checking
100#endif
101
102 const AttributeSetType &
104 {
105 return this->GetAttributeSet();
106 }
107
108 void
110 {
111 this->SetAttributeSet(set);
112 }
113
115 void
117 {
118 this->SetAttribute(attr);
119 }
120
121 void
123 {
124 this->ClearAttributeSet();
125 }
126
127 void
129 {
130 this->AddAttribute(attr);
131 }
132
133protected:
135 ~LabelSelectionLabelMapFilter() override = default;
136}; // end of class
137
138} // end namespace itk
139
140#endif
Remove the objects according to the value of their attribute.
typename std::set< AttributeValueType > AttributeSetType
typename AttributeAccessorType::AttributeValueType AttributeValueType
remove the objects according to the value of their attribute
~LabelSelectionLabelMapFilter() override=default
void AddLabel(const AttributeValueType &attr)
void SetLabel(const AttributeValueType &attr)
void SetLabelSet(const AttributeSetType &set)
const AttributeSetType & GetLabelSet() const
typename ImageType::ConstPointer ImageConstPointer
Light weight base class for most itk classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....