pnlbwh / dMRIharmonization

Multi-site dMRI harmonization
Other
46 stars 14 forks source link

Version/Attribute Issue at Template Creation (n is not an attribute of QballModel) #89

Open ShivyaGupta14 opened 4 months ago

ShivyaGupta14 commented 4 months ago

Hello,

I am currently in the process of running the Template Creation Step for the dMRI Harmonization Pipeline. As part of the preparation, I executed ./pipeline_test.sh to verify that the template can be successfully created using the test data. I am using Python 3.12, and encountered some initial errors related to the get_data() function, which I resolved by updating the calls to get_fdata(). With these modifications, the script progressed smoothly and displayed the message "Template Creation Completed."

However, I encountered an error related to the QballModel. The error message indicates that "n" is not an attribute of QballModel. I attempted to use "sh_order_max" as a replacement, but this led to another error at a different line. Additionally, I attempted to use Python 3.6 to see if it would resolve the issue, but it resulted in errors related to ITK files, which were resolved when reverting to the latest Python version.

Could you please advise on the correct attribute name to replace "n" in the QballModel to ensure proper functionality?

Thank you for your assistance.

Best regards, Shivya

Screenshot 2024-07-01 at 12 27 26 AM
tashrifbillah commented 4 months ago

The error message indicates that "n" is not an attribute of QballModel

This means DIPY people have changed the arguments of their QballModel class/function. :(

https://github.com/dipy/dipy/blob/master/dipy/reconst/shm.py#L840

tashrifbillah commented 4 months ago

Can you use dipy v1.1.1 that coincides with the time we developed this software? https://github.com/dipy/dipy/tags?after=1.1.1

ShivyaGupta14 commented 4 months ago

Thank you so much for the assistance and guidance. I am able to run the pipeline and unittest without any error.

Thanks, Shivya.

tashrifbillah commented 4 months ago

Thank you too. Were you able to install dipy v1.1.1?

ShivyaGupta14 commented 4 months ago

Hello,

Sorry for the late reply. No, I did not update the dipy version. Instead, I went to the QballModel function, where I changed my code according to the new code presented in that function (precisely for the value of L).

Now, there is another thing that is coming up. So, I have data from 4 sites, and there are about 30 participants in each site. We selected 30 participants from Site 1 as reference site and put the remaining 90 participants as target. Also, there is no difference in the demographics and all participants were collected with same imaging parameters on 4 different scanners. there were no travelling heads. We ran the create template.py but our mean FA still looks weird. The picture is as below, [cid:a350c1a5-0a9f-4286-95ff-5de8f5dc52ac]

And the command that we used for running the template is as below,

lib/harmonization.py \ --ref_list test_data/ref_caselist.txt \ --tar_list test_data/target_caselist.txt \ --ref_name REF \ --tar_name TAR \ --template test_data/template/ \ --nshm 6 \ --bvalMap 1000 \ --resample 1.5x1.5x1.5 \ --nproc 8 \ --create

Could you please assist me with this, that what wrong are we doing.

Thanks, Shivya.

tashrifbillah commented 4 months ago

Instead, I went to the QballModel function, where I changed my code according to the new code presented in that function (precisely for the value of L).

Can you tell us the change? We may be interested to adapt our program accordingly.