本文整理汇总了C++中ImageBuf::set_roi_full方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageBuf::set_roi_full方法的具体用法?C++ ImageBuf::set_roi_full怎么用?C++ ImageBuf::set_roi_full使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageBuf
的用法示例。
在下文中一共展示了ImageBuf::set_roi_full方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: logtime
bool
ImageBufAlgo::transpose (ImageBuf &dst, const ImageBuf &src,
ROI roi, int nthreads)
{
pvt::LoggedTimer logtime("IBA::transpose");
if (! roi.defined())
roi = get_roi (src.spec());
roi.chend = std::min (roi.chend, src.nchannels());
ROI dst_roi (roi.ybegin, roi.yend, roi.xbegin, roi.xend,
roi.zbegin, roi.zend, roi.chbegin, roi.chend);
bool dst_initialized = dst.initialized();
if (! IBAprep (dst_roi, &dst))
return false;
if (! dst_initialized) {
ROI r = src.roi_full();
ROI dst_roi_full (r.ybegin, r.yend, r.xbegin, r.xend,
r.zbegin, r.zend, r.chbegin, r.chend);
dst.set_roi_full (dst_roi_full);
}
bool ok;
if (dst.spec().format == src.spec().format) {
OIIO_DISPATCH_TYPES (ok, "transpose", transpose_, dst.spec().format,
dst, src, roi, nthreads);
} else {
OIIO_DISPATCH_COMMON_TYPES2 (ok, "transpose", transpose_, dst.spec().format,
src.spec().format, dst, src, roi, nthreads);
}
return ok;
}
示例2: crop
bool
ImageBufAlgo::cut (ImageBuf &dst, const ImageBuf &src,
ROI roi, int nthreads)
{
bool ok = crop (dst, src, roi, nthreads);
ASSERT(ok);
if (! ok)
return false;
// Crop did the heavy lifting of copying the roi of pixels from src to
// dst, but now we need to make it look like we cut that rectangle out
// and repositioned it at the origin.
dst.specmod().x = 0;
dst.specmod().y = 0;
dst.specmod().z = 0;
dst.set_roi_full (dst.roi());
return true;
}
示例3: dst_roi
bool
ImageBufAlgo::transpose (ImageBuf &dst, const ImageBuf &src,
ROI roi, int nthreads)
{
if (! roi.defined())
roi = get_roi (src.spec());
roi.chend = std::min (roi.chend, src.nchannels());
ROI dst_roi (roi.ybegin, roi.yend, roi.xbegin, roi.xend,
roi.zbegin, roi.zend, roi.chbegin, roi.chend);
bool dst_initialized = dst.initialized();
IBAprep (dst_roi, &dst);
if (! dst_initialized) {
ROI r = src.roi_full();
ROI dst_roi_full (r.ybegin, r.yend, r.xbegin, r.xend,
r.zbegin, r.zend, r.chbegin, r.chend);
dst.set_roi_full (dst_roi_full);
}
bool ok;
OIIO_DISPATCH_TYPES2 (ok, "transpose", transpose_, dst.spec().format,
src.spec().format, dst, src, roi, nthreads);
return ok;
}