ITK  5.1.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 {
54 template <typename TImage>
57  TImage,
58  typename Functor::LabelLabelObjectAccessor<typename TImage::LabelObjectType>>
59 {
60 public:
61  ITK_DISALLOW_COPY_AND_ASSIGN(LabelSelectionLabelMapFilter);
62 
65  using Superclass =
70 
72  using ImageType = TImage;
73  using ImagePointer = typename ImageType::Pointer;
74  using ImageConstPointer = typename ImageType::ConstPointer;
75  using PixelType = typename ImageType::PixelType;
76  using IndexType = typename ImageType::IndexType;
77 
80 
82 
84  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
85 
87  itkNewMacro(Self);
88 
91 
92 #ifdef ITK_USE_CONCEPT_CHECKING
93  // Begin concept checking
94  /* itkConceptMacro(InputEqualityComparableCheck,
95  (Concept::EqualityComparable<InputImagePixelType>));
96  itkConceptMacro(IntConvertibleToInputCheck,
97  (Concept::Convertible<int, InputImagePixelType>));
98  itkConceptMacro(InputOStreamWritableCheck,
99  (Concept::OStreamWritable<InputImagePixelType>));*/
100  // End concept checking
101 #endif
102 
103  const AttributeSetType &
104  GetLabelSet() const
105  {
106  return this->GetAttributeSet();
107  }
108 
109  void
111  {
112  this->SetAttributeSet(set);
113  }
114 
116  void
118  {
119  this->SetAttribute(attr);
120  }
121 
122  void
124  {
125  this->ClearAttributeSet();
126  }
127 
128  void
130  {
131  this->AddAttribute(attr);
132  }
133 
134 protected:
135  LabelSelectionLabelMapFilter() = default;
136  ~LabelSelectionLabelMapFilter() override = default;
137 }; // end of class
138 
139 } // end namespace itk
140 
141 #endif
itk::AttributeSelectionLabelMapFilter
remove the objects according to the value of their attribute
Definition: itkAttributeSelectionLabelMapFilter.h:54
itk::LabelSelectionLabelMapFilter::ImageConstPointer
typename ImageType::ConstPointer ImageConstPointer
Definition: itkLabelSelectionLabelMapFilter.h:74
itk::LabelSelectionLabelMapFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkLabelSelectionLabelMapFilter.h:75
itk::LabelSelectionLabelMapFilter
remove the objects according to the value of their attribute
Definition: itkLabelSelectionLabelMapFilter.h:55
itk::SmartPointer< Self >
itk::LabelSelectionLabelMapFilter::SetLabelSet
void SetLabelSet(const AttributeSetType &set)
Definition: itkLabelSelectionLabelMapFilter.h:110
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::SetAttribute
void SetAttribute(const AttributeValueType &attr)
Definition: itkAttributeSelectionLabelMapFilter.h:125
itk::LabelSelectionLabelMapFilter::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkLabelSelectionLabelMapFilter.h:84
itk::LabelSelectionLabelMapFilter::SetLabel
void SetLabel(const AttributeValueType &attr)
Definition: itkLabelSelectionLabelMapFilter.h:117
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:74
itk::LabelSelectionLabelMapFilter::AttributeSetType
typename Superclass::AttributeSetType AttributeSetType
Definition: itkLabelSelectionLabelMapFilter.h:81
itk::LabelSelectionLabelMapFilter::~LabelSelectionLabelMapFilter
~LabelSelectionLabelMapFilter() override=default
itk::LabelSelectionLabelMapFilter::ClearLabelSet
void ClearLabelSet()
Definition: itkLabelSelectionLabelMapFilter.h:123
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::AddAttribute
void AddAttribute(const AttributeValueType &attr)
Definition: itkAttributeSelectionLabelMapFilter.h:143
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::ClearAttributeSet
void ClearAttributeSet()
Definition: itkAttributeSelectionLabelMapFilter.h:133
itk::LabelSelectionLabelMapFilter::AttributeAccessorType
typename Superclass::AttributeAccessorType AttributeAccessorType
Definition: itkLabelSelectionLabelMapFilter.h:78
itkAttributeSelectionLabelMapFilter.h
itkLabelObject.h
itk::LabelSelectionLabelMapFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkLabelSelectionLabelMapFilter.h:73
itkLabelObjectAccessors.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::LabelSelectionLabelMapFilter::ImageType
TImage ImageType
Definition: itkLabelSelectionLabelMapFilter.h:72
itk::AttributeSelectionLabelMapFilter::AttributeSetType
typename std::set< AttributeValueType > AttributeSetType
Definition: itkAttributeSelectionLabelMapFilter.h:76
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::GetAttributeSet
const AttributeSetType & GetAttributeSet() const
Definition: itkAttributeSelectionLabelMapFilter.h:102
itk::LabelSelectionLabelMapFilter::AddLabel
void AddLabel(const AttributeValueType &attr)
Definition: itkLabelSelectionLabelMapFilter.h:129
itk::LabelSelectionLabelMapFilter::IndexType
typename ImageType::IndexType IndexType
Definition: itkLabelSelectionLabelMapFilter.h:76
itk::LabelSelectionLabelMapFilter::AttributeValueType
typename Superclass::AttributeValueType AttributeValueType
Definition: itkLabelSelectionLabelMapFilter.h:79
itk::Functor::LabelLabelObjectAccessor
Definition: itkLabelObjectAccessors.h:38
itk::LabelSelectionLabelMapFilter::GetLabelSet
const AttributeSetType & GetLabelSet() const
Definition: itkLabelSelectionLabelMapFilter.h:104
itk::AttributeSelectionLabelMapFilter::AttributeAccessorType
TAttributeAccessor AttributeAccessorType
Definition: itkAttributeSelectionLabelMapFilter.h:73
itk::LabelSelectionLabelMapFilter::LabelSelectionLabelMapFilter
LabelSelectionLabelMapFilter()=default
itk::AttributeSelectionLabelMapFilter< TImage, Functor::LabelLabelObjectAccessor< TImage::LabelObjectType > >::SetAttributeSet
void SetAttributeSet(const AttributeSetType &set)
Definition: itkAttributeSelectionLabelMapFilter.h:107