jerichooconnell / fastcat

GNU General Public License v3.0
30 stars 13 forks source link

Multiple Projection image #23

Open AhalScript opened 7 months ago

AhalScript commented 7 months ago

HI, How can i get the multiple projection images after the simulation . The Demo file only showing the reconstructed image. I need the output of the function return_projs().

jerichooconnell commented 7 months ago

The projections are contained as the phantom parameter 'projs'. e.g. projections = phantom.projs

AhalScript commented 7 months ago

Hi, How can we calculate Dose, also the SNR , CNR and MTF value of the reconstructed image.

jerichooconnell commented 7 months ago

The analyse_515(recon_slice) should give SNR, and CNR values. The dose can be specified in mGy when you run a simulation as input into return_projs() but this is not always accurate, I am working on making a better dose calculation method. MTF is a property of the detector and can be accessed through detector.get_mtf() or something similar.

AhalScript commented 7 months ago

While running the analyse_515() function its getting some error.

824 shorts = ["Lung", "Compact Bone", "Cortical Bone", "Adipose"] 826 contrasts_i_want = np.array( 827 [(contrast[ii] / ref_mean) * 100 for ii in range(len(contrast))] 828 )[inds_i_want] --> 831 place[0].errorbar(
832 np.arange(len(inds_i_want)), 833 contrasts_i_want, 834 capsize=ww + 1.5, 835 yerr=np.array(ci_v)[inds_i_want], 836 fmt="x", 837 label=run_name, 838 ) 839 place[0].set_xticks(range(len(inds_i_want))) 840 place[0].set_xticklabels(shorts, fontsize=12, rotation=75)

TypeError: 'NoneType' object is not subscriptable .

The function is expecting a list for place . but in the argument of the function analyse_515() you make it as None.

AhalScript commented 7 months ago

place=[plt.subplot(2, 1, 1), plt.subplot(2, 1, 2)]. When i define the value to place by adding the above line of the code in the function i got the graph .