yuta-hi / pycuda_drr

Digitally recconstructed radiograph
MIT License
22 stars 3 forks source link

rotation angle and number of output control #3

Closed gokceay closed 4 years ago

gokceay commented 4 years ago

Hi Yuta, I implemented on a sample dataset and I got images as the attached picture. I have two additional questions:

  1. I don't need the middle image, how can I stop producing the middle image?
  2. My rotations are not what I wanted, How can I control the image rotations? For example I want first upside down, the third image as vertical position.

Thanks in advance Best drr_25

yuta-hi commented 4 years ago

You can control the rotation by changing the extrinsic parameters. In the example, line 82 defines the external parameters, in which one posture is represented by 6 degrees of freedom, translation and rotation angles (Euler angles).

If you want to remove the image in the middle, Please change as follows.

Before:

extrinsic_R = utils.convertTransRotTo4x4([[0,0,0,90,0,0],
                                            [0,0,0,0,90,0],
                                            [0,0,0,0,0,90]])

After:

extrinsic_R = utils.convertTransRotTo4x4([[0,0,0,90,0,0],
                                            [0,0,0,0,0,90]])
gokceay commented 4 years ago

Thanks a lot for your detailed response :)

Have a nice day