How to adapt CL geometry into DiffDRR as like 30 degree tilt Oblique CT?
@eigenvivek Could you guide me how to adapt OCT case geometry with your solution ? There is no tilt angle in DiffDRR API input params. I hope to test your diffdrr into my computer laminography geometry case with some tilt degree(oct).
Best regards.
Hi @jeffhwang02 I'm not familiar with this geometry and couldn't find a good illustration online. Do you have a nice picture for reference?
Below is lamino geometry.
https://www.sciencedirect.com/science/article/pii/S1369702125000689
@eigenvivek I made below function for 45 degree tilting of Y-axis, and make the transform matrix. But I do not know how to map the DSO param which is the distance from camera to object. I hope you to help me complete the codes.
/////////////////////////////////////////////////////// def axis_angle_to_pose(DSO, angle):
# X-axis rotation
phi1 = -np.pi / 2
R1 = np.array(
[
[1.0, 0.0, 0.0],
[0.0, np.cos(phi1), -np.sin(phi1)],
[0.0, np.sin(phi1), np.cos(phi1)],
]
)
# Y-axis rotation
phi2 =np.pi / 4
R2 = np.array(
[
[np.cos(phi2), 0.0, np.sin(phi2)],
[0.0, 1.0, 0.0],
[-np.sin(phi2), 0.0, np.cos(phi2)],
]
)
# Z-axis rotation
phi3 = np.pi / 2
R3 = np.array(
[
[np.cos(phi3), -np.sin(phi3), 0.0],
[np.sin(phi3), np.cos(phi3), 0.0],
[0.0, 0.0, 1.0],
]
)
R4 = np.array(
[
[np.cos(angle), -np.sin(angle), 0.0],
[np.sin(angle), np.cos(angle), 0.0],
[0.0, 0.0, 1.0],
]
)
rot = np.dot(np.dot(np.dot(R4, R3), R2),R1)
trans = np.array([DSO * np.cos(angle), DSO * np.sin(angle), 0])
transform = np.eye(4)
transform[:3, :3] = rot
transform[:3, 3] = trans
return transform
/////////////////////////////////////////////////////////////////////////////////