1 / 14

Region of Interest

Region of Interest. Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University. ROI. ROI Region of Interest Rectangle Ellipse Polygon VOI Volume of Interest. Mouse Events. WM_LBUTTONDOWN

sahara
Download Presentation

Region of Interest

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Region of Interest Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

  2. ROI • ROI • Region of Interest • Rectangle • Ellipse • Polygon • VOI • Volume of Interest Medical Imaging System

  3. Mouse Events • WM_LBUTTONDOWN • OnLButtonDown(UINT nFlags, CPoint point) • WM_LBUTTONUP • OnLButtonUp(UINT nFlags, CPoint point) • WM_LBUTTONDBLCLK • OnLButtonDblClk(UINT nFlags, CPoint point) Medical Imaging System

  4. Parameters • nFlags • Indicates whether various virtual keys are down. This parameter can be any combination of the following values: • MK_CONTROL Set if the CTRL key is down. • MK_LBUTTON Set if the left mouse button is down. • MK_MBUTTON Set if the middle mouse button is down. • MK_RBUTTON Set if the right mouse button is down. • MK_SHIFT Set if the SHIFT key is down. • point • Specifies the x- and y-coordinate of the cursor. • These coordinates are always relative to the upper-left corner of the window. Medical Imaging System

  5. CRect • Basic data members • left • Specifies the x-coordinate of the upper-left corner of a rectangle. • top • Specifies the y-coordinate of the upper-left corner of a rectangle. • right • Specifies the x-coordinate of the lower-right corner of a rectangle. • bottom • Specifies the y-coordinate of the lower-right corner of a rectangle. Medical Imaging System

  6. ROI • Recorded as a rectangle • CRect • OnLButtonDown • CRect::left, CRect::top • OnLButtonUp • CRect::right, CRect::bottom Medical Imaging System

  7. CRect::NormalizeRect • Example CRect rect1(110, 100, 250, 310); CRect rect2(250, 310, 110, 100); rect1.NormalizeRect(); rect2.NormalizeRect(); // rect1 should be unchanged // rect2 becomes (110, 100, 250, 310) Medical Imaging System

  8. Draw an ROI • CPen • while • solid • CBrush Medical Imaging System

  9. CPen CPen(intnPenStyle,intnWidth,COLORREFcrColor); • nPenStyle • Specifies the pen style. • PS_SOLID   Creates a solid pen. • PS_DASH   Creates a dashed pen. • PS_DOT   Creates a dotted pen. • PS_NULL   Creates a null pen. • nWidth • Specifies the width of the pen. • crColor • Contains an RGB color for the pen. Medical Imaging System

  10. SelectObject (1) Pen A Pen B (2) Pen A Pen B (3) Pen A Pen B Medical Imaging System

  11. Draw an ROI CRect rc(100,100, 200, 200); COLORREF crPen; crPen = RGB(255, 0, 0); CPen penRed(PS_SOLID, 1, crPen); CPen * pOldPen; pOldPen = pDC->SelectObject(&penRed); pDC->SelectStockObject(HOLLOW_BRUSH); pDC->Rectangle(&rc); pDC->SelectObject(pOldPen); Medical Imaging System

  12. ROIs • Use list to store more than one CRect • Standard Template Library (STL) • List • Stack • Queue • Vector • … Medical Imaging System

  13. list • Include • #include <list> • using namespace std; • Declaration • list <CRect> listROI; • Add • push_back, push_front • Remove • pop_back, pop_front Medical Imaging System

  14. list • Iterate • list <CRect>::iterator i; • for (i = listPoint.begin(); i != listPoint.end(); ++i) • Miscel • size() • clear() • front() • back() Medical Imaging System

More Related