ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLabelToRGBImageFilter.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 itkLabelToRGBImageFilter_h
19#define itkLabelToRGBImageFilter_h
20
23
24namespace itk
25{
49template <typename TLabelImage, typename TOutputImage>
50class ITK_TEMPLATE_EXPORT LabelToRGBImageFilter
52 TLabelImage,
53 TOutputImage,
54 Functor::LabelToRGBFunctor<typename TLabelImage::PixelType, typename TOutputImage::PixelType>>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(LabelToRGBImageFilter);
58
63
65 TLabelImage,
66 TOutputImage,
68
69 using OutputImageType = TOutputImage;
70 using LabelImageType = TLabelImage;
71
72 using OutputPixelType = typename TOutputImage::PixelType;
73 using LabelPixelType = typename TLabelImage::PixelType;
75
77 itkOverrideGetNameOfClassMacro(LabelToRGBImageFilter);
78
80 itkNewMacro(Self);
81
83 itkSetMacro(BackgroundValue, LabelPixelType);
84 itkGetConstReferenceMacro(BackgroundValue, LabelPixelType);
86
88 itkSetMacro(BackgroundColor, OutputPixelType);
89 itkGetConstReferenceMacro(BackgroundColor, OutputPixelType);
91
93 void
95
97 unsigned int
99
101 using ComponentType = typename OutputPixelType::ComponentType;
102
104 void
106
107protected:
109 ~LabelToRGBImageFilter() override = default;
110
112 void
114
116 void
117 PrintSelf(std::ostream & os, Indent indent) const override;
118
119 void
121
122private:
125};
126} // end namespace itk
127
128#ifndef ITK_MANUAL_INSTANTIATION
129# include "itkLabelToRGBImageFilter.hxx"
130#endif
131
132#endif
Functor for converting labels into RGB triplets.
Control indentation during Print() invocation.
Definition itkIndent.h:50
unsigned int GetNumberOfColors() const
typename OutputPixelType::ComponentType ComponentType
UnaryFunctorImageFilter< TLabelImage, TOutputImage, Functor::LabelToRGBFunctor< typename TLabelImage::PixelType, typename TOutputImage::PixelType > > Superclass
void GenerateOutputInformation() override
~LabelToRGBImageFilter() override=default
typename NumericTraits< OutputPixelType >::ValueType OutputPixelValueType
void BeforeThreadedGenerateData() override
typename TOutputImage::PixelType OutputPixelType
SmartPointer< const Self > ConstPointer
typename TLabelImage::PixelType LabelPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
void AddColor(ComponentType r, ComponentType g, ComponentType b)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....