// Generated file. To retain edits, remove this comment. import { TransformList, InterfaceTypes, PipelineOutput, PipelineInput, runPipelineNode } from 'itk-wasm' import CreateScaleLogarithmicTransformNodeOptions from './create-scale-logarithmic-transform-node-options.js' import CreateScaleLogarithmicTransformNodeResult from './create-scale-logarithmic-transform-node-result.js' import path from 'path' import { fileURLToPath } from 'url' /** * Create a scale-logarithmic spatial transformation. * * @param {CreateScaleLogarithmicTransformNodeOptions} options - options object * * @returns {Promise} - result object */ async function createScaleLogarithmicTransformNode( options: CreateScaleLogarithmicTransformNodeOptions = {} ) : Promise { const desiredOutputs: Array = [ { type: InterfaceTypes.TransformList }, ] const inputs: Array = [ ] const args = [] // Inputs // Outputs const transformName = '0' args.push(transformName) // Options args.push('--memory-io') if (options.dimension) { args.push('--dimension', options.dimension.toString()) } if (options.parametersType) { args.push('--parameters-type', options.parametersType.toString()) } const pipelinePath = path.join(path.dirname(fileURLToPath(import.meta.url)), 'pipelines', 'create-scale-logarithmic-transform') const { returnValue, stderr, outputs } = await runPipelineNode(pipelinePath, args, desiredOutputs, inputs) if (returnValue !== 0 && stderr !== "") { throw new Error(stderr) } const result = { transform: outputs[0]?.data as TransformList, } return result } export default createScaleLogarithmicTransformNode