Skip to content

Commit 723bf73

Browse files
authored
Merge pull request #1359 from thewtex/typescript-api-docs
docs(typescript): fix interface-type links
2 parents a6167ed + 76c1192 commit 723bf73

File tree

8 files changed

+33
-21
lines changed

8 files changed

+33
-21
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BinaryFile
22

3-
A `BinaryFile` represents a binary file. For performance reasons, use [`BinaryStream`](./BinaryStream.html), when possible, instead. `BinaryFile` is a JavaScript object with the following properties:
3+
A `BinaryFile` represents a binary file. For performance reasons, use [`BinaryStream`](./BinaryStream), when possible, instead. `BinaryFile` is a JavaScript object with the following properties:
44

55
- `data`: `Uint8Arrray` with the binary data.
66
- `path`: File path string.

docs/typescript/interface_types/Image.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ An `Image` is the N-dimensional image data structure for *ITK-Wasm*.
44

55
`Image` is a JavaScript object with the following properties:
66

7-
- `imageType`: The [ImageType](/api/ImageType) for this image.
7+
- `imageType`: The [ImageType](./ImageType) for this image.
88
- `name`: An optional name string that describes this image.
99
- `origin` An Array with length `imageType.dimension` that describes the location of the center of the lower left pixel in physical units.
1010
- `spacing`: An Array with length `dimension` that describes the spacing between pixel in physical units.
@@ -19,4 +19,4 @@ Note that the `origin`, `spacing`, `direction`, and `size` are indexed with an `
1919

2020
```
2121
const tensor = tf.tensor(image.data, image.size.reverse())
22-
```
22+
```
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# ImageType
22

3-
An `ImageType` describes the type of an [`Image`](/api/Image). It is a
3+
An `ImageType` describes the type of an [`Image`](./Image). It is a
44
JSON object with the following attributes:
55

66
- `dimension`: An integer that describes the dimension for the image, typically 2 or 3.
7-
- `pixelType`: The [`PixelType`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/PixelTypes.ts). For example, *Scalar*, *Vector*, *CovariantVector*, or *SymmetricSecondRankTensor*.
8-
- `componentType`: The type of the components in a pixel. This is one of the [`IntTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/IntTypes.ts) or [`FloatTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/FloatTypes.ts).
7+
- `pixelType`: The [`PixelType`]. For example, *Scalar*, *Vector*, *CovariantVector*, or *SymmetricSecondRankTensor*.
8+
- `componentType`: The type of the components in a pixel. This is one of the [`IntTypes`] or [`FloatTypes`].
99
- `components`: The number of components in a pixel. For a *Scalar* `pixelType` this will be 1.
10+
11+
[`PixelType`]: https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/packages/core/typescript/itk-wasm/src/interface-types/pixel-types.ts
12+
[`IntTypes`]: https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/packages/core/typescript/itk-wasm/src/interface-types/int-types.ts
13+
[`FloatTypes`]: https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/packages/core/typescript/itk-wasm/src/interface-types/float-types.ts

docs/typescript/interface_types/Mesh.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ An `Mesh` is the N-dimensional data structure to represent points sets and meshe
44

55
A Mesh is a JavaScript object with the following properties:
66

7-
- `meshType`: The [`MeshType`](/api/MeshType) for this mesh.
7+
- `meshType`: The [`MeshType`](./MeshType) for this mesh.
88
- `name`: An optional name string that describes this mesh.
99
- `numberOfPoints`: The number of points in the mesh.
10-
- `points`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the point locations.
10+
- `points`: A [`TypedArray`] containing the point locations.
1111
- `numberOfPointPixels`: The number of points pixels in the mesh.
12-
- `pointData`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the point pixel data.
12+
- `pointData`: A [`TypedArray`] containing the point pixel data.
1313
- `numberOfCells`: The number of cells in the mesh.
14-
- `cells`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the cells.
14+
- `cells`: A [`TypedArray`] containing the cells.
1515
- `numberOfCellPixels`: The number of cells pixels in the mesh.
16-
- `cellData`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the cell pixel data.
16+
- `cellData`: A [`TypedArray`] containing the cell pixel data.
1717
- `cellBufferSize`: The size of the cell buffer in `unsigned int`'s.
1818

1919
For more information, see [the description](https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch4.html#x38-640004.3) of an `itk::Mesh` in the ITK Software Guide.
20+
21+
`TypedArray`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray

docs/typescript/interface_types/MeshType.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
A `MeshType` describes the type of an [`Mesh`](/api/Mesh). It is a JSON object with the following attributes:
44

55
- `dimension`: The spatial dimension of the mesh.
6-
- `pointComponentType`: The type of the components used to represent a point. This is one of the [`FloatTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/FloatTypes.js).
7-
- `pointPixelComponentType`: The type of the components used to represent the data at a point. This is one of the [`IntTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/IntTypes.js) or [`FloatTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/FloatTypes.ts).
8-
- `pointPixelType`: The [`PixelType`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/PixelTypes.ts) for data associated with a point. For example, *Scalar*, *Vector*, *CovariantVector*, or *SymmetricSecondRankTensor*.
6+
- `pointComponentType`: The type of the components used to represent a point. This is one of the [`FloatTypes`].
7+
- `pointPixelComponentType`: The type of the components used to represent the data at a point. This is one of the [`IntTypes`] or [`FloatTypes`].
8+
- `pointPixelType`: The [`PixelType`] for data associated with a point. For example, *Scalar*, *Vector*, *CovariantVector*, or *SymmetricSecondRankTensor*.
99
- `pointPixelComponents`: The number of components in a point pixel. For a *Scalar* *pixelType*, this will be 1.
10-
- `cellComponentType`: The type of the components used to represent a cell. This is one of the [`IntTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/IntTypes.ts).
11-
- `cellPixelComponentType`: The type of the components used to represent the data at a cell. This is one of the [`IntTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/IntTypes.js) or [`FloatTypes`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/FloatTypes.ts).
12-
- `cellPixelType`: The [`PixelType`](https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/src/core/PixelTypes.ts) for data associated with a cell. For example, *Scalar*, *Vector*, *CovariantVector*, or *SymmetricSecondRankTensor*.
10+
- `cellComponentType`: The type of the components used to represent a cell. This is one of the [`IntTypes`].
11+
- `cellPixelComponentType`: The type of the components used to represent the data at a cell. This is one of the [`IntTypes`] or [`FloatTypes`].
12+
- `cellPixelType`: The [`PixelType`] for data associated with a cell. For example, *Scalar*, *Vector*, *CovariantVector*, or *SymmetricSecondRankTensor*.
1313
- `cellPixelComponents`: The number of components in a cell pixel. For a *Scalar* `pixelType`, this will be 1.
14+
15+
[`PixelType`]: https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/packages/core/typescript/itk-wasm/src/interface-types/pixel-types.ts
16+
[`IntTypes`]: https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/packages/core/typescript/itk-wasm/src/interface-types/int-types.ts
17+
[`FloatTypes`]: https://github.com/InsightSoftwareConsortium/ITK-Wasm/blob/main/packages/core/typescript/itk-wasm/src/interface-types/float-types.ts
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TextFile
22

3-
A `TextFile` represents a text file. For performance reasons, use [`TextStream`](./TextStream.html), when possible, instead. `TextFile` is a JavaScript object with the following properties:
3+
A `TextFile` represents a text file. For performance reasons, use [`TextStream`](./TextStream), when possible, instead. `TextFile` is a JavaScript object with the following properties:
44

55
- `data`: String with the text data.
66
- `path`: File path string.

docs/typescript/interface_types/Transform.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ A `Transform` specifies a spatial transformation that maps points from one coord
88
- `name`: An optional name string that describes this transform.
99
- `inputSpaceName`: An optional name string that describes the input space.
1010
- `outputSpaceName`: An optional name string that describes the output space.
11-
- `parameters`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the transform parameters.
12-
- `fixedParameters`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the fixed transform parameters.
11+
- `parameters`: A [`TypedArray`] containing the transform parameters.
12+
- `fixedParameters`: A [`TypedArray`] containing the fixed transform parameters.
13+
14+
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray

docs/typescript/interface_types/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ TransformParameterizations.md
2222
JsonCompatible.md
2323
```
2424

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

0 commit comments

Comments
 (0)