Calculate Distance

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

Calculate Distance

#1 Post by ziashahid »

hi all!

can anyone tell me, how to clculate distance between two points on DICOM image.


it is very urgent


regrads

zia

markw
Posts: 84
Joined: Mon, 2005-01-17, 01:08

#2 Post by markw »

I am just guessing, but since you know the pixel spacing in the x/y direction for the image (taken from the DICOM tags), can't you just do a basic distance between two points calculation using that information?

sqrt((x2-x1)^2 + (y2-y1)^2)

Mark

ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

#3 Post by ziashahid »

dear Mark!

Many many thanks for ur response. I am able to calculatethe distance using x/y co-ordinates , but the problem is that how could i found the appropriate tags defining x/y coordinates of two points (these points have been chosen by me). there is one reason also, pixel spacing tags are different for different images (e.g. CR,CT,MR) , so how could i able to find appropriate tag for any image. please help in sorting the problem.

I am using DCMTK 3.5.3 (VC++ 6.0). can u plz give me any idea to do this.

Thanks again

Regards
Zia

markw
Posts: 84
Joined: Mon, 2005-01-17, 01:08

#4 Post by markw »

Sorry ziashahid, I wish I could tell you which tags to read based on the modality, but I don't know outside of MR. I'm sure the DICOM standard states which tags to expect based on the modality. You may also want to try the google groups page for DICOM:

http://groups.google.com/group/comp.protocols.dicom

I think that forum is more for DICOM specific questions,

goodluck

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#5 Post by Marco Eichelberg »

Just to close this topic, a fairly comprehensive answer to the question raised in this thread was provided in the usenet discussion group. The related usenet thread is available here.

Post Reply

Who is online

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