Time really flies. We would be ending our internship in just 9 more weeks, including this week. Gonna miss the people and this place a lot.
Read the PDF document which I chanced upon yesterday. The tag (0020, 0032) Image Position (Patient) specifies the x, y, and z coordinates of the upper left hand corner of the image. This is also the center of the first voxel (a 3-dimensional equivalent of a pixel) that is being transmitted. This position is relative to the patient-based coordinate system:
- The x-axis is increasing to the left hand side of the patient.
- The y-axis is increasing to the posterior side of the patient.
- The z-axis is increasing toward the head of the patient.
This link further illustrates the patient-based coordinate system. It has several pictures there too:
http://www.itk.org/Wiki/Proposals:Orientation
In each image frame, the Image Position (Patient) (0020,0032) specifies the origin of the image with respect to the patient-based coordinate system.
Managed to rename a set of 76 png images with the respective image positions, but something seems to be wrong. Even with the image position, I would need to know which direction the image should be facing, and at which orientation. This definitely has got something to do with the Image Orientation (Patient) (0020,0037) tag.
Read a number of sources on the web, and it is mentioned that Image Orientation tag specifies the direction cosines of the first row and the first column with respect to the patient. Did some searching on the web, but I still do not understand what that sentence is supposed to mean.
Towards the end of the day, I managed to find a link. From there, I got to understand the Image Orientation tag. This is the tag that identifies the direction in which the image should be facing as well as it's orientation. Here's the link:
http://www.medicalconnections.co.uk/wiki/Image_Orientation_Attributes
Now, I only have the png images named with the x, y and z coordinates. In addition to that, I would have to find a way to put in the direction cosines as well, if not, we would not be able to identify where the image should face and at which orientation. Got the renaming done at the end of the day. Now, the file names look like this:
IM-0001-0001_x-74.798828125y-268.798828125z-82.5r100c010.png
In the case above,
x = -74.798828125
y = -268.798828125
z = -82.5
row vector = (1, 0, 0)
column vector = (0, 1, 0)