SimpleITK  
sitkLabelOverlayImageFilter.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 sitkLabelOverlayImageFilter_h
19#define sitkLabelOverlayImageFilter_h
20
21/*
22 * WARNING: DO NOT EDIT THIS FILE!
23 * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24 * Please look at sitkDualImageFilterTemplate.h.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkImageFilter.h"
31#include "sitkBasicFilters.h"
33
34namespace itk::simple {
35
58public:
60
63
67
70
71
72
73
77 void
78 SetOpacity(double Opacity )
79 { this->m_Opacity = Opacity; }
80
83 double
84 GetOpacity() const { return this->m_Opacity; }
85
86
90 void
91 SetBackgroundValue(double BackgroundValue )
92 { this->m_BackgroundValue = BackgroundValue; }
93
96 double
97 GetBackgroundValue() const { return this->m_BackgroundValue; }
98
99
102 void
103 SetColormap(std::vector<uint8_t> Colormap )
104 { this->m_Colormap = Colormap; }
105
107 std::vector<uint8_t>
108 GetColormap() const { return this->m_Colormap; }
109
110
112 std::string GetName() const { return std::string("LabelOverlayImageFilter"); }
113
115 std::string ToString() const;
116
117
119#ifndef SWIG
120 Image Execute(Image &&image, const Image &labelImage);
121#endif
122 Image Execute(const Image &image, const Image &labelImage);
123
124private:
125
127 using MemberFunctionType = Image (Self::*)(const Image *
128 image, const Image *
129 labelImage);
130
132 template <class TImageType1, class TImageType2> Image DualExecuteInternal(const Image *
133 image, const Image *
134 labelImage);
135
136
138
139
140
141 /* Value assigned to pixels outside of the mask */
142 double m_Opacity{ 0.5 };
143
144 double m_BackgroundValue{ 0.0 };
145
146 std::vector<uint8_t> m_Colormap{ std::vector<uint8_t>() };
147
148
149
150
151
152
153
154 bool m_InPlace{false};
155
156};
157
158
167#ifndef SWIG
169 Image &&image, const Image &labelImage, double opacity = 0.5, double backgroundValue = 0.0, std::vector<uint8_t> colormap = std::vector<uint8_t>()
170);
171
172
173#endif
175 const Image &image, const Image &labelImage, double opacity = 0.5, double backgroundValue = 0.0, std::vector<uint8_t> colormap = std::vector<uint8_t>()
176);
177
179
180}
181#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
Image Execute(Image &&image, const Image &labelImage)
Image(Self::*)(const Image * image, const Image * labelImage) MemberFunctionType
void SetColormap(std::vector< uint8_t > Colormap)
static const detail::DualMemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image DualExecuteInternal(const Image *image, const Image *labelImage)
A class used to instantiate and generate function objects of templated member functions with two temp...
Image LabelOverlay(Image &&image, const Image &labelImage, double opacity=0.5, double backgroundValue=0.0, std::vector< uint8_t > colormap=std::vector< uint8_t >())
Apply a colormap to a label image and put it on top of the input image.
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
#define SITKBasicFilters_EXPORT