ITK  6.0.0
Insight Toolkit
itkShiftScaleLabelMapFilter.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 itkShiftScaleLabelMapFilter_h
19#define itkShiftScaleLabelMapFilter_h
20
22
23namespace itk
24{
42template <typename TImage>
43class ITK_TEMPLATE_EXPORT ShiftScaleLabelMapFilter : public InPlaceLabelMapFilter<TImage>
44{
45public:
46 ITK_DISALLOW_COPY_AND_MOVE(ShiftScaleLabelMapFilter);
47
53
55 using ImageType = TImage;
58 using PixelType = typename ImageType::PixelType;
60 using LabelObjectType = typename ImageType::LabelObjectType;
61
63 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
64
66 itkNewMacro(Self);
67
69 itkOverrideGetNameOfClassMacro(ShiftScaleLabelMapFilter);
70
71#ifdef ITK_USE_CONCEPT_CHECKING
72 // Begin concept checking
73/* itkConceptMacro(InputEqualityComparableCheck,
74 (Concept::EqualityComparable<InputImagePixelType>));
75 itkConceptMacro(IntConvertibleToInputCheck,
76 (Concept::Convertible<int, InputImagePixelType>));
77 itkConceptMacro(InputOStreamWritableCheck,
78 (Concept::OStreamWritable<InputImagePixelType>));*/
79// End concept checking
80#endif
81
82 itkSetMacro(Shift, double);
83 itkGetConstReferenceMacro(Shift, double);
84
85 itkSetMacro(Scale, double);
86 itkGetConstReferenceMacro(Scale, double);
87
88 itkSetMacro(ChangeBackgroundValue, bool);
89 itkGetConstMacro(ChangeBackgroundValue, bool);
90 itkBooleanMacro(ChangeBackgroundValue);
91
92protected:
94 ~ShiftScaleLabelMapFilter() override = default;
95
96 void
97 GenerateData() override;
98
99 void
100 PrintSelf(std::ostream & os, Indent indent) const override;
101
102 double m_Shift{};
103 double m_Scale{};
104
105 bool m_ChangeBackgroundValue{};
106}; // end of class
107} // end namespace itk
108
109#ifndef ITK_MANUAL_INSTANTIATION
110# include "itkShiftScaleLabelMapFilter.hxx"
111#endif
112
113#endif
Base class for filters that takes an image as input and overwrites that image as the output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Shifts and scales a label map filter, giving the option to change the background value.
typename ImageType::LabelObjectType LabelObjectType
typename ImageType::ConstPointer ImageConstPointer
~ShiftScaleLabelMapFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename ImageType::PixelType PixelType
typename ImageType::Pointer ImagePointer
typename ImageType::IndexType IndexType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....