ITK  5.4.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 
23 namespace itk
24 {
42 template <typename TImage>
43 class ITK_TEMPLATE_EXPORT ShiftScaleLabelMapFilter : public InPlaceLabelMapFilter<TImage>
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(ShiftScaleLabelMapFilter);
47 
53 
55  using ImageType = TImage;
56  using ImagePointer = typename ImageType::Pointer;
58  using PixelType = typename ImageType::PixelType;
59  using IndexType = typename ImageType::IndexType;
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 
92 protected:
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
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::ShiftScaleLabelMapFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkShiftScaleLabelMapFilter.h:58
itk::InPlaceLabelMapFilter
Base class for filters that takes an image as input and overwrites that image as the output.
Definition: itkInPlaceLabelMapFilter.h:83
itk::ShiftScaleLabelMapFilter::ImageType
TImage ImageType
Definition: itkShiftScaleLabelMapFilter.h:55
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ShiftScaleLabelMapFilter::IndexType
typename ImageType::IndexType IndexType
Definition: itkShiftScaleLabelMapFilter.h:59
itk::ShiftScaleLabelMapFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkShiftScaleLabelMapFilter.h:56
itk::ShiftScaleLabelMapFilter
Shifts and scales a label map filter, giving the option to change the background value.
Definition: itkShiftScaleLabelMapFilter.h:43
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:55
itk::ShiftScaleLabelMapFilter::LabelObjectType
typename ImageType::LabelObjectType LabelObjectType
Definition: itkShiftScaleLabelMapFilter.h:60
itkInPlaceLabelMapFilter.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ShiftScaleLabelMapFilter::ImageConstPointer
typename ImageType::ConstPointer ImageConstPointer
Definition: itkShiftScaleLabelMapFilter.h:57