18#ifndef itkRGBToLuminanceImageAdaptor_h
19#define itkRGBToLuminanceImageAdaptor_h
41template <
typename TInternalType,
typename TExternalType>
55 Set(TInternalType & output,
const TExternalType & input)
57 output =
static_cast<TInternalType
>(input.GetLuminance());
60 static inline TExternalType
61 Get(
const TInternalType & input)
63 return static_cast<TExternalType
>(input.GetLuminance());
79template <
typename TImage,
typename TOutputPixelType>
81 :
public ImageAdaptor<TImage, Accessor::RGBToLuminancePixelAccessor<typename TImage::PixelType, TOutputPixelType>>
Give access to Luminance of a color pixel type.
static void Set(TInternalType &output, const TExternalType &input)
static TExternalType Get(const TInternalType &input)
TExternalType ExternalType
TInternalType InternalType
SmartPointer< Self > Pointer
~RGBToLuminanceImageAdaptor() override=default
ImageAdaptor< TImage, Accessor::RGBToLuminancePixelAccessor< typename TImage::PixelType, TOutputPixelType > > Superclass
RGBToLuminanceImageAdaptor()=default
RGBToLuminanceImageAdaptor Self
SmartPointer< const Self > ConstPointer
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....