Closed realyyz closed 7 months ago
ValueError(f'Unexpected/not yet supported output.type {output.type}')
seems to be related to WASM wrapping. It is possible 4D images are not wrapped. @thewtex might provide more insight or advice.
Thank you for your reply. This is the code that I use to test during 4d:
I have tried the similar code in 3d, it preforms very well, but when it comes to 4d, there are errors.
I added 4D support to wasm in #121, built and pushed as 1.1.0. Please give it a try and let us know how it goes.
@dzenanz @thewtex Thank you for your help, I have successfully make the interpolation in 3d!
I have a series of the ground truth of the segmentation of 3d images on different time step, I would like to make the interpolation. But I didn't succeed. This is what I got:
ExitTrap Traceback (most recent call last) Cell In[43], line 2 1 WASMTIME_BACKTRACE_DETAILS=1 ----> 2 filled = morphological_contour_interpolation(itkwasm_image)
File \lib\site-packages\itkwasm_morphological_contour_interpolation_wasi\morphological_contour_interpolation.py:130, in morphological_contour_interpolation(input_image, label, axis, no_heuristic_alignment, no_use_distance_transform, use_custom_slice_positions, no_use_extrapolation, use_ball_structuring_element, labeled_slice_indices_axis, labeled_slice_indices_label, labeled_slice_indices) 126 for value in labeled_slice_indices: 127 args.append(str(value)) --> 130 outputs = _pipeline.run(args, pipeline_outputs, pipeline_inputs) 132 result = outputs[0].data 133 return result
File \lib\site-packages\itkwasm\pipeline.py:465, in Pipeline.run(self, args, outputs, inputs) 461 raise ValueError(f'Unexpected/not yet supported output.type {output.type}') 463 populated_outputs.append(output_data) --> 465 ri.delayed_exit(return_code) 467 # Should we be returning the return_code? 468 return tuple(populated_outputs)
File \lib\site-packages\itkwasm\pipeline.py:131, in RunInstance.delayed_exit(self, return_code) 129 def delayed_exit(self, return_code): 130 func = self._instance.exports(self._store)["itk_wasm_delayed_exit"] --> 131 func(self._store, return_code)
File \lib\site-packages\wasmtime_func.py:101, in Func.call(self, store, *params) 92 error = ffi.wasmtime_func_call( 93 store._context(), 94 byref(self._func), (...) 98 len(result_tys), 99 trap) 100 if error: --> 101 raise WasmtimeError._from_ptr(error) 103 results = [] 104 for i in range(0, len(result_tys)):
ExitTrap: error while executing at wasm backtrace: 0: 0x4ba6a -!<wasm function 964>
1: 0x204937 - !<wasm function 3517>
note: using the
WASMTIME_BACKTRACE_DETAILS=1
environment variable may show more debugging informationCaused by: Exited with i32 exit status 1
==========================================================
I sincerely appreciate your help!