Skip to content

Commit

Permalink
Merge pull request #1017 from InsightSoftwareConsortium/image-io-tweeks
Browse files Browse the repository at this point in the history
image-io: Export extensionToImageIo map. Avoid direction matrix transpose
  • Loading branch information
thewtex authored Dec 6, 2023
2 parents abe2c3b + ad9ca85 commit aad5f71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/image-io/typescript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ export type { WasmZstdWriteImageOptions }
import wasmZstdWriteImage from './wasm-zstd-write-image.js'
export { wasmZstdWriteImage }

import extensionToImageIo from './extension-to-image-io.js'
export { extensionToImageIo }

export type { BinaryFile } from 'itk-wasm'
export type { JsonCompatible } from 'itk-wasm'
export type { Image } from 'itk-wasm'
2 changes: 1 addition & 1 deletion packages/image-io/write-image.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int writeImage(itk::wasm::InputImageIO & inputImageIO, itk::wasm::OutputTextStre
{
for (unsigned int dd = 0; dd < dimension; ++dd)
{
direction[dd] = directionContainer->GetElement(dim*dimension + dd);
direction[dd] = directionContainer->GetElement(dim + dimension*dd);
}
imageIO->SetDirection(dim, direction);
imageIO->SetOrigin(dim, inputImageIOBase->GetOrigin(dim));
Expand Down

0 comments on commit aad5f71

Please sign in to comment.