brainlife / ezbids

A web service for semi-automated conversion of raw imaging data to BIDS
https://brainlife.io/ezbids
MIT License
26 stars 13 forks source link

Bug in createThumbnail.py #67

Closed soichih closed 1 year ago

soichih commented 2 years ago

A user has reported that the defacing has failed due to an issue caused inside createThumbnail.py

Screenshot_9_21_22__6_55_PM

It looks like we just need to update from buf.tostring() to buf.tobytes()?

dlevitas commented 2 years ago

I just pushed a commit with this change.

dkp commented 2 years ago

I started over again, reimported the data, and tried to deface it with the same results. Maybe something is cached, or else I should be more patient. Here's a copy of the dataset: https://osf.io/fvuhb

dlevitas commented 2 years ago

I didn't get a chance to update the production instance of ezBIDS (the url users interact with), but I'll test my change locally and update tomorrow once everything looks fine.

dkp commented 2 years ago

Fantastic, sorry I jumped the gun.

dkp commented 1 year ago

Sorry to bring this back to life, but it still fails for me. I've attached an image deface_fail_2023_01_20

dlevitas commented 1 year ago

@dkp, thanks, this was caused an update we made earlier this week that inadvertently affected the defacing. I've gone ahead and fixed it, but you'll need to close and open a new ezBIDS tab for the changes to take effect.

dkp commented 1 year ago

@dlevitas Hmm, thank you for reacting so quickly. I started a fresh ezbids session and reuploaded the dataset. The behavior is different now: The T1w image is getting defaced and displayed, but the FLAIR and T2w images are still not being displayed and the Grey box reports:

failed to run deface -- code:2
+ echo 0
dlevitas commented 1 year ago

@dkp are you using the quickshear or pydeface method?

dkp commented 1 year ago

@dlevitas I am using quickshear. I just retried (same session) with pydeface and it says:

failed to run deface -- code:3
real    0m0.630s
user    0m0.618s
sys 0m0.084s
dlevitas commented 1 year ago

That's strange, I tried the quickshear defacing with some T2w and FLAIR images of our own and didn't encounter an issue. Are you able/allowed to share those anatomical files to my institution email (dlevitas@iu.edu)?

dlevitas commented 1 year ago

@dkp thanks for the sample data. I received a slightly different error than what was posted, but it may have been related. Fixing that issue seems to have resolved the defacing problem. I've updated ezBIDS again, so you'll have to restart a session in order for the changes to take effect.

Please let me know if you continue to encounter issues.