Skip to content

Commit

Permalink
docs: Migrate Docsify docs into RTD
Browse files Browse the repository at this point in the history
Re: #887
  • Loading branch information
thewtex committed Aug 15, 2023
1 parent a0d9667 commit 2924d29
Show file tree
Hide file tree
Showing 77 changed files with 2,484 additions and 24 deletions.
1 change: 1 addition & 0 deletions packages/core/python/itkwasm/docs/_static/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/python/itkwasm/docs/_static/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/core/python/itkwasm/docs/_static/npm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions packages/core/python/itkwasm/docs/_static/python.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/core/python/itkwasm/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from datetime import date

project = 'itkwasm'
project = 'ITK-Wasm'
copyright = f'{date.today().year}, NumFOCUS'
author = 'Matt McCormick'

Expand Down Expand Up @@ -44,7 +44,7 @@
html_static_path = ['_static']
html_logo = "_static/logo-white.svg"
html_favicon = "_static/icon/favicon.png"
html_title = f"{project} python documentation"
html_title = f"{project} documentation"

# Furo options
html_theme_options = {
Expand Down
10 changes: 10 additions & 0 deletions packages/core/python/itkwasm/docs/cxx/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Installation

Building WebAssembly pipelines is driven by the `itk-wasm` Node.js command line executable, which drives builds, run tests, and generates interface bindings. Install with:

```sh
npm install -g itk-wasm
```

For more information and guidance on installation, see [the tutorial
Introduction](../tutorial/hello_world?id=introduction).
69 changes: 69 additions & 0 deletions packages/core/python/itkwasm/docs/cxx/interface_types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Interface Types

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

- [TextFile](../typescript/interface_types/TextFile)
- [BinaryFile](../typescript/interface_types/BinaryFile)
- [TextStream](../typescript/interface_types/TextStream)
- [BinaryStream](../typescript/interface_types/BinaryStream)
- [Image](../typescript/interface_types/Image)
- [Mesh](../typescript/interface_types/Mesh)
- [PolyData](../typescript/interface_types/PolyData)
- [JsonObject](../typescript/interface_types/JsonObject)

These interfaces types are supported in the [Emscripten interface](../typescript/browser_pipelines), [WASI](https://wasi.dev/) embedding interfaces, and native or virtual [filesystem IO](../introduction/file_formats/index). They are intended to be forward-compatible with the [WebAssembly Component Model](https://github.com/WebAssembly/component-model).

---

The following [CLI11](https://github.com/CLIUtils/CLI11) [`itk::wasm::Pipeline`](https://github.com/InsightSoftwareConsortium/itk-wasm/tree/main/include/itkPipeline.h) components can be included in a C++ to ingest and produce these interface types. For `Input` types, use `Get()` to get the corresponding C++ object value after `ITK_WASM_PARSE_ARGS` is called. For `Output` types, use `Set(value)` to output the value before `main` exits. For example,

```cpp
#include "itkPipeline.h"
#include "itkInputTextStream.h"
#include "itkOutputTextStream.h"

int main(argc, char * argv[])
{
itk::wasm::Pipeline pipeline("test-pipeline", "A test ITK Wasm Pipeline", argc, argv);

itk::wasm::InputTextStream inputTextStream;
pipeline.add_option("InputText", inputTextStream,
"The input text")->required()->type_name("INPUT_TEXT_STREAM");

itk::wasm::OutputTextStream outputTextStream;
pipeline.add_option("OutputText", outputTextStream,
"The output text")->required()->type_name("OUTPUT_TEXT_STREAM");


ITK_WASM_PARSE(pipeline);


const std::string inputTextStreamContent{ std::istreambuf_iterator<char>(inputTextStream.Get()),
std::istreambuf_iterator<char>() };

outputTextStream.Get() << inputTextStreamContent;
}
```
<dl>
<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>
</dl>
*todo: document remaining CLI11 input and output classes.*
For binding generation, set the `type_name` an the options accordingly. The type names are:
- `INPUT_TEXT_FILE`
- `OUTPUT_TEXT_FILE`
- `INPUT_BINARY_FILE`
- `OUTPUT_BINARY_FILE`
- `INPUT_TEXT_STREAM`
- `OUTPUT_TEXT_STREAM`
- `INPUT_BINARY_STREAM`
- `OUTPUT_BINARY_STREAM`
- `INPUT_IMAGE`
- `OUTPUT_IMAGE`
- `INPUT_MESH`
- `OUTPUT_MESH`
- `INPUT_POLYDATA`
- `OUTPUT_POLYDATA`
Loading

0 comments on commit 2924d29

Please sign in to comment.