I utilized the keaDataProcessing.py provided with the Axial 10 days dataset in the Code folder to overcome one of the issues I raised before about that module not being found.
Then, I set up the paths in the LFsim/LF_sim_NHP_v5.py file as follows;
The high field image I'm using is from the IXI dataset (1 nifti file). The low field image I'm using is from the Axial_10 dataset. These can be deduced from the paths above. The axial 10 dataset is in volumes of 155x155x25 whereas the IXI dataset is in shapes of 256x256x120.
When I then run the LFsim/LF_sim_NHP_v5.py, it throws this error
Traceback (most recent call last):
File "/content/LFsim/LF_sim_NHP_v5.py", line 307, in <module>
LF_acq_noise_patch = get_noise(LF_sim, LF_noise_matrix, noise_fact)
File "/content/LFsim/LF_simulation_functions.py", line 191, in get_noise
LF_noise_use = np.reshape(LF_noise_use, (x,y,z))
File "<__array_function__ internals>", line 180, in reshape
File "/usr/local/lib/python3.10/dist-packages/numpy/core/fromnumeric.py", line 298, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/usr/local/lib/python3.10/dist-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 634880 into shape (256,256,120)
I think this error arises from the difference in shapes between the IXI dataset and the Axial 10 dataset.
This error came to me before as well. But then I realized that my numpy library still needed to be updated. When I did it, this error was gone. So you might have the same problem. Try updating your Numpy library.
I utilized the
keaDataProcessing.py
provided with the Axial 10 days dataset in theCode
folder to overcome one of the issues I raised before about that module not being found.Then, I set up the paths in the
LFsim/LF_sim_NHP_v5.py
file as follows;The high field image I'm using is from the IXI dataset (1 nifti file). The low field image I'm using is from the Axial_10 dataset. These can be deduced from the paths above. The axial 10 dataset is in volumes of
155x155x25
whereas the IXI dataset is in shapes of256x256x120
.When I then run the
LFsim/LF_sim_NHP_v5.py
, it throws this errorI think this error arises from the difference in shapes between the IXI dataset and the Axial 10 dataset.