本文整理汇总了C++中CImage::GetActualRoi方法的典型用法代码示例。如果您正苦于以下问题:C++ CImage::GetActualRoi方法的具体用法?C++ CImage::GetActualRoi怎么用?C++ CImage::GetActualRoi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CImage
的用法示例。
在下文中一共展示了CImage::GetActualRoi方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareSrc
BOOL CRunSlice::PrepareSrc()
{
CImage* pSrcImage = m_pDocSrc->GetImage();
IppiRect roi = pSrcImage->GetActualRoi();
int height = roi.height & ~15;
if (height == roi.height) return TRUE;
if (height == 0) {
if (pSrcImage->Height() >= 16) {
roi.y -= 16 - roi.height;
if (roi.y < 0) roi.y = 0;
height = 16;
} else {
DEMO_APP->MessageBox(
" Height of the image is too small for " + m_Func,
MB_OK | MB_ICONEXCLAMATION);
return FALSE;
}
}
roi.height = height;
if (DEMO_APP->MessageBox(
(m_pDocSrc->GetImage()->GetRoi() ?
" ROI will be updated in " :
" ROI will be created in ") +
m_pDocSrc->GetTitle(),
MB_OKCANCEL) != IDOK) return FALSE;
m_pDocSrc->GetImage()->SetRoi(&roi);
return TRUE;
}
示例2: PrepareSrc
BOOL CRunDeconvFFT::PrepareSrc()
{
CImage* kernelImage = m_pDocSrc2->GetImage();
IppiRect kernelRoi = kernelImage->GetActualRoi();
BOOL bRoi = kernelImage->IsRoi();
if (kernelRoi.width != kernelRoi.height) {
if (kernelRoi.width > kernelRoi.height)
kernelRoi.width = kernelRoi.height;
else
kernelRoi.height = kernelRoi.width;
CString message =
(bRoi ? "ROI will be reduced to square in " :
"Square ROI will be created in ")
+ m_pDocSrc2->GetTitle() + " image";
if (DEMO_APP->MessageBox(message, MB_OKCANCEL) == IDOK)
kernelImage->SetRoi(&kernelRoi);
else
return FALSE;
}
return TRUE;
}