Reading the value of DICOM Tag "Image Position"

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
helioars
Posts: 14
Joined: Mon, 2010-06-14, 11:46

Reading the value of DICOM Tag "Image Position"

#1 Post by helioars » Tue, 2012-05-01, 10:27

Hello,

I would like to read the dicom tag value of "Image Position" [ 0028, 0032 ].
How to read the image position x, y and z coordinate values.

[code]
pDataset->findAndGetOFString(DCM_ImagePositionPatient,ofStringDicomField).good(){
lpszDicomField = ofStringDicomField.data();
nDicomFieldLength = strlen(lpszDicomField);
// copy the data in my structure
}
[/code]

If actual value of image position is [-195.000000\-195.000000\-1016.000000]
I can retrieve only the x-coordinate value i.e. -195.00000

how do i get the other y and z coordinate values.

Thanks..

J. Riesmeier
DCMTK Developer
Posts: 2299
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#2 Post by J. Riesmeier » Tue, 2012-05-01, 16:53

There is a "pos" parameter for the findAndGetXXX() methods, which has a default value of "0". Reading the documentation would certainly help :-)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest