Region of Interest Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.

Slides:



Advertisements
Similar presentations
Vectors, lists and queues
Advertisements

Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
Chapter 9 Color, Sound and Graphics
Region of Interest Part II Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Chapter 1_2 Becoming Skilled at Information Technology.
Working with Vector Graphics – Lesson 21 Working with Vector Graphics Lesson 2.
Simple Gui in C++. Project Selecting So Far Registering the window class Creating the window.
More on the STL vector list stack queue priority_queue.
Simple Gui in C++. Project Selecting So Far Registering the window class Creating the window.
CMSC 202 Lesson 24 Iterators and STL Containers. Warmup Write the class definition for the templated Bag class – A bag has: Random insertion Random removal.
Week 3 C For Win Lecture :.  Mouse Message  Keyboard Message.
Unit 12 Registers and Counters Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Unit 12 Registers and Counters Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Graphics and Multimedia. Introduction The language contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other.
2004/03/22 Color Models 1 Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Using Graphics Libraries Lecture 3 Mon, Sep 1, 2003.
Lecture 11 Standard Template Library Stacks, Queue, and Deque Lists Iterators Sets Maps.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface A Brief Introduction to GDI+ S.R.G. Fraser, Pro Visual C++/CLI.
Image Buffer Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
1 Chapter 15 Drawing in a Window. 2 The Window Client Area  A coordinate system that is local to the window.  It always uses the upper-left corner of.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 26 – CheckWriter Application Introducing Graphics.
EzWindows API A Graphical Application Programmer Interface JPC and JWD © 2002 McGraw-Hill, Inc. Modified by S. Sudarshan.
Graphics and Multimedia Part #2
PROCESSING & JAVA An Introduction to Computing. Objectives Be able to state and apply phases of development Be able to state and describe the goals of.
The Coordinate Plane The coordinate plane is formed when two number lines (called axis) intersect at right angles. The horizontal axis is called the x-axis.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved CheckWriter Application Introducing Graphics and Printing.
Chapter2: Drawing a Window. Drawing with the GDI.
CSE3AGT Paul Taylor Stupid Conventions! l = Long p = Pointer h = handle g = global wnd = Windows WM = Windows Message d3d = Direct3D hr = HRESULT.
Introduction to Java Simple Graphics. Objects and Methods Recall that a method is an action which can be performed by an object. –The action takes place.
Chapter 3 The mouse and the Keyboard. Getting input from the Mouse.
Unit 13 Analysis of Clocked Sequential Circuits Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Templates Mark Hennessy Dept Computer Scicene NUI Maynooth C++ Workshop 18 th – 22 nd September 2006.
Graphic Basics in C ATS 315. The Graphics Window Will look something like this.
(C) 2010 Pearson Education, Inc. All rights reserved.  Class Graphics (from package java.awt) provides various methods for drawing text and shapes onto.
Object Oriented Programming Dr. Ennis-Cole CECS 5100.
Microsoft Foundation Class (MFC) Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Bitmap (Chapter 15).
Microsoft Word Tutorial By Diana Rengifo Sean Choi Robert Olson.
Lecture 11 Standard Template Library Lists Iterators Sets Maps.
Lecture 7 : Intro. to STL (Standard Template Library)
ECE 250 Algorithms and Data Structures Douglas Wilhelm Harder, M.Math. LEL Department of Electrical and Computer Engineering University of Waterloo Waterloo,
Presented By: Weidong WU, Ph.D. Date: Part I Creating a drawing format for the paper size A (11 x 8.5) 1. Start Pro/E wildfire. 2. File  set.
Chapter2: Drawing a Window
2004/03/23 Image Analysis 1 Image Processing & Analysis Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Microsoft® Small Basic Exploring Shapes Estimated time to complete this lesson: 1 hour.
Menu Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Programming with Visual Studio MFC and OpenGL. Outline Creating a project Adding OpenGL initialization code and libraries Creating a mouse event Drawing.
Chapter 6 Structures Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
GDI +. Graphics class's methods System.Drawing Graphics Objects.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Chapter2: Drawing a Window. Drawing with the GDI.
Drawing in Windows. To help with drawing on the Windows operating system, Microsoft created the Graphical Device Interface, abbreviated as GDI. – It is.
CPCS 391 Computer Graphics Lab One. Computer Graphics Using Java What is Computer Graphics: Computer graphics are graphics created using computers and,
Standard Template Library
Chapter 16 (cont.) Drawing in a Window Using the Mouse
Programming windows with MFC Chapter 2 - Drawing in a Window
Chapter 17 Creating the Document and Improving the View
Exam1 Review CSE113 B.Ramamurthy 11/29/2018 B.Ramamurthy.
Graphic Device Interface
Keyboard and mouse in Windows API
Level 1 STL – Linear DS fb.com/acmicpcfcicu. Static Arrays Creating 1D, 2D, ND Static Arrays. Accessing Time. Traversing a static array with N dimensions.
Iterators and STL Containers
Exam1 Review CSE113 B.Ramamurthy 4/17/2019 B.Ramamurthy.
C++ STL Stack, Queue, and Deque
STL (Standard Template Library)
C++ Programming: chapter 10 – STL
Chapter 14 Drawing in a Window
Chapter 17 Creating the Document and Improving the View
Chapter 16 Drawing in a Window
Presentation transcript:

Region of Interest Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

22004/04/21Medical Imaging System ROI ROI Region of Interest Region of InterestRectangleEllipsePolygonVOI Volume of Interest Volume of Interest

32004/04/21Medical Imaging System Mouse Events WM_LBUTTONDOWN OnLButtonDown(UINT nFlags, CPoint point) OnLButtonDown(UINT nFlags, CPoint point)WM_LBUTTONUP OnLButtonUp(UINT nFlags, CPoint point) OnLButtonUp(UINT nFlags, CPoint point)WM_LBUTTONDBLCLK OnLButtonDblClk(UINT nFlags, CPoint point) OnLButtonDblClk(UINT nFlags, CPoint point)

42004/04/21Medical Imaging System Parameters nFlags Indicates whether various virtual keys are down. This parameter can be any combination of the following values: 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. Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper- left corner of the window. These coordinates are always relative to the upper- left corner of the window.

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

62004/04/21Medical Imaging System ROI Recorded as a rectangle CRect CRect OnLButtonDown OnLButtonDown CRect::left, CRect::top CRect::left, CRect::top OnLButtonUp OnLButtonUp CRect::right, CRect::bottom CRect::right, CRect::bottom

72004/04/21Medical Imaging System 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)

82004/04/21Medical Imaging System Draw an ROI CPen while while solid solidCBrush

92004/04/21Medical Imaging System CPen CPen( int nPenStyle, int nWidth, COLORREF crColor ); nPenStyle Specifies the pen style. 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. Specifies the width of the pen.crColor Contains an RGB color for the pen. Contains an RGB color for the pen.

102004/04/21Medical Imaging System SelectObject Pen APen B Pen A Pen B (1) (2) (3)

112004/04/21Medical Imaging System 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);

122004/04/21Medical Imaging System ROIs Use list to store more than one CRect Standard Template Library (STL) List List Stack Stack Queue Queue Vector Vector …

132004/04/21Medical Imaging System list Include #include #include using namespace std; using namespace std;Declaration list listROI; list listROI;Add push_back, push_front push_back, push_frontRemove pop_back, pop_front pop_back, pop_front

142004/04/21Medical Imaging System list Iterate list ::iterator i; list ::iterator i; for (i = listPoint.begin(); i != listPoint.end(); ++i) for (i = listPoint.begin(); i != listPoint.end(); ++i)Miscel size() size() clear() clear() front() front() back() back()