18#ifndef itkSupportInputTransformTypes_h
19#define itkSupportInputTransformTypes_h
28#include "WebAssemblyInterfaceExport.h"
35WebAssemblyInterface_EXPORT
bool
83template <
template <
typename TTransform>
class TPipelineFunctor,
typename... TParameterValuesSupported>
87 template <
unsigned int... VDimensions>
93 const auto iwpArgc = pipeline.
get_argc();
94 const auto iwpArgv = pipeline.
get_argv();
95 bool passThrough =
false;
96 for (
int ii = 0; ii < iwpArgc; ++ii)
98 const std::string arg(iwpArgv[ii]);
99 if (arg ==
"-h" || arg ==
"--help" || arg ==
"--interface-json" || arg ==
"--version")
109 auto tempOption = pipeline.add_option(inputTransformOptionName, transformType,
"Read Transform type.");
113 pipeline.remove_option(tempOption);
119 template <
unsigned int VDimension,
typename TParameterValues,
typename... TParameterValuesRest>
123 using ParameterValueType = TParameterValues;
129 using PipelineType = TPipelineFunctor<TransformType>;
130 return PipelineType()(pipeline);
133 if constexpr (
sizeof...(TParameterValuesRest) > 0)
138 std::ostringstream ostrm;
139 std::string transformTypeString = glz::write_json(transformType).value_or(
"error");
140 ostrm <<
"Unsupported transform type: " << transformTypeString << std::endl;
141 CLI::Error err(
"Runtime error", ostrm.str(), 1);
142 return pipeline.
exit(err);
145 template <
unsigned int VDimension,
unsigned int... VDimensions>
154 if constexpr (
sizeof...(VDimensions) > 0)
159 std::ostringstream ostrm;
160 ostrm <<
"Unsupported transform dimension: " << transformType.
inputDimension;
161 CLI::Error err(
"Runtime error", ostrm.str(), 1);
162 return pipeline.
exit(err);
auto exit(const CLI::Error &e) -> int
#define ITK_WASM_PRE_PARSE(pipeline)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
WebAssemblyInterface_EXPORT bool lexical_cast(const std::string &input, ImageTypeJSON &imageType)
static constexpr JSONFloatTypesEnum JSONFloatTypeEnum