Я намерен иметь свое изображение как стек 2D-матриц значений uint16, упакованных в один единственный 3D-Tensor (это первая ошибка?) PrettyPrint-Override ">
Код: Выделить всё
holoviz:
width: 2584 # width of window size, equalling single image width
height: 1904 # height of window size, equalling single image height
tensors:
- name: "output" # name of the tensor containing input data for display
type: color_lut # Single channel input of UINT16s. 'color_lut' seems adequate.
opacity: 1.0 # layer opacity
priority: 0 # determines render order, higher priority layers are render
< /code>
и продолжать создавать мои изображения в методе вычисления моего оператора создателя.// ..
using std::shared_ptr;
using std::vector;
using holoscan::InputContext;
using holoscan::OutputContext;
using holoscan::ExecutionContext;
using holoscan::Tensor;
// ..
void Op_ImageCreator::compute(InputContext& context_in, OutputContext& context_out, ExecutionContext& context_ex)
{
//> Create the images to be conveyed. ----------------------------
const size_t n_x = 2584u; //itemsize(), tensor_out->ndim());
logger.info("Memory mapping: %p -> %p.", tensor_out->data(), mem_img.get());
// ^My own printf-like logger function. Unexpectedly yields: "Emitting tensor with 1 elements of size 0 and 0 dimensions ..."
// "Memory mapping: (nil) -> 0x71772fc0c010."
context_out.emit(tensor_out->to_dlpack(), "output");
}
< /code>
Компилирование и запуск этого кода Получает мне голос, который регистрирует общий GXF_FAILURE: < /p>
[info] [op_my_image_creator.cpp:27] Emitting tensor with 1 elements of size 0 and 0 dimensions ...
[info] [op_my_image_creator.cpp:27] Memory mapping: (nil) -> 0x71772fc0c010.
[info] [framebuffer_sequence.cpp:277] Using present mode 'Immediate'
[error] [gxf_wrapper.cpp:118] Exception occurred for operator: 'holoviz_A' - Failed to retrieve input 'output'
[error] [entity_executor.cpp:596] Failed to tick codelet holoviz_A in entity: holoviz_A code: GXF_FAILURE
< /code>
Что также беспокоит меня, так это предполагаемое количество элементов 1 с размером 0 в 0 измерениях и фактом, что тензор поддерживает tensor_out-> data () == nullptr < /code>.
Я так с любовью создал этот контекст, обеспечивая его с правильной формой, шагом и большим буфером! Почему эти свойства контекста Подробнее здесь: https://stackoverflow.com/questions/797 ... -holovizop
Мобильная версия