calculate the center and window

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
yuanshl
Posts: 6
Joined: Mon, 2008-05-19, 10:12

calculate the center and window

#1 Post by yuanshl »

I don't know how much should i set the center and window just like other dicom view software,i' m new to mfc,please help me:it works bad.....

Code: Select all

if (nFlags == MK_RBUTTON ) 
	{ 
	CPoint pointShift = point - m_pointRightStart; // this is the shift value 

	if(pointShift.x)
	{
		center += 100;	//how much should i set?
		wind += 100;            //and how should i do?
		
	}
	if(pointShift.y)
	{
		center -= 100;	
		wind -= 100;
		
	}
	m_pointRightStart = point; 

	OnPaint();   //updateview
	} 
thank you!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

Do you want to support interactive windowing (with the mouse) in your application?

yuanshl
Posts: 6
Joined: Mon, 2008-05-19, 10:12

#3 Post by yuanshl »

thank you, i have fixed that problem :lol:

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 1 guest