ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLabelOverlayImageFilter.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 itkLabelOverlayImageFilter_h
19#define itkLabelOverlayImageFilter_h
20
23#include "itkConceptChecking.h"
24
25namespace itk
26{
55template <typename TInputImage, typename TLabelImage, typename TOutputImage>
56class ITK_TEMPLATE_EXPORT LabelOverlayImageFilter
57 : public BinaryGeneratorImageFilter<TInputImage, TLabelImage, TOutputImage>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(LabelOverlayImageFilter);
61
64
66
67 using FunctorType = Functor::LabelOverlayFunctor<typename TInputImage::PixelType,
68 typename TLabelImage::PixelType,
69 typename TOutputImage::PixelType>;
70
73
74 using OutputImageType = TOutputImage;
75 using LabelImageType = TLabelImage;
76 using InputImageType = TInputImage;
77
78 using OutputPixelType = typename TOutputImage::PixelType;
79 using LabelPixelType = typename TLabelImage::PixelType;
80 using InputPixelType = typename TInputImage::PixelType;
81
83 itkOverrideGetNameOfClassMacro(LabelOverlayImageFilter);
84
86 itkNewMacro(Self);
87
89 void
90 SetLabelImage(const TLabelImage * input);
91 const LabelImageType *
94
98 itkSetMacro(Opacity, double);
99 itkGetConstReferenceMacro(Opacity, double);
101
103 itkSetMacro(BackgroundValue, LabelPixelType);
104 itkGetConstReferenceMacro(BackgroundValue, LabelPixelType);
106
107 itkConceptMacro(OutputPixelShouldHaveValueType, (Concept::HasValueType<OutputPixelType>));
108 itkConceptMacro(OutputPixelShouldHaveBracketOperator,
110
112 void
114
116 unsigned int
118
120 using ComponentType = typename OutputPixelType::ComponentType;
121
123 void
125
126
127 itkGetConstReferenceMacro(Functor, FunctorType);
130 {
131 return m_Functor;
132 }
133
134protected:
136 ~LabelOverlayImageFilter() override = default;
137
139 void
141
143 void
144 PrintSelf(std::ostream & os, Indent indent) const override;
145
146 void
148
149private:
151 double m_Opacity{};
153};
154} // end namespace itk
155
156#ifndef ITK_MANUAL_INSTANTIATION
157# include "itkLabelOverlayImageFilter.hxx"
158#endif
159
160#endif
Functor for applying a colormap to a label image and combine it with a grayscale image.
Control indentation during Print() invocation.
Definition itkIndent.h:50
void BeforeThreadedGenerateData() override
const LabelImageType * GetLabelImage() const
BinaryGeneratorImageFilter< TInputImage, TLabelImage, TOutputImage > Superclass
~LabelOverlayImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputPixelType::ComponentType ComponentType
unsigned int GetNumberOfColors() const
void SetLabelImage(const TLabelImage *input)
typename TOutputImage::PixelType OutputPixelType
SmartPointer< const Self > ConstPointer
void AddColor(ComponentType r, ComponentType g, ComponentType b)
void GenerateOutputInformation() override
typename TInputImage::PixelType InputPixelType
typename TLabelImage::PixelType LabelPixelType
Functor::LabelOverlayFunctor< typename TInputImage::PixelType, typename TLabelImage::PixelType, typename TOutputImage::PixelType > FunctorType
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....