Returns the number of components in the pixel parameter. While itk::DefaultConvertPixelTraits
and otb::DefaultConvertPixelTraits
already exist, they don't handle correctly:
std::complex<>
, as there is no itk::DefaultConvertPixelTraits<complex<>>::GetNumberOfComponents(pix)
- nor
itk::VariableLengthVector<>
, as it copies the VLV, which is an expensive operation.
- Template Parameters
-
PixelType | automatically deduced pixel type |
- Parameters
-
- Returns
- The number of components in the pixel.
- Exceptions
-
Definition at line 215 of file otbArrayTraits.h.
References otb::mpl::internals::NumberOfComponents< PixelType >::For().
Referenced by otb::GridResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecision >::BeforeThreadedGenerateData(), otb::GridResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecision >::CastPixelWithBoundsChecking(), otb::ConvertPixelBuffer< InputPixelType, OutputPixelType, OutputConvertTraits >::Convert(), otb::DifferenceImageFilter< TInputImage, TOutputImage >::DifferenceImageFilter(), otb::mpl::internals::NumberOfComponents< PixelType >::For(), otb::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateData(), otb::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateOutputInformation(), otb::PixelRange_t< TPixel >::shallow_size(), and otb::internals::PixelComponentIterator< TPixel, ConstOrMutable, typename std::enable_if_t< mpl::is_array_v< std::decay_t< TPixel > > > >::size().