diff --git a/packages/image-io/typescript/src/index.ts b/packages/image-io/typescript/src/index.ts index 0e982eb32..c560afd7f 100644 --- a/packages/image-io/typescript/src/index.ts +++ b/packages/image-io/typescript/src/index.ts @@ -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' diff --git a/packages/image-io/write-image.cxx b/packages/image-io/write-image.cxx index 2de92abe7..8975ea130 100644 --- a/packages/image-io/write-image.cxx +++ b/packages/image-io/write-image.cxx @@ -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));