Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Migrate Docsify docs into RTD #897

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading