ITK  5.2.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  * 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
28 {
53 template <typename TImage>
56  TImage,
57  typename Functor::LabelLabelObjectAccessor<typename TImage::LabelObjectType>>
58 {
59 public:
60  ITK_DISALLOW_COPY_AND_MOVE(LabelSelectionLabelMapFilter);
61 
64  using Superclass =
69 
71  using ImageType = TImage;
72  using ImagePointer = typename ImageType::Pointer;
73  using ImageConstPointer = typename ImageType::ConstPointer;
74  using PixelType = typename ImageType::PixelType;
75  using IndexType = typename ImageType::IndexType;
76 
79 
81 
83  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
84 
86  itkNewMacro(Self);
87 
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 &
103  GetLabelSet() const
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 
133 protected:
134  LabelSelectionLabelMapFilter() = default;
135  ~LabelSelectionLabelMapFilter() override = default;
136 }; // end of class
137 
138 } // end namespace itk
139 
140 #endif
itk::AttributeSelectionLabelMapFilter
remove the objects according to the value of their attribute
Definition: itkAttributeSelectionLabelMapFilter.h:53
itk::LabelSelectionLabelMapFilter::ImageConstPointer
typename ImageType::ConstPointer ImageConstPointer
Definition: itkLabelSelectionLabelMapFilter.h:73
itk::LabelSelectionLabelMapFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkLabelSelectionLabelMapFilter.h:74
itk::LabelSelectionLabelMapFilter
remove the objects according to the value of their attribute
Definition: itkLabelSelectionLabelMapFilter.h:54
itk::SmartPointer< Self >
itk::LabelSelectionLabelMapFilter::SetLabelSet
void SetLabelSet(const AttributeSetType &set)
Definition: itkLabelSelectionLabelMapFilter.h:109
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::SetAttribute
void SetAttribute(const AttributeValueType &attr)
Definition: itkAttributeSelectionLabelMapFilter.h:124
itk::LabelSelectionLabelMapFilter::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkLabelSelectionLabelMapFilter.h:83
itk::LabelSelectionLabelMapFilter::SetLabel
void SetLabel(const AttributeValueType &attr)
Definition: itkLabelSelectionLabelMapFilter.h:116
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::AttributeSelectionLabelMapFilter::AttributeValueType
typename AttributeAccessorType::AttributeValueType AttributeValueType
Definition: itkAttributeSelectionLabelMapFilter.h:73
itk::LabelSelectionLabelMapFilter::AttributeSetType
typename Superclass::AttributeSetType AttributeSetType
Definition: itkLabelSelectionLabelMapFilter.h:80
itk::LabelSelectionLabelMapFilter::~LabelSelectionLabelMapFilter
~LabelSelectionLabelMapFilter() override=default
itk::LabelSelectionLabelMapFilter::ClearLabelSet
void ClearLabelSet()
Definition: itkLabelSelectionLabelMapFilter.h:122
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::AddAttribute
void AddAttribute(const AttributeValueType &attr)
Definition: itkAttributeSelectionLabelMapFilter.h:142
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::ClearAttributeSet
void ClearAttributeSet()
Definition: itkAttributeSelectionLabelMapFilter.h:132
itk::LabelSelectionLabelMapFilter::AttributeAccessorType
typename Superclass::AttributeAccessorType AttributeAccessorType
Definition: itkLabelSelectionLabelMapFilter.h:77
itkAttributeSelectionLabelMapFilter.h
itkLabelObject.h
itk::LabelSelectionLabelMapFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkLabelSelectionLabelMapFilter.h:72
itkLabelObjectAccessors.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LabelSelectionLabelMapFilter::ImageType
TImage ImageType
Definition: itkLabelSelectionLabelMapFilter.h:71
itk::AttributeSelectionLabelMapFilter::AttributeSetType
typename std::set< AttributeValueType > AttributeSetType
Definition: itkAttributeSelectionLabelMapFilter.h:75
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::GetAttributeSet
const AttributeSetType & GetAttributeSet() const
Definition: itkAttributeSelectionLabelMapFilter.h:101
itk::LabelSelectionLabelMapFilter::AddLabel
void AddLabel(const AttributeValueType &attr)
Definition: itkLabelSelectionLabelMapFilter.h:128
itk::LabelSelectionLabelMapFilter::IndexType
typename ImageType::IndexType IndexType
Definition: itkLabelSelectionLabelMapFilter.h:75
itk::LabelSelectionLabelMapFilter::AttributeValueType
typename Superclass::AttributeValueType AttributeValueType
Definition: itkLabelSelectionLabelMapFilter.h:78
itk::Functor::LabelLabelObjectAccessor
Definition: itkLabelObjectAccessors.h:37
itk::LabelSelectionLabelMapFilter::GetLabelSet
const AttributeSetType & GetLabelSet() const
Definition: itkLabelSelectionLabelMapFilter.h:103
itk::AttributeSelectionLabelMapFilter::AttributeAccessorType
TAttributeAccessor AttributeAccessorType
Definition: itkAttributeSelectionLabelMapFilter.h:72
itk::LabelSelectionLabelMapFilter::LabelSelectionLabelMapFilter
LabelSelectionLabelMapFilter()=default
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::SetAttributeSet
void SetAttributeSet(const AttributeSetType &set)
Definition: itkAttributeSelectionLabelMapFilter.h:106