ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkPipeline.h File Reference
#include <CLI/App.hpp>
#include <CLI/Config.hpp>
#include <CLI/Error.hpp>
#include "itkMacro.h"
#include "itkImage.h"
#include "itkVectorImage.h"
#include "glaze/glaze.hpp"
#include "WebAssemblyInterfaceExport.h"
+ Include dependency graph for itkPipeline.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  itk::wasm::App
 
class  itk::wasm::Pipeline
 

Namespaces

namespace  itk
 
namespace  itk::wasm
 

Macros

#define ITK_WASM_CATCH_EXCEPTION(pipeline, command)
 
#define ITK_WASM_PARSE(pipeline)
 
#define ITK_WASM_PRE_PARSE(pipeline)
 

Functions

template<typename TIteratorable>
glz::json_t::array_t itk::wasm::getArrayJson (TIteratorable container)
 

Macro Definition Documentation

◆ ITK_WASM_CATCH_EXCEPTION

#define ITK_WASM_CATCH_EXCEPTION ( pipeline,
command )
Value:
try \
{ \
command; \
} \
catch (const itk::ExceptionObject & excp) \
{ \
std::ostringstream ostrm; \
ostrm << excp; \
ostrm << " In " __FILE__ ", line " << __LINE__ << std::endl; \
CLI::Error err("Runtime error", ostrm.str(), 1); \
return (pipeline).exit(err); \
} \
catch (const std::exception & excp) \
{ \
std::ostringstream ostrm; \
ostrm << excp.what(); \
ostrm << " In " __FILE__ ", line " << __LINE__ << std::endl; \
CLI::Error err("Runtime error", ostrm.str(), 1); \
return (pipeline).exit(err); \
}
Standard exception handling object.

Definition at line 91 of file itkPipeline.h.

◆ ITK_WASM_PARSE

#define ITK_WASM_PARSE ( pipeline)
Value:
try \
{ \
const auto iwpArgc = (pipeline).get_argc(); \
const auto iwpArgv = (pipeline).get_argv(); \
for (int ii = 0; ii < iwpArgc; ++ii) \
{ \
const std::string arg(iwpArgv[ii]); \
if (arg == "-h" || arg == "--help") \
{ \
(pipeline).exit(CLI::CallForAllHelp()); \
std::exit(0); \
} \
if (arg == "--interface-json") \
{ \
(pipeline).interface_json(); \
std::exit(0); \
} \
if (arg == "--version") \
{ \
std::cout << "Version: " << (pipeline).version() << std::endl; \
std::exit(0); \
} \
} \
(pipeline).parse(); \
} \
catch (const CLI::ParseError & e) \
{ \
return (pipeline).exit(e); \
}

Definition at line 36 of file itkPipeline.h.

◆ ITK_WASM_PRE_PARSE

#define ITK_WASM_PRE_PARSE ( pipeline)
Value:
try \
{ \
(pipeline).set_help_flag(); \
(pipeline).allow_extras(true); \
(pipeline).parse(); \
} \
catch (const CLI::CallForHelp & e) \
{} \
catch (const CLI::CallForAllHelp & e) \
{} \
catch (const CLI::ParseError & e) \
{ \
return (pipeline).exit(e); \
} \
(pipeline).allow_extras(false); \
(pipeline).set_help_flag("-h,--help", "Print this help message and exit"); \
(pipeline).clear();

Definition at line 72 of file itkPipeline.h.

Referenced by itk::wasm::SupportInputImageTypes< TPipelineFunctor, TPixels >::Dimensions(), itk::wasm::SupportInputMeshTypes< TPipelineFunctor, TPixels >::Dimensions(), itk::wasm::SupportInputPointSetTypes< TPipelineFunctor, TPixels >::Dimensions(), itk::wasm::SupportInputTransformTypes< TPipelineFunctor, TParameterValuesSupported >::Dimensions(), and itk::wasm::SupportInputPolyDataTypes< TPipelineFunctor >::PixelTypes().