Date: Sun, 23 Jan. 2022 21:54:39 +00:00
Mime-Version: 1.0 (Produced by Tiki)
Content-Type: application/x-tikiwiki;
pagename=DICOM%20Data%20Coding%20Image%20Related%20Information;
flags="";
author=david.legrady;
version=1;
lastmodified=1329343555;
author_id=188.142.216.4;
summary="";
hits=5381;
description="";
charset=utf-8
Content-Transfer-Encoding: binary
First of all the data describing the grey scale or color related image information, called PixelData in DICOM. According to the DICOM standard the PixelData is enclosed by the tags (7fe0,0010) and (7fe0,0010). In the case of the image we have been dealing with, one can find the pixel information in hexadecimal format between the Pixel Data tags:
:: ~np~03c5\03be\03af\03e0\03e4\03e6\03f0\03f2\03f4\03f8\03f7\03fa\03fb..~/np~.::
The numbers describing the grey scale and/or the color status of the pixels are separated by back slash characters. It is enough to know that the hexadecimal numbers above uniquely determine the corresponding pixels. However, even if could decode all this information given above, how could we arrange the pixels on the screen without further knowledge? Clearly we need the number of rows and the number of columns of the image. These parameters are given in the official Rows and Columns fields. The corresponding segment from our DICOM file is:
^~np~(0028,0010) 128 2, 1 Rows
(0028,0011) 128 2, 1 Columns~/np~^
So this is an image of 128 columns and 128 rows. Now we can interpret the long sequence of numbers tagged by (7fe0,0010): Take the first 128 numbers and render them on the screen as the first row of the image. Then take the second 128 numbers and render them, this is going to be the second row on the screen, and so on. Note that we have to paint the image on the screen from the top to the bottom.
By this method we can render all the images contained in the study. However we have not yet learned anything about their spatial location.
In the following figure we can see a coordinate system and an image located in the space. If we take the upper left corner of the image the three vectors can uniquely determine the spatial location and orientation of it.
{img fileId="2291" thumb="mousesticky" height="200px" width="200px" desc="Képi koordinátarendszer"}
The first vector pointing from the origin to the upper left corner of the image is given in the DICOM field called ImagePositionPatient:
^ ~np~(0020,0032)[-255.5\-146\74.6] 16, 3 ImagePositionPatient~/np~^
Now we understand all this! (0020,0032) is certainly the DICOM tag identifying the data called in DICOM the ImagePositionPatient. This is a vector which is given in decimal format by its (back slash separated) coordinates: -255.5, -146, 74.6. One can notice that the illustration is wrong because our actual vector points backward not like the one on the figure.
The other two vectors are given in the ImageOrientationPatient field:
^~np~(0020,0037)[1\7.0448747e-016\0\0\0\-1] 26, 6 ImageOrientationPatient~/np~^
The ImageOrientationPatent field contains 2 vectors having 3 decimal coordinates each. The first vector with coordinates
1, 0, 0
(Note that e-16 is a very small number so for the sake of simplicity we replaced it by zero.) represents the orientation of the first row of the image. This vector points in the direction of the X axis. The second vector
0, 0, -1
Describes the orientation of the first column. The following figure represents the corresponding image the right way in space:
{img fileId="2292" thumb="mousesticky" height="200px" width="200px" desc="Orientációs koordinátarendszer"}
If we render the image then we will se the following picture on the screen:
{img fileId="2293" thumb="mousesticky" height="200px" width="200px" desc="A felvett kép"}
Problem: Why did we have to mirror the image?