# [Programmers] Image Orientation (Patient) and precision - DICOM

This is a discussion on [Programmers] Image Orientation (Patient) and precision - DICOM ; 'lo, Has anyone deal with the following (*) Image Orientation (Patient) values. Is this safe to simply discard the last digit ? In pseudo code this would be: int precision = 1000000; float round_value = floor((read_value*precision)+0.5) / precision; I believe ...

# Thread: [Programmers] Image Orientation (Patient) and precision

1. ## [Programmers] Image Orientation (Patient) and precision

'lo,

Has anyone deal with the following (*) Image Orientation (Patient)
values. Is this safe to simply discard the last digit ? In pseudo code
this would be:

int precision = 1000000;
float round_value = floor((read_value*precision)+0.5) / precision;

I believe so since sin(1) ~= 0.017, I don't believe radiologists would
need any more precision that that, right ?

Thanks
Mathieu

(*)
\$ dcmdump * | grep Orientation | sort | uniq
(0020,0037) DS [0.00973553\0.999953\0\0.0158696\-0.000152587\-0.999874]
# 54, 6 ImageOrientationPatient
(0020,0037) DS [0.00973554\0.999953\0\0.0158696\-0.000152587\-0.999874]
# 54, 6 ImageOrientationPatient
(0020,0037) DS [0.00973555\0.999953\0\0.0158695\-0.000152587\-0.999874]
# 54, 6 ImageOrientationPatient
(0020,0037) DS [0.00973555\0.999953\0\0.0158696\-0.000152558\-0.999874]
# 54, 6 ImageOrientationPatient
(0020,0037) DS [0.00973555\0.999953\0\0.0158696\-0.000152587\-0.999874]
# 54, 6 ImageOrientationPatient

2. ## Re: Image Orientation (Patient) and precision

Mathieu Malaterre wrote:
> 'lo,
>
> Has anyone deal with the following (*) Image Orientation (Patient)
> values. Is this safe to simply discard the last digit ? In pseudo code
> this would be:
>
> int precision = 1000000;
> float round_value = floor((read_value*precision)+0.5) / precision;
>
> I believe so since sin(1) ~= 0.017, I don't believe radiologists would
> need any more precision that that, right ?
>
> Thanks
> Mathieu
>
> (*)
> \$ dcmdump * | grep Orientation | sort | uniq
> (0020,0037) DS [0.00973553\0.999953\0\0.0158696\-0.000152587\-0.999874]
> # 54, 6 ImageOrientationPatient
> (0020,0037) DS [0.00973554\0.999953\0\0.0158696\-0.000152587\-0.999874]
> # 54, 6 ImageOrientationPatient
> (0020,0037) DS [0.00973555\0.999953\0\0.0158695\-0.000152587\-0.999874]
> # 54, 6 ImageOrientationPatient
> (0020,0037) DS [0.00973555\0.999953\0\0.0158696\-0.000152558\-0.999874]
> # 54, 6 ImageOrientationPatient
> (0020,0037) DS [0.00973555\0.999953\0\0.0158696\-0.000152587\-0.999874]
> # 54, 6 ImageOrientationPatient

Ok I have another case where I need to reduce the precision (*). So I
changed it to:

int precision = 100000;
float round_value = floor((read_value*precision)+0.5) / precision;

-M
(*)
(0020,0037) DS
[0.995225\-0.0770886\0.0598764\0.067843\0.987371\0.143163] # 56, 6
ImageOrientationPatient
(0020,0037) DS
[0.995225\-0.0770886\0.0598765\0.067843\0.987371\0.143163] # 56, 6
ImageOrientationPatient
(0020,0037) DS
[0.995225\-0.0770886\0.0598765\0.0678431\0.987371\0.143163] # 58, 6
ImageOrientationPatient
(0020,0037) DS
[0.995225\-0.0770887\0.0598764\0.067843\0.987371\0.143163] # 56, 6
ImageOrientationPatient
(0020,0037) DS
[0.995225\-0.0770887\0.0598764\0.0678431\0.987371\0.143163] # 58, 6
ImageOrientationPatient
(0020,0037) DS
[0.995225\-0.0770887\0.0598765\0.067843\0.987371\0.143163] # 56, 6
ImageOrientationPatient
(0020,0037) DS
[0.995225\-0.0770887\0.0598765\0.0678431\0.987371\0.143163] # 58, 6
ImageOrientationPatient