# Angle measurement range

Hello, the calculated values for both angles here are 0-90 degrees. Is there a way to change the range of values to 0-180 degrees in 3d?

Not entirely sure what you mean. You can have angles >90 degrees…

I split the topic because I interpreted the same way it as you @muratmaga but I’ve read it again and realized that maybe @learn_shape refers to the C-arm angles?

Those angles are defined in DICOM. The primary positioner angle is indeed allowed to be in the +/-180deg range, while the secondary angle is always between +/-90deg. You can get the +/-180deg range if you switch to use atan2 in the script. The end result will be something like this:

``````    nx = viewNormal[0]  # R
ny = viewNormal[1]  # A
nz = viewNormal[2]  # S
import math
if abs(ny) > 1e-6:
primaryAngleDeg = math.atan2(nx, -ny) * 180.0 / math.pi
elif nx >= 0:
primaryAngleDeg = 90.0
else:
primaryAngleDeg = -90.0
secondaryAngleDeg = math.asin(nz) * 180.0 / math.pi
return [primaryAngleDeg, secondaryAngleDeg]
``````

In the image above the patient coordinate system is left-handed. In DICOM, patient coordinate system is right-handed (LPS). Therefore, it is quite likely thay you have fed wrong input to the code snippet.

sorry,i am a student. your code can match the body position(A P L R H F)？for example ，when body position A, lao/rao is 0 degree, and cra/cau is 0 degree

DICOM names for patient coordinate system axis directions are anterior, posterior, left, right, superior, inferior.

Patient position is generally assumed to be head-first-supine on the C-arm table.
Primary and secondary positioner angles refer to the viewing direction (orientation of the C-arm).

but in fact the secondaryAngleDeg is allowed to be +/-180. in C arm. I wanted to modify your code to achieve an angle above 90 degrees, but it failed.

Secondary positioner angle field cannot go beyond +/-90 degrees. See the DICOM standard.