|
OTB
9.0.0
Orfeo Toolbox
|
Go to the documentation of this file.
21 #ifndef otbChannelSelectorFunctor_h
22 #define otbChannelSelectorFunctor_h
25 #include "itkVariableLengthVector.h"
26 #include "itkRGBPixel.h"
27 #include "itkRGBAPixel.h"
28 #include "itkObject.h"
29 #include "itkObjectFactory.h"
44 template <
class TInputPixel>
61 typedef typename itk::NumericTraits<PixelType>::ValueType
ScalarType;
72 return "Channel Selection";
98 outPixel[0] = inPixel;
157 itkExceptionMacro(<<
"Can't get channel " << channelPosition <<
", there is only " <<
m_ChannelList.size() <<
" element in the list");
227 if (std::string(
typeid(
PixelType).name()).
find(
"RGBAPixel") != std::string::npos)
234 else if (std::string(
typeid(
PixelType).name()).
find(
"RGBPixel") != std::string::npos)
240 else if (std::string(
typeid(
PixelType).name()).
find(
"VariableLengthVector") != std::string::npos)
itk::SmartPointer< const Self > ConstPointer
virtual void SetRedChannelIndex(unsigned int channel)
virtual OutputPixelType operator()(const VectorPixelType &inPixel) const
bool usingDefaultParameters
virtual unsigned int GetBlueChannelIndex() const
string_view find(string_view const &haystack, string_view const &needle)
virtual unsigned int GetGreenChannelIndex() const
virtual OutputPixelType operator()(const RGBPixelType &inPixel) const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
itk::RGBAPixel< ScalarType > RGBAPixelType
virtual unsigned int GetOutputSize() const
virtual unsigned int GetChannelIndex(unsigned int channelPosition) const
virtual OutputPixelType operator()(const RGBAPixelType &inPixel) const
const char * GetDescription() const
itk::RGBPixel< ScalarType > RGBPixelType
virtual void SetChannelList(std::vector< unsigned int > channels)
VectorPixelType OutputPixelType
virtual unsigned int GetRedChannelIndex() const
virtual std::vector< unsigned int > GetChannelList() const
virtual void SetAllChannels(unsigned int channel)
itk::VariableLengthVector< ScalarType > VectorPixelType
virtual OutputPixelType operator()(ScalarType inPixel) const
virtual void SetGreenChannelIndex(unsigned int channel)
itk::NumericTraits< PixelType >::ValueType ScalarType
ChannelSelectorFunctor Self
Base class for pixel representation functions.
virtual bool IsUsingDefaultParameters()
virtual void SetBlueChannelIndex(unsigned int channel)
~ChannelSelectorFunctor() override
ChannelListType m_ChannelList
std::vector< unsigned int > ChannelListType
itk::SmartPointer< Self > Pointer
virtual void SetChannelIndex(unsigned int channelPosition, unsigned int channel)