ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkChangeLabelLabelMapFilter.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 itkChangeLabelLabelMapFilter_h
19#define itkChangeLabelLabelMapFilter_h
20
22#include <map>
23
24namespace itk
25{
48template <typename TImage>
49class ITK_TEMPLATE_EXPORT ChangeLabelLabelMapFilter : public InPlaceLabelMapFilter<TImage>
50{
51public:
52 ITK_DISALLOW_COPY_AND_MOVE(ChangeLabelLabelMapFilter);
53
59
61 using ImageType = TImage;
62 using ImagePointer = typename ImageType::Pointer;
63 using ImageConstPointer = typename ImageType::ConstPointer;
64 using PixelType = typename ImageType::PixelType;
65 using IndexType = typename ImageType::IndexType;
66 using LabelObjectType = typename ImageType::LabelObjectType;
67
69 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
70
72 itkNewMacro(Self);
73
75 itkOverrideGetNameOfClassMacro(ChangeLabelLabelMapFilter);
76
77 using ChangeMapType = typename std::map<PixelType, PixelType>;
78 using ChangeMapIterator = typename ChangeMapType::const_iterator;
79
80 /*itkConceptMacro(InputEqualityComparableCheck,
81 (Concept::EqualityComparable<InputImagePixelType>));
82 itkConceptMacro(IntConvertibleToInputCheck,
83 (Concept::Convertible<int, InputImagePixelType>));
84 itkConceptMacro(InputOStreamWritableCheck,
85 (Concept::OStreamWritable<InputImagePixelType>));*/
86
89 void
90 SetChangeMap(const ChangeMapType & changeMap);
91
92 const ChangeMapType &
93 GetChangeMap() const;
94
95 void
96 SetChange(const PixelType & oldLabel, const PixelType & newLabel);
97
98 void
100
101protected:
103 ~ChangeLabelLabelMapFilter() override = default;
104
105 void
106 GenerateData() override;
107
108 void
109 PrintSelf(std::ostream & os, Indent indent) const override;
110
112}; // end of class
113} // end namespace itk
114
115#ifndef ITK_MANUAL_INSTANTIATION
116# include "itkChangeLabelLabelMapFilter.hxx"
117#endif
118
119#endif
typename ChangeMapType::const_iterator ChangeMapIterator
static constexpr unsigned int ImageDimension
void SetChange(const PixelType &oldLabel, const PixelType &newLabel)
void SetChangeMap(const ChangeMapType &changeMap)
~ChangeLabelLabelMapFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
const ChangeMapType & GetChangeMap() const
typename ImageType::PixelType PixelType
typename ImageType::ConstPointer ImageConstPointer
InPlaceLabelMapFilter< TImage > Superclass
typename ImageType::LabelObjectType LabelObjectType
typename std::map< PixelType, PixelType > ChangeMapType
typename ImageType::IndexType IndexType
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....