Skip to content

Commit

Permalink
Merge pull request #1196 from thewtex/read-function-names
Browse files Browse the repository at this point in the history
read function names
  • Loading branch information
thewtex authored Aug 12, 2024
2 parents 2033181 + b37fae6 commit 2bbb8bb
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions docs/development/itk_js_to_itk_wasm_migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ The following DICOM image IO functions have been migrated to the `@itk-wasm/dico
The following image and mesh IO functions have been migrated to the `@itk-wasm/image-io`
and `@itk-wasm/mesh-io` package. Their interface changed in some cases.

1. `readImageArrayBuffer` -> `readImageFile`
2. `readImageBlob` -> `readImageFile`
1. `readImageArrayBuffer` -> `readImage`
2. `readImageBlob` -> `readImage`
3. `readImageFileSeries` -> `readImageFileSeries`
4. `readImageHTTP` -> `readImageHttp`
5. `readImageLocalFile` -> `readImageNode`
6. `readMeshArrayBuffer` -> `readMeshFile`
7. `readMeshBlob` -> `readMeshFile`
6. `readMeshArrayBuffer` -> `readMesh`
7. `readMeshBlob` -> `readMesh`
8. `readMeshLocalFile` -> `readMeshNode`
9. `writeImageArrayBuffer` -> `writeImageFile`
10. `writeImageLocalFile` -> `writeImageFileNode`
11. `writeMeshArrayBuffer` -> `writeMeshFile`
9. `writeImageArrayBuffer` -> `writeImage`
10. `writeImageLocalFile` -> `writeImageNode`
11. `writeMeshArrayBuffer` -> `writeMesh`
12. `writeMeshLocalFile` -> `writeMeshNode`

### MeshToPolyData
Expand Down Expand Up @@ -189,4 +189,4 @@ The `useCompression` argument is now last in `writeArrayBuffer`, `writeImageArra

## runPipeline

`runPipelineBrowser` was renamed to `runPipeline`.
`runPipelineBrowser` was renamed to `runPipeline`.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReadImageArrayBufferOptions from './read-image-array-buffer-options.js'
* @deprecated Use readImageArrayBuffer from @itk-wasm/image-io instead
*/
async function readImageArrayBuffer (webWorker: Worker | null, arrayBuffer: ArrayBuffer, fileName: string, options?: ReadImageArrayBufferOptions | string): Promise<ReadImageResult> {
throw new Error('readImageArrayBuffer is deprecated. Use readImageFile from @itk-wasm/image-io instead.')
throw new Error('readImageArrayBuffer is deprecated. Use readImage from @itk-wasm/image-io instead.')
}

export default readImageArrayBuffer
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReadImageArrayBufferOptions from './read-image-array-buffer-options.js'
* @deprecated Use readImageBlob from @itk-wasm/image-io instead
*/
async function readImageBlob (webWorker: Worker | null, blob: Blob, fileName: string, options?: ReadImageArrayBufferOptions | string): Promise<ReadImageResult> {
throw new Error('readImageBlob is deprecated. Use readImageFile from @itk-wasm/image-io instead.')
throw new Error('readImageBlob is deprecated. Use readImage from @itk-wasm/image-io instead.')
}

export default readImageBlob
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import ReadImageResult from './read-image-result.js'
import CastImageOptions from '../cast-image-options.js'

/**
* @deprecated Use readImageFile from @itk-wasm/image-io instead
* @deprecated Use readImage from @itk-wasm/image-io instead
*/
async function readImageFile (webWorker: Worker | null, file: File, options?: CastImageOptions): Promise<ReadImageResult> {
throw new Error('readImageFile is deprecated. Use readImageFile from @itk-wasm/image-io instead.')
throw new Error('readImageFile is deprecated. Use readImage from @itk-wasm/image-io instead.')
}

export default readImageFile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import Image from '../interface-types/image.js'
import CastImageOptions from '../cast-image-options.js'

/**
* @deprecated Use readImageFileNode from @itk-wasm/image-io instead
* @deprecated Use readImageNode from @itk-wasm/image-io instead
*/
async function readImageLocalFile (filePath: string, options?: CastImageOptions): Promise<Image> {
throw new Error('readImageLocalFile is deprecated. Use readImageFileNode from @itk-wasm/image-io instead.')
throw new Error('readImageLocalFile is deprecated. Use readImageNode from @itk-wasm/image-io instead.')
}

export default readImageLocalFile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ReadMeshResult from './read-mesh-result.js'
* @deprecated Use readMeshArrayBuffer from @itk-wasm/image-io instead
*/
async function readMeshArrayBuffer (webWorker: Worker | null, arrayBuffer: ArrayBuffer, fileName: string, mimeType: string): Promise<ReadMeshResult> {
throw new Error('readMeshArrayBuffer is deprecated. Use readMeshFile from @itk-wasm/mesh-io instead.')
throw new Error('readMeshArrayBuffer is deprecated. Use readMesh from @itk-wasm/mesh-io instead.')
}

export default readMeshArrayBuffer
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ReadMeshResult from './read-mesh-result.js'
* @deprecated Use readMeshBlob from @itk-wasm/mesh-io instead
*/
async function readMeshBlob (webWorker: Worker | null, blob: Blob, fileName: string, mimeType: string): Promise<ReadMeshResult> {
throw new Error('readMeshBlob is deprecated. Use readMeshFile from @itk-wasm/mesh-io instead.')
throw new Error('readMeshBlob is deprecated. Use readMesh from @itk-wasm/mesh-io instead.')
}

export default readMeshBlob
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import ReadMeshResult from './read-mesh-result.js'

/**
* @deprecated Use readMeshFile from @itk-wasm/mesh-io instead
* @deprecated Use readMesh from @itk-wasm/mesh-io instead
*/
async function readMeshFile (webWorker: Worker | null, file: File): Promise<ReadMeshResult> {
throw new Error('readMeshFile is deprecated. Use readMeshFile from @itk-wasm/mesh-io instead.')
throw new Error('readMeshFile is deprecated. Use readMesh from @itk-wasm/mesh-io instead.')
}

export default readMeshFile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import Mesh from '../interface-types/mesh.js'

/**
* @deprecated Use readMeshFileNode from @itk-wasm/mesh-io instead
* @deprecated Use readMeshNode from @itk-wasm/mesh-io instead
*/
async function readMeshLocalFile (filePath: string): Promise<Mesh> {
throw new Error('readMeshLocalFile is deprecated. Use readMeshFileNode from @itk-wasm/mesh-io instead.')
throw new Error('readMeshLocalFile is deprecated. Use readMeshNode from @itk-wasm/mesh-io instead.')
}

export default readMeshLocalFile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import WriteImageOptions from './write-image-options.js'
import WriteArrayBufferResult from './write-array-buffer-result.js'

/**
* @deprecated Use writeImageFile from @itk-wasm/image-io instead
* @deprecated Use writeImage from @itk-wasm/image-io instead
*/
async function writeImageArrayBuffer (webWorker: Worker | null, image: Image, fileName: string, options?: WriteImageOptions | string, useCompressionBackwardsCompatibility?: boolean
): Promise<WriteArrayBufferResult> {
throw new Error('writeImageArrayBuffer is deprecated. Use writeImageFile from @itk-wasm/image-io instead.')
throw new Error('writeImageArrayBuffer is deprecated. Use writeImage from @itk-wasm/image-io instead.')
}

export default writeImageArrayBuffer
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import WriteImageOptions from './write-image-options.js'
import Image from '../interface-types/image.js'

/**
* @deprecated Use writeImageFileNode from @itk-wasm/image-io instead
* @deprecated Use writeImageNode from @itk-wasm/image-io instead
*/
async function writeImageLocalFile (image: Image, filePath: string, options?: WriteImageOptions | boolean
): Promise<null> {
throw new Error('writeImageLocalFile is deprecated. Use writeImageFileNode from @itk-wasm/image-io instead.')
throw new Error('writeImageLocalFile is deprecated. Use writeImageNode from @itk-wasm/image-io instead.')
}

export default writeImageLocalFile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import WriteArrayBufferResult from './write-array-buffer-result.js'
import WriteMeshOptions from './write-mesh-options.js'

/**
* @deprecated Use writeMeshFile from @itk-wasm/mesh-io instead
* @deprecated Use writeMesh from @itk-wasm/mesh-io instead
*/
async function writeMeshArrayBuffer (webWorker: Worker | null, mesh: Mesh, fileName: string, mimeType: string, options: WriteMeshOptions): Promise<WriteArrayBufferResult> {
throw new Error('writeMeshArrayBuffer is deprecated. Use writeMeshFile from @itk-wasm/mesh-io instead.')
throw new Error('writeMeshArrayBuffer is deprecated. Use writeMesh from @itk-wasm/mesh-io instead.')
}

export default writeMeshArrayBuffer
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import WriteMeshOptions from './write-mesh-options.js'
import Mesh from '../interface-types/mesh.js'

/**
* @deprecated Use writeMeshFileNode from @itk-wasm/mesh-io instead
* @deprecated Use writeMeshNode from @itk-wasm/mesh-io instead
*/
async function writeMeshLocalFile (mesh: Mesh, filePath: string, options: WriteMeshOptions): Promise<null> {
throw new Error('writeMeshLocalFile is deprecated. Use writeMeshFileNode from @itk-wasm/mesh-io instead.')
throw new Error('writeMeshLocalFile is deprecated. Use writeMeshNode from @itk-wasm/mesh-io instead.')
}

export default writeMeshLocalFile

0 comments on commit 2bbb8bb

Please sign in to comment.