int CImageDoc::lookregion(int cx,int cy,int option)
{
	int mh=m_DIB.m_nHeight,mw=m_DIB.m_nWidth;
	if(cx<0||cy<0||cx>(mw-1)||cy>(mh-1))
	{
		AfxMessageBox("Click on the map!");
		return -1;
	}
	curRegion=m_HC.tag[cy*mw+cx];
	if(curRegion<0)
	{
		AfxMessageBox("tag array of region labels is modified or illegal");
		return -1;
	}
	switch (option)
	{
	case 0:
	default:
		{int area=m_HC.GetSize(curRegion);
		CRect rect=m_HC.GetBoundBox(curRegion);
		m_DIB.lookregion(curRegion,m_HC.tag,rect,area);
		break;}
	case 1:
		m_HC.RegMoment(curRegion);
		break;
	}
	return curRegion;
}

相关文章:

  • 2021-10-02
  • 2022-02-13
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2021-08-13
  • 2021-09-22
  • 2021-08-23
  • 2022-12-23
  • 2021-09-26
  • 2021-09-06
  • 2022-03-08
相关资源
相似解决方案