Getting pixel coordinate

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
pthaya
Posts: 2
Joined: Wed, 2009-01-28, 17:56

Getting pixel coordinate

#1 Post by pthaya »

Hi,

I'm new to using dcmtk, and have thus far simply used it to take a dicom image and display it on an MFC's "Picture Control" (Visual Studio 2005). I did this using Aimevous' code, as shown here: viewtopic.php?t=1650&highlight=mfc.

I was now wondering if there was a way to allow the user to click a point on this image, and then have the computer calculate the MR coordinates of this point. (This would be similar to using the ginput function in MATLAB). I'm guessing that to do this, the program must be able to realize which pixel was clicked on. If anyone could help me out here, it would be much appreciated.

Thank you.

pthaya
Posts: 2
Joined: Wed, 2009-01-28, 17:56

#2 Post by pthaya »

Ok I think I have an idea of what to do about my aforementioned task now.

What I would like to know though is how to prevent the image from disappearing when I do things like maximize the MFC window or minimize and reopen it. This happens with both Aimevous' and Jorg's code (see link).

Thanks again.

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

#3 Post by Jörg Riesmeier »

This questions does not seem to be related to the DCMTK but I guess that you have to call your paint method each time the client area of the windows has to be redrawn (i.e. use the appropriate window message/event for this purpose).

asdf112255
Posts: 2
Joined: Tue, 2012-05-15, 12:19

Re:

#4 Post by asdf112255 »

pthaya wrote:Ok I think I have an idea of what to do about my aforementioned task now.

What I would like to know though is how to prevent the image from disappearing when I do things like maximize the MFC window or minimize and reopen it. This happens with both Aimevous' and Jorg's code (see link).

Thanks again.
Hi, How did you solve?
could you show some sample code , i have same issue like you.
thanks.

Post Reply

Who is online

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