avm-debatr / debisim2

A Python-based 3D CT Simulation library for single and dual energy X-ray image generation. This library is designed to aid in the development and testing of single / dual energy CT based object detectors for airport baggage screening and other CT imaging applications.
https://engineering.purdue.edu/RVL/debisim/html/mainpage.html
GNU General Public License v3.0
9 stars 4 forks source link

How to generate image with diffrent pixel size #3

Open tavan95 opened 9 months ago

tavan95 commented 9 months ago

I like to change a size of a picture. I changed a the g[gantry _diameter ] and recon_params[image_scale] In the "template _defaultr...." and build a new picture in the include/bages/bag_1_template.npz

the algorithm run but can't build any shape in the picture. What am I doing for change a number of image pixel?

Ankitvm commented 9 months ago

I'm assuming you want to recontruct an image with dimensions larger than (512, 512, 350). The dimensions of the reconstructed image depend on the gantry diameter, the number of row/column detectors and the spacing between the detectors. For example, in https://github.com/avm-debatr/debisim2/blob/main/lib/forward_model/template_default_two_view_parallelbeam.py, the gantry diameter is 512 mm and the number of row detectors is 512. But the spacing between the detectors is 0.75 so that the width of the image is 0.75x512=384. Thats means the generated volume is at the 384x384 mm space at the center of the gantry. Thus, if you increase the gantry diameter, you will also need to adjust det_spacing and det_count.

tavan95 commented 9 months ago

No, I have no intention of altering sonogram's size. Instead I desire to modify a dimention of the bag s (512×512×350)image specifically the gt_lac_1_image and gt_lac_2_image image. I like take (64×64×350).

Ankitvm commented 8 months ago

In that case, you need to change the value for recon_params['image_dims']. That will give you the right dimensions for the output image.