Skip to content
Open

io bump #1555

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
2 changes: 1 addition & 1 deletion packages/core/typescript/itk-wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "itk-wasm",
"version": "1.0.0-b.198",
"version": "1.0.0-b.199",
"description": "High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.",
"type": "module",
"module": "./dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"itk-wasm": "1.0.0-b.198"
"itk-wasm": "1.0.0-b.199"
},
"devDependencies": {
"@itk-wasm/demo-app": "^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/typescript/itk-wasm/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const version = '1.0.0-b.198'
const version = '1.0.0-b.199'

export default version
2 changes: 1 addition & 1 deletion packages/image-io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itk-wasm/image-io-build",
"version": "1.6.1",
"version": "1.6.2",
"private": true,
"description": "Input and output for scientific and medical image file formats.",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.6.1"
__version__ = "1.6.2"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.6.1"
__version__ = "1.6.2"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.6.1"
__version__ = "1.6.2"
2 changes: 1 addition & 1 deletion packages/image-io/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itk-wasm/image-io",
"version": "1.6.1",
"version": "1.6.2",
"description": "Input and output for scientific and medical image file formats.",
"type": "module",
"module": "./dist/index.js",
Expand Down
31 changes: 30 additions & 1 deletion packages/image-io/typescript/test/node/tiff-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from 'ava'
import path from 'path'

import { tiffReadImageNode, tiffWriteImageNode } from '../../dist/index-node.js'
import { tiffReadImageNode, tiffWriteImageNode, writeImageNode } from '../../dist/index-node.js'
import { IntTypes, PixelTypes, getMatrixElement } from 'itk-wasm'

import { testInputPath, testOutputPath } from './common.js'
Expand Down Expand Up @@ -45,3 +45,32 @@ test('Test writing a TIFF file', async t => {
t.true(couldReadBack)
verifyImage(t, imageBack)
})


test('Test TIFF integer pixel types', async t => {
const dtypes = [
{componentType: 'uint8', data: new Uint8Array(100*100), name: 'uint8_test'},
{componentType: 'uint16', data: new Uint16Array(100*100), name: 'uint16_test'},
{componentType: 'uint32', data: new Uint32Array(100*100), name: 'uint32_test'},
]

dtypes.forEach(async (d) => {
console.log("Writing", d.name)

const res = await writeImageNode(
{
imageType: {
dimension: 2,
pixelType: 'Scalar',
componentType: d.componentType,
components: 1
},
name: d.name,
direction: new Float64Array([1.0, 0.0, 0.0, 1.0]),
size: [100, 100],
data: d.data, // <- !!! Will crash if Uint32Array
},d.name + '.tif')

console.log(d.name, res)
})
})
Loading