Hi ,
How can I calculate window Center and window width
during MouseMove on an image. (needed to apply brightness and
contrast)
Is there any formula or any way to do so . plz help me
......cool
WindowCenter \ windowWidth
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: WindowCenter \ windowWidth
Hi,
perhaps section C.11.2.1.2 in part 3 of the standard might give the right answers;-)
Regards,
Michael
perhaps section C.11.2.1.2 in part 3 of the standard might give the right answers;-)
Regards,
Michael
-
- Posts: 53
- Joined: Thu, 2005-04-14, 15:07
- Location: St. Petersburg, Russia
Re: WindowCenter \ windowWidth
[quote="cool_head"]Hi ,
How can I calculate [b]window Center [/b] and [b]window width [/b]
during MouseMove on an image.
[/quote]
void CElMiniViewerView::OnMouseMove(UINT nFlags, CPoint point)
{
.....
if (m_bRightMouseDown)
// if (nFlags & MK_RBUTTON) - is another way but I need this one
{
CPoint pointShift = point - m_pointRightStart; // this is the shift value
if (pointShift.x)
// change the window center or width calling finally
/// DicomImage::setWindow
if (pointShift.y)
// change the window center or width calling finally
/// DicomImage::setWindow
m_pointRightStart = point;
}
}
I had implemented it in my Miniviewer according Dr. Marco Eichelberg's piece of advice.
Alexander.
How can I calculate [b]window Center [/b] and [b]window width [/b]
during MouseMove on an image.
[/quote]
void CElMiniViewerView::OnMouseMove(UINT nFlags, CPoint point)
{
.....
if (m_bRightMouseDown)
// if (nFlags & MK_RBUTTON) - is another way but I need this one
{
CPoint pointShift = point - m_pointRightStart; // this is the shift value
if (pointShift.x)
// change the window center or width calling finally
/// DicomImage::setWindow
if (pointShift.y)
// change the window center or width calling finally
/// DicomImage::setWindow
m_pointRightStart = point;
}
}
I had implemented it in my Miniviewer according Dr. Marco Eichelberg's piece of advice.
Alexander.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest