1 / 9

Region of Interest Part II

Region of Interest Part II. Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University. Outline. Get DC Drawing Mode - XOR Complete ROI. Get DC. Provided by the framework void C***View::OnDraw(CDC* pDC)

demoss
Download Presentation

Region of Interest Part II

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 InterestPart II Ku-Yaw Chang canseco@mail.dyu.edu.tw Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

  2. Outline • Get DC • Drawing Mode - XOR • Complete ROI Medical Imaging System

  3. Get DC • Provided by the framework • void C***View::OnDraw(CDC* pDC) • To obtain DC elsewhere CDC * pDC = GetDC(); : // use pDC … : ReleaseDC(pDC); Medical Imaging System

  4. Drawing Mode - XOR ( A  B ) B = A Medical Imaging System

  5. Drawing Mode - XOR • Specifies the new drawing mode. • pDC->SetROP2(R2_XORPEN); Medical Imaging System

  6. Complete ROI • Add a state variable m_bLBtnDown into C***View • To keep track of the status of the mouse’s left button • Initialization : set to be ‘false’ • OnLButtonDown : set to be ‘true’ • OnLButtonUp : set to be ‘false’ Medical Imaging System

  7. Complete ROI • Use two variables to record the first and second points (C***View) • m_ptFirst and m_ptSecond • OnLButtonDown • m_ptFirst = point; • m_ptSecond = point; • OnLButtonUp • m_ptSecond = point; Medical Imaging System

  8. Complete ROI • OnMouseMove • Check m_bLBtnDown • Erase previous (old) ROI • m_ptFirst and m_ptSecond • m_ptSecond = point; • Draw new ROI • m_ptFirst and m_ptSecond Medical Imaging System

  9. Other Considerations • Scrollbar • CPoint GetScrollPosition() • Display ratio • m_nDisplayRatio Medical Imaging System

More Related