Skip to content
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
6 changes: 6 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ jobs:
large-packages: false
tool-cache: true

- uses: nick-fields/retry@v3
with:
max_attempts: 5
timeout_minutes: 10
command: ./src/docker/pull.sh --no-debug

- name: Install
uses: pnpm/action-setup@v4
with:
Expand Down
6 changes: 2 additions & 4 deletions docs/introduction/file_formats/images.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported Image File Formats

Read and write to and from [`Image`](/typescript/interface_types/Image.html) is supported. For visualization with [vtk.js](https://kitware.github.io/vtk-js/index.html), use [`convertItkToVtkImage`](https://kitware.github.io/vtk-js/api/Common_DataModel_ITKHelper.html).
Read and write to and from an [`Image`](../../typescript/interface_types/Image).

- [AIM,ISQ](https://www.scanco.ch/en/support/customer-login/faq-customers/faq-customers-import-export.html)
- [BioRad](https://www.bio-rad.com/)
Expand All @@ -18,6 +18,4 @@ Read and write to and from [`Image`](/typescript/interface_types/Image.html) is
- [NIfTI](https://nifti.nimh.nih.gov/nifti-1)
- [NRRD](http://teem.sourceforge.net/nrrd/format.html)
- [VTK legacy file format for images](https://www.vtk.org/VTK/img/file-formats.pdf)
- [Varian FDF](https://github.com/InsightSoftwareConsortium/ITKIOFDF)

For visualization with [vtk.js](https://kitware.github.io/vtk-js/index.html), use [`vtkITKHelper.convertItkToVtkImage`](https://kitware.github.io/vtk-js/api/Common_DataModel_ITKHelper.html) ([example](https://kitware.github.io/vtk-js/examples/ItkWasmVolume.html)).
- [Varian FDF](https://github.com/InsightSoftwareConsortium/ITKIOFDF)
4 changes: 3 additions & 1 deletion docs/introduction/file_formats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Support for data serialized in file formats are a critical bridge that facilitate comprehensive analysis with a suite of diverse software tools.

ITK-Wasm provides IO modules to work with a number of open standard [scientific image](./images) and [mesh](./meshes) file formats, These IO modules can be used to load data into language-native [interfaces types](/typescript/interface_types/index) in with bindings such as TypeScript and Python.
ITK-Wasm provides IO modules to work with a number of open standard [scientific image](./images), [mesh](./meshes), and [transform](./transforms) file formats, These IO modules can be used to load data into language-native [interfaces types](/typescript/interface_types/index) in with bindings such as TypeScript and Python.

## ITK-Wasm file formats

Expand All @@ -17,6 +17,7 @@ ITK-Wasm file formats are available in ITK-Wasm IO functions but also in C++ via
<dl>
<dt><b>ITK-Wasm Image (.iwi, .iwi.cbor, .iwi.cbor.zst)</b><dt><dd>Serialization of an <a href="../../typescript/interface_types/Image.html"><code>Image</code></a>.</dd>
<dt><b>ITK-Wasm Mesh (.iwm, .iwm.cbor, .iwm.cbor.zst)</b><dt><dd>Serialization of a <a href="../../typescript/interface_types/Mesh.html"><code>Mesh</code></a>, or <a href="../../typescript/interface_types/PolyData.html"><code>PolyData</code></a>.</dd>
<dt><b>ITK-Wasm Transform (.iwt, .iwt.cbor, .iwt.cbor.zst)</b><dt><dd>Serialization of an <a href="../../typescript/interface_types/TransformList.html"><code>TransformList</code></a>.</dd>
</dl>


Expand All @@ -26,5 +27,6 @@ ITK-Wasm file formats are available in ITK-Wasm IO functions but also in C++ via

images.md
meshes.md
transforms.md
dicom.md
```
4 changes: 1 addition & 3 deletions docs/introduction/file_formats/meshes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported Mesh and Point Set File Formats

Read and write to and from [`Mesh`](/typescript/interface_types/Mesh.html) is supported.
Read and write to and from [`Mesh`](../../typescript/interface_types/Mesh) is supported.

- [BYU](http://www.eg-models.de/formats/Format_Byu.html)
- [FreeSurfer surface, binary and ASCII](http://www.grahamwideman.com/gw/brain/fs/surfacefileformats.htm)
Expand All @@ -9,5 +9,3 @@ Read and write to and from [`Mesh`](/typescript/interface_types/Mesh.html) is su
- [SWC Neuron Morphology](https://swc-specification.readthedocs.io/en/latest/)
- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file)
- [VTK legacy file format for vtkPolyData](https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf)

For visualization with [vtk.js](https://kitware.github.io/vtk-js/index.html), use itk-wasm `meshToPolyData` and [`vtkITKHelper.convertItkToVtkPolyData`](https://kitware.github.io/vtk-js/api/Common_DataModel_ITKHelper.html) ([example](https://kitware.github.io/vtk-js/examples/ItkWasmGeometry.html)).
8 changes: 8 additions & 0 deletions docs/introduction/file_formats/transforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Supported Transform File Formats

Read and write to and from a spatial [`TransformList`](../../typescript/interface_types/TransformList).

- [ITK-HDF5](https://support.hdfgroup.org/HDF5/) - ITK HDF5 transform file format.
- [ITK-TXT](https://docs.itk.org) - ITK Legacy text transform file format.
- [MAT](https://www.mathworks.com/help/matlab/ref/matfile.html) - ITK MAT file format.
- [XFM](https://github.com/BIC-MNI/minc-tools) - MNI XFM file format.
6 changes: 2 additions & 4 deletions docs/typescript/interface_types/Image.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Image

An `Image` is the N-dimensional image data structure for *itk-wasm*.
An `Image` is the N-dimensional image data structure for *ITK-Wasm*.

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

Expand All @@ -19,6 +19,4 @@ Note that the `origin`, `spacing`, `direction`, and `size` are indexed with an `

```
const tensor = tf.tensor(image.data, image.size.reverse())
```

To visualize an `Image` with [vtk.js](https://kitware.github.io/vtk-js) use `convertItkToVtkImage` from [`vtk.js/Sources/Common/DataModel/ITKHelper`](https://kitware.github.io/vtk-js/api/Common_DataModel_ITKHelper.html).
```
12 changes: 12 additions & 0 deletions docs/typescript/interface_types/Transform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Transform

A `Transform` specifies a spatial transformation that maps points from one coordinate system to another. The `Transform` interface is a JavaScript object with the following properties:

- `transformType`: The [TransformType](./TransformType) for this transform.
- `numberOfFixedParameters`: The number of fixed parameters for the transform. Fixed parameters are not optimized during registration.
- `numberOfParameters`: The number of parameters for the transform.
- `name`: An optional name string that describes this transform.
- `inputSpaceName`: An optional name string that describes the input space.
- `outputSpaceName`: An optional name string that describes the output space.
- `parameters`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the transform parameters.
- `fixedParameters`: A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) containing the fixed transform parameters.
5 changes: 5 additions & 0 deletions docs/typescript/interface_types/TransformList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# TransformList

A `TransformList` is an ordered sequence of spatial [`Transform`](./Transform) objects.

`TransformList` is a JavaScript array of `Transform` objects.
34 changes: 34 additions & 0 deletions docs/typescript/interface_types/TransformParameterizations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# TransformParameterizations

The enumeration of transform parameterization values is:

- `Composite`
- `Identity`
- `Translation`
- `Euler2D`
- `Euler3D`
- `Rigid2D`
- `Rigid3D`
- `Rigid3DPerspective`
- `Versor`
- `VersorRigid3D`
- `Scale`
- `ScaleLogarithmic`
- `ScaleSkewVersor3D`
- `Similarity2D`
- `Similarity3D`
- `QuaternionRigid`
- `Affine`
- `ScalableAffine`
- `AzimuthElevationToCartesian`
- `BSpline`
- `BSplineSmoothingOnUpdateDisplacementField`
- `ConstantVelocityField`
- `DisplacementField`
- `GaussianSmoothingOnUpdateDisplacementField`
- `GaussianExponentialDiffeomorphic`
- `VelocityField`
- `TimeVaryingVelocityField`
- `GaussianSmoothingOnUpdateTimeVaryingVelocityField`

The definition of these transform and the meaning of their parameters is described in detail in the [ITK Software Guide, Book 2, Section 3.9](https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/releases).
8 changes: 8 additions & 0 deletions docs/typescript/interface_types/TransformType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# TransformType

An `TransformType` describes parameterization, parameter value type, and input and output dimensions of the transform. It is a JavaScript object with the following properties:

- `transformParameterization`: The [TransformParameterization](./TransformParameterizations) for this transform.
- `parametersValueType`: Whether the transform parameters are `float32` or `float64`.
- `inputDimension`: The number of dimensions of the input space.
- `outputDimension`: The number of dimensions of the output space.
4 changes: 4 additions & 0 deletions docs/typescript/interface_types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ ImageType.md
Mesh.md
MeshType.md
PolyData.md
TransformList.md
Transform.md
TransformType.md
TransformParameterizations.md
JsonCompatible.md
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@shoelace-style/shoelace": "^2.12.0",
"start-server-and-test": "^2.0.4",
"ava": "^6.1.3",
"cypress": "^14.1.0"
"cypress": "^14.2.0"
}
},
"commitlint": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PolyData {

metadata: Metadata

constructor(public readonly polyDataType = new PolyDataType()) {
constructor (public readonly polyDataType = new PolyDataType()) {
this.polyDataType = polyDataType

this.name = 'PolyData'
Expand Down
64 changes: 27 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading