32 std::shared_ptr<CByteImage>
37 if (nav->getShape().size() != 3)
40 __PRETTY_FUNCTION__,
"The size of an NDArray does not match.", nav->getPath());
43 auto dims = nav->getShape();
45 auto ret = std::make_shared<CByteImage>();
47 ret->Set(dims[0], dims[1],
static_cast<CByteImage::ImageType
>(std::stoi(nav->getType())));
49 memcpy(
reinterpret_cast<unsigned char*
>(
ret->pixels),
51 std::accumulate(std::begin(dims), std::end(dims), 1, std::multiplies<int>()));