ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkAttributeRelabelLabelMapFilter.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 itkAttributeRelabelLabelMapFilter_h
19#define itkAttributeRelabelLabelMapFilter_h
20
23
24namespace itk
25{
43template <typename TImage,
45class ITK_TEMPLATE_EXPORT AttributeRelabelLabelMapFilter : public InPlaceLabelMapFilter<TImage>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(AttributeRelabelLabelMapFilter);
49
55
57 using ImageType = TImage;
58 using ImagePointer = typename ImageType::Pointer;
59 using ImageConstPointer = typename ImageType::ConstPointer;
60 using PixelType = typename ImageType::PixelType;
61 using IndexType = typename ImageType::IndexType;
62 using LabelObjectType = typename ImageType::LabelObjectType;
63
64 using AttributeAccessorType = TAttributeAccessor;
65 using AttributeValueType = typename AttributeAccessorType::AttributeValueType;
66
68 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
69
71 itkNewMacro(Self);
72
74 itkOverrideGetNameOfClassMacro(AttributeRelabelLabelMapFilter);
75
76 /* itkConceptMacro(InputEqualityComparableCheck,
77 (Concept::EqualityComparable<InputImagePixelType>));
78 itkConceptMacro(IntConvertibleToInputCheck,
79 (Concept::Convertible<int, InputImagePixelType>));
80 itkConceptMacro(InputOStreamWritableCheck,
81 (Concept::OStreamWritable<InputImagePixelType>));*/
82
89 itkSetMacro(ReverseOrdering, bool);
90 itkGetConstReferenceMacro(ReverseOrdering, bool);
91 itkBooleanMacro(ReverseOrdering);
93protected:
95 ~AttributeRelabelLabelMapFilter() override = default;
96
97 void
98 GenerateData() override;
99
100 void
101 PrintSelf(std::ostream & os, Indent indent) const override;
102
104 {
105 public:
106 bool
107 operator()(const typename LabelObjectType::Pointer & a, const typename LabelObjectType::Pointer & b)
108 {
109 return m_Accessor(a) < m_Accessor(b);
110 }
114
115 private:
117 };
118
120 {
121 public:
122 bool
123 operator()(const typename LabelObjectType::Pointer & a, const typename LabelObjectType::Pointer & b)
124 {
125 return m_Accessor(a) > m_Accessor(b);
126 }
128 : m_Accessor()
129 {}
130
131 private:
133 };
134
135private:
137
138}; // end of class
139
140} // end namespace itk
141
142#ifndef ITK_MANUAL_INSTANTIATION
143# include "itkAttributeRelabelLabelMapFilter.hxx"
144#endif
145
146#endif
bool operator()(const typename LabelObjectType::Pointer &a, const typename LabelObjectType::Pointer &b)
bool operator()(const typename LabelObjectType::Pointer &a, const typename LabelObjectType::Pointer &b)
typename ImageType::LabelObjectType LabelObjectType
~AttributeRelabelLabelMapFilter() override=default
typename AttributeAccessorType::AttributeValueType AttributeValueType
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....