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

#include <itkSupportInputPointSetTypes.h>

Detailed Description

template<template< typename TPointSet > class TPipelineFunctor, typename... TPixels>
class itk::wasm::SupportInputPointSetTypes< TPipelineFunctor, TPixels >

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

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

Example usage:

template<typename TPointSet>
class PipelineFunctor
{
public:
int operator()(itk::wasm::Pipeline & pipeline)
{
using PointSetType = TPointSet;
using InputPointSetType = itk::wasm::InputPointSet<PointSetType>;
InputPointSetType inputPointSet;
pipeline.add_option("input-pointSet", inputPointSet, "The input pointSet")->required();
Input pointSet for an itk::wasm::Pipeline.

[...]

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

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

The number of pixel components is taken from the point pixel data.

Definition at line 91 of file itkSupportInputPointSetTypes.h.

Static Public Member Functions

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

Static Private Member Functions

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

Member Function Documentation

◆ Dimensions()

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

◆ IterateDimensions()

template<template< typename TPointSet > class TPipelineFunctor, typename... TPixels>
template<unsigned int VDimension, unsigned int... VDimensions>
static int itk::wasm::SupportInputPointSetTypes< TPipelineFunctor, TPixels >::IterateDimensions ( Pipeline & pipeline,
const PointSetTypeJSON & pointSetType,
bool passThrough = false )
inlinestaticprivate

◆ IteratePixelTypes()

template<template< typename TPointSet > class TPipelineFunctor, typename... TPixels>
template<unsigned int VDimension, typename TPixel, typename... TPixelsRest>
static int itk::wasm::SupportInputPointSetTypes< TPipelineFunctor, TPixels >::IteratePixelTypes ( Pipeline & pipeline,
const PointSetTypeJSON & pointSetType,
bool passThrough = false )
inlinestaticprivate

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