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

#include <itkSupportInputMeshTypes.h>

Detailed Description

template<template< typename TMesh > class TPipelineFunctor, typename... TPixels>
class itk::wasm::SupportInputMeshTypes< TPipelineFunctor, TPixels >

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

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

Example usage:

template<typename TMesh>
class PipelineFunctor
{
public:
int operator()(itk::wasm::Pipeline & pipeline)
{
using MeshType = TMesh;
using InputMeshType = itk::wasm::InputMesh<MeshType>;
InputMeshType inputMesh;
pipeline.add_option("input-mesh", inputMesh, "The input mesh")->required();
Input mesh for an itk::wasm::Pipeline.

[...]

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

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 91 of file itkSupportInputMeshTypes.h.

Static Public Member Functions

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

Static Private Member Functions

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

Member Function Documentation

◆ Dimensions()

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

◆ IterateDimensions()

template<template< typename TMesh > class TPipelineFunctor, typename... TPixels>
template<unsigned int VDimension, unsigned int... VDimensions>
static int itk::wasm::SupportInputMeshTypes< TPipelineFunctor, TPixels >::IterateDimensions ( Pipeline & pipeline,
const MeshTypeJSON & meshType,
bool passThrough = false )
inlinestaticprivate

◆ IteratePixelTypes()

template<template< typename TMesh > class TPipelineFunctor, typename... TPixels>
template<unsigned int VDimension, typename TPixel, typename... TPixelsRest>
static int itk::wasm::SupportInputMeshTypes< TPipelineFunctor, TPixels >::IteratePixelTypes ( Pipeline & pipeline,
const MeshTypeJSON & meshType,
bool passThrough = false )
inlinestaticprivate

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