-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
126 changed files
with
794 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-64 Bytes
(100%)
...pare-images-wasi/itkwasm_compare_images_wasi/wasm_modules/compare-double-images.wasi.wasm
Binary file not shown.
Binary file modified
BIN
-64 Bytes
(100%)
...m-compare-images-wasi/itkwasm_compare_images_wasi/wasm_modules/vector-magnitude.wasi.wasm
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-64 Bytes
(100%)
...sm-dicom-wasi/itkwasm_dicom_wasi/wasm_modules/apply-presentation-state-to-image.wasi.wasm
Binary file not shown.
Binary file modified
BIN
-64 Bytes
(100%)
...itkwasm-dicom-wasi/itkwasm_dicom_wasi/wasm_modules/read-image-dicom-file-series.wasi.wasm
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { demoServer } from './common.ts' | ||
|
||
// const cthead1SmallBase64DataURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAAAAABWESUoAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAH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y+PXLt9o9/asUipvDfWpc1QNFWKPfla8PHI5Ysnsua2l2dH1Un7WS6rKlamxx9f/MKKhkX1syoxmLqcUMVRDTNMlZGkilPsUrOsJ6wxRSel/wuAkzbenLRf4gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wNS0wNlQxNzoyNjozNC0wNDowMORO/MMAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDUtMDZUMTc6MjY6MzQtMDQ6MDCVE0R/AAAAAElFTkSuQmCC' | ||
// const byteString = window.atob(cthead1SmallBase64DataURI.split(',')[1]) | ||
// const mimeString = cthead1SmallBase64DataURI.split(',')[0].split(':')[1].split(';')[0] | ||
// const intArray = new Uint8Array(byteString.length) | ||
// for (let ii = 0; ii < byteString.length; ++ii) { | ||
// intArray[ii] = byteString.charCodeAt(ii) | ||
// } | ||
|
||
// const cthead1SmallBlob = new window.Blob([intArray], { type: mimeString }) | ||
// const cthead1SmallFile = new window.File([cthead1SmallBlob], 'cthead1Small.png') | ||
|
||
function verifyImage (t, image, componentType, pixelType) { | ||
t.is(image.imageType.dimension, 2, 'dimension') | ||
t.is(image.imageType.componentType, componentType) | ||
t.is(image.imageType.pixelType, pixelType) | ||
t.is(image.imageType.components, 1, 'components') | ||
t.is(image.origin[0], 0.0, 'origin[0]') | ||
t.is(image.origin[1], 0.0, 'origin[1]') | ||
t.is(image.spacing[0], 1.0, 'spacing[0]') | ||
t.is(image.spacing[1], 1.0, 'spacing[1]') | ||
t.is(getMatrixElement(image.direction, 2, 0, 0), 1.0, 'direction (0, 0)') | ||
t.is(getMatrixElement(image.direction, 2, 0, 1), 0.0, 'direction (0, 1)') | ||
t.is(getMatrixElement(image.direction, 2, 1, 0), 0.0, 'direction (1, 0)') | ||
t.is(getMatrixElement(image.direction, 2, 1, 1), 1.0, 'direction (1, 1)') | ||
t.is(image.size[0], 32, 'size[0]') | ||
t.is(image.size[1], 32, 'size[1]') | ||
t.is(image.data.length, 1024, 'data.length') | ||
t.is(image.data[512], 12, 'data[512]') | ||
t.end() | ||
} | ||
|
||
describe('read-image', () => { | ||
beforeEach(function() { | ||
cy.visit(demoServer) | ||
|
||
const testPathPrefix = '../test/data/input/' | ||
|
||
const testImageFiles = [ | ||
'cthead1.png' | ||
] | ||
testImageFiles.forEach((fileName) => { | ||
cy.readFile(`${testPathPrefix}${fileName}`, null).as(fileName) | ||
}) | ||
}) | ||
|
||
it('Reads a image', function () { | ||
cy.get('sl-tab[panel="readImage-panel"]').click() | ||
|
||
const testFile = { contents: new Uint8Array(this['cthead1.png']), fileName: 'cthead1.png' } | ||
cy.get('#readImageInputs input[name="serialized-image-file"]').selectFile([testFile,], { force: true }) | ||
cy.get('#readImage-serialized-image-details').should('contain', '137,80') | ||
|
||
cy.get('#readImageInputs sl-button[name="run"]').click() | ||
|
||
cy.get('#readImage-image-details').should('contain', 'imageType') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.