Skip to content

Commit 1b05ac7

Browse files
authored
Merge pull request #1424 from thewtex/cxx-interface-types
docs: expand C++ interface type descriptions
2 parents 3460cef + 173801f commit 1b05ac7

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

docs/cxx/interface_types.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Interface Types
22

3-
itk-wasm execution pipelines support the following [interface types](https://github.com/InsightSoftwareConsortium/ITK-Wasm/tree/main/src/core/InterfaceTypes.ts):
3+
ITK-Wasm execution pipelines support the following [interface types](https://github.com/InsightSoftwareConsortium/ITK-Wasm/tree/main/src/core/InterfaceTypes.ts):
44

55
- [TextFile](../typescript/interface_types/TextFile)
66
- [BinaryFile](../typescript/interface_types/BinaryFile)
@@ -47,11 +47,41 @@ int main(argc, char * argv[])
4747
```
4848
4949
<dl>
50-
<dt><b><code>itk::wasm::InputTextStream</code></b><dt><dd>A string. To reader this data type in C++, using the resulting <a href="https://www.cplusplus.com/reference/istream/istream/">std::istream</a>.</dd>
50+
<dt><b><code>itk::wasm::InputTextStream</code></b><dt><dd>A text stream input. To read this data type in C++, use the resulting <a href="https://www.cplusplus.com/reference/istream/istream/">std::istream</a> from <code>Get()</code>.</dd>
51+
52+
<dt><b><code>itk::wasm::OutputTextStream</code></b><dt><dd>A text stream output. To write to this data type in C++, use the resulting <a href="https://www.cplusplus.com/reference/ostream/ostream/">std::ostream</a> from <code>Get()</code>.</dd>
53+
54+
<dt><b><code>itk::wasm::InputBinaryStream</code></b><dt><dd>A binary stream input. To read this data type in C++, use the resulting <a href="https://www.cplusplus.com/reference/istream/istream/">std::istream</a> from <code>Get()</code>.</dd>
55+
56+
<dt><b><code>itk::wasm::OutputBinaryStream</code></b><dt><dd>A binary stream output. To write to this data type in C++, use the resulting <a href="https://www.cplusplus.com/reference/ostream/ostream/">std::ostream</a> from <code>Get()</code>.</dd>
57+
58+
<dt><b><code>itk::wasm::InputImage&lt;TImage&gt;</code></b><dt><dd>An input image of type <code>TImage</code>. To access the image in C++, use <code>Get()</code> to get a pointer to the <code>TImage</code>.</dd>
59+
60+
<dt><b><code>itk::wasm::OutputImage&lt;TImage&gt;</code></b><dt><dd>An output image of type <code>TImage</code>. To set the output image in C++, use <code>Set(image)</code> with a pointer to the <code>TImage</code>.</dd>
61+
62+
<dt><b><code>itk::wasm::InputMesh&lt;TMesh&gt;</code></b><dt><dd>An input mesh of type <code>TMesh</code>. To access the mesh in C++, use <code>Get()</code> to get a pointer to the <code>TMesh</code>.</dd>
63+
64+
<dt><b><code>itk::wasm::OutputMesh&lt;TMesh&gt;</code></b><dt><dd>An output mesh of type <code>TMesh</code>. To set the output mesh in C++, use <code>Set(mesh)</code> with a pointer to the <code>TMesh</code>.</dd>
65+
66+
<dt><b><code>itk::wasm::InputPointSet&lt;TPointSet&gt;</code></b><dt><dd>An input point set of type <code>TPointSet</code>. To access the point set in C++, use <code>Get()</code> to get a pointer to the <code>TPointSet</code>.</dd>
67+
68+
<dt><b><code>itk::wasm::OutputPointSet&lt;TPointSet&gt;</code></b><dt><dd>An output point set of type <code>TPointSet</code>. To set the output point set in C++, use <code>Set(pointSet)</code> with a pointer to the <code>TPointSet</code>.</dd>
69+
70+
<dt><b><code>itk::wasm::InputPolyData&lt;TPolyData&gt;</code></b><dt><dd>An input polydata of type <code>TPolyData</code>. To access the polydata in C++, use <code>Get()</code> to get a pointer to the <code>TPolyData</code>.</dd>
71+
72+
<dt><b><code>itk::wasm::OutputPolyData&lt;TPolyData&gt;</code></b><dt><dd>An output polydata of type <code>TPolyData</code>. To set the output polydata in C++, use <code>Set(polyData)</code> with a pointer to the <code>TPolyData</code>.</dd>
73+
74+
<dt><b><code>itk::wasm::InputTransform&lt;TTransform&gt;</code></b><dt><dd>An input transform of type <code>TTransform</code>. To access the transform in C++, use <code>Get()</code> to get a pointer to the <code>TTransform</code>.</dd>
75+
76+
<dt><b><code>itk::wasm::OutputTransform&lt;TTransform&gt;</code></b><dt><dd>An output transform of type <code>TTransform</code>. To set the output transform in C++, use <code>Set(transform)</code> with a pointer to the <code>TTransform</code>.</dd>
77+
78+
<dt><b><code>std::string</code> (for files)</b><dt><dd>File paths for input and output files. Use the type names <code>INPUT_TEXT_FILE</code>, <code>OUTPUT_TEXT_FILE</code>, <code>INPUT_BINARY_FILE</code>, or <code>OUTPUT_BINARY_FILE</code>. The string contains the file path that can be used with standard file I/O operations.</dd>
79+
80+
<dt><b><code>itk::wasm::InputTextStream</code> (for JSON)</b><dt><dd>JSON input data. Use the type name <code>INPUT_JSON</code>. To read the JSON data in C++, use the resulting <a href="https://www.cplusplus.com/reference/istream/istream/">std::istream</a> from <code>Get()</code> and parse the JSON content.</dd>
81+
82+
<dt><b><code>itk::wasm::OutputTextStream</code> (for JSON)</b><dt><dd>JSON output data. Use the type name <code>OUTPUT_JSON</code>. To write JSON data in C++, use the resulting <a href="https://www.cplusplus.com/reference/ostream/ostream/">std::ostream</a> from <code>Get()</code> and write the JSON content.</dd>
5183
</dl>
5284
53-
*todo: document remaining CLI11 input and output classes.*
54-
5585
For binding generation, set the `type_name` an the options accordingly. The type names are:
5686
5787
- `INPUT_TEXT_FILE`
@@ -66,7 +96,11 @@ For binding generation, set the `type_name` an the options accordingly. The type
6696
- `OUTPUT_IMAGE`
6797
- `INPUT_MESH`
6898
- `OUTPUT_MESH`
99+
- `INPUT_POINTSET`
100+
- `OUTPUT_POINTSET`
69101
- `INPUT_POLYDATA`
70102
- `OUTPUT_POLYDATA`
71103
- `INPUT_TRANSFORM`
72-
- `OUTPUT_TRANSFORM`
104+
- `OUTPUT_TRANSFORM`
105+
- `INPUT_JSON`
106+
- `OUTPUT_JSON`

0 commit comments

Comments
 (0)