ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::wasm::SupportInputImageTypes< TPipelineFunctor, TPixels > Class Template Reference

#include <itkSupportInputImageTypes.h>

Detailed Description

template<template< typename TImage > class TPipelineFunctor, typename... TPixels>
class itk::wasm::SupportInputImageTypes< TPipelineFunctor, TPixels >

Instantiatiate a Pipeline functor over multiple pixel types and dimensions and match to the input image type.

Instantiate the PipelineFunctor (function object) over multiple pixel types and image dimensions. If the input image matches these pixel types or dimensions, use the compile-time optimized pipeline for that image type. Otherwise, exit the pipeline with an error identifying the unsupported image type.

Example usage:

template<typename TImage>
class PipelineFunctor
{
public:
int operator()(itk::wasm::Pipeline & pipeline)
{
using ImageType = TImage;
using InputImageType = itk::wasm::InputImage<ImageType>;
InputImageType inputImage;
pipeline.add_option("input-image", inputImage, "The input image")->required();
Input image for an itk::wasm::Pipeline.

[...]

int
main(int argc, char * argv[])
{
itk::wasm::Pipeline pipeline("support-multiple", "Test supporting multiple input image types", argc, argv);
// Supports the pixels types uint8_t, float for itk::Image, itk::VectorImage
// Supports the image dimensions 2, 3
return itk::wasm::SupportInputImageTypes<PipelineFunctor,
uint8_t,
float>
::Dimensions<2U,3U>("input-image", pipeline);
}
Instantiatiate a Pipeline functor over multiple pixel types and dimensions and match to the input ima...
static int Dimensions(const std::string &inputImageOptionName, Pipeline &pipeline)

Definition at line 89 of file itkSupportInputImageTypes.h.

Static Public Member Functions

template<unsigned int... VDimensions>
static int Dimensions (const std::string &inputImageOptionName, Pipeline &pipeline)
 

Static Private Member Functions

template<unsigned int VDimension, unsigned int... VDimensions>
static int IterateDimensions (Pipeline &pipeline, const ImageTypeJSON &imageType, bool passThrough=false)
 
template<unsigned int VDimension, typename TPixel, typename... TPixelsRest>
static int IteratePixelTypes (Pipeline &pipeline, const ImageTypeJSON &imageType, bool passThrough=false)
 

Member Function Documentation

◆ Dimensions()

template<template< typename TImage > class TPipelineFunctor, typename... TPixels>
template<unsigned int... VDimensions>
static int itk::wasm::SupportInputImageTypes< TPipelineFunctor, TPixels >::Dimensions ( const std::string & inputImageOptionName,
Pipeline & pipeline )
inlinestatic

◆ IterateDimensions()

template<template< typename TImage > class TPipelineFunctor, typename... TPixels>
template<unsigned int VDimension, unsigned int... VDimensions>
static int itk::wasm::SupportInputImageTypes< TPipelineFunctor, TPixels >::IterateDimensions ( Pipeline & pipeline,
const ImageTypeJSON & imageType,
bool passThrough = false )
inlinestaticprivate

◆ IteratePixelTypes()

template<template< typename TImage > class TPipelineFunctor, typename... TPixels>
template<unsigned int VDimension, typename TPixel, typename... TPixelsRest>
static int itk::wasm::SupportInputImageTypes< TPipelineFunctor, TPixels >::IteratePixelTypes ( Pipeline & pipeline,
const ImageTypeJSON & imageType,
bool passThrough = false )
inlinestaticprivate

The documentation for this class was generated from the following file: