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
Base class for all data objects in ITK.
Give access to partial aspects of voxels from an Image.
Base class for most ITK classes.
Presents a color image as being composed of the Luminance of its pixels.
~RGBToLuminanceImageAdaptor() override=default
RGBToLuminanceImageAdaptor()=default
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....