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

#include <itkSupportInputPolyDataTypes.h>

Detailed Description

template<template< typename TPolyData > class TPipelineFunctor>
class itk::wasm::SupportInputPolyDataTypes< TPipelineFunctor >

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

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

Example usage:

template<typename TPolyData>
class PipelineFunctor
{
public:
int operator()(itk::wasm::Pipeline & pipeline)
{
using PolyDataType = TPolyData;
using InputPolyDataType = itk::wasm::InputPolyData<PolyDataType>;
InputPolyDataType inputPolyData;
pipeline.add_option("input-polydata", inputPolyData, "The input polydata")->required();
Input polyData for an itk::wasm::Pipeline.

[...]

int
main(int argc, char * argv[])
{
itk::wasm::Pipeline pipeline("support-multiple", "Test supporting multiple input polydata types", argc, argv);
// Supports the pixels types uint8_t, float
::PixelTypes<uint8_t, float>("input-polydata", pipeline);
}
Instantiatiate a Pipeline functor over multiple pixel types and match to the input polydata type.

It is assumed that the cell and point data will have the same pixel type.

The number of pixel components is taken from the point pixel data. If there are 0 point pixel data components, the cell pixel data components are queried.

Definition at line 87 of file itkSupportInputPolyDataTypes.h.

Static Public Member Functions

template<typename... TPixels>
static int PixelTypes (const std::string &inputPolyDataOptionName, Pipeline &pipeline)
 

Static Private Member Functions

template<typename TPixel, typename... TPixelsRest>
static int IteratePixelTypes (Pipeline &pipeline, const PolyDataTypeJSON &polyDataType, bool passThrough=false)
 

Member Function Documentation

◆ IteratePixelTypes()

template<template< typename TPolyData > class TPipelineFunctor>
template<typename TPixel, typename... TPixelsRest>
static int itk::wasm::SupportInputPolyDataTypes< TPipelineFunctor >::IteratePixelTypes ( Pipeline & pipeline,
const PolyDataTypeJSON & polyDataType,
bool passThrough = false )
inlinestaticprivate

◆ PixelTypes()

template<template< typename TPolyData > class TPipelineFunctor>
template<typename... TPixels>
static int itk::wasm::SupportInputPolyDataTypes< TPipelineFunctor >::PixelTypes ( const std::string & inputPolyDataOptionName,
Pipeline & pipeline )
inlinestatic

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