PennLINC / xcp_d

Post-processing of fMRIPrep, NiBabies, and HCP outputs
https://xcp-d.readthedocs.io
BSD 3-Clause "New" or "Revised" License
78 stars 26 forks source link

Format executive summary images for BrainSwipes #1089

Closed BarryTik closed 7 months ago

BarryTik commented 8 months ago

Summary

The web application https://brainswipes.us/ uses images from the executive summary. BrainSwipes needs registrations as .PNG files in a 3x3 format like so: sub-269462_ses-48mo_task-rest_run-04_desc-TaskInT2 The executive summary outputs images in a 1x9 format. It sometimes outputs .GIF files.

We request that either the existing 1x9 images are replaced with 3x3 pngs, or that the executive summary also outputs 3x3 pngs alongside the existing 1x9 images.

🧠 🧠 🧠 ✔️ 🧠 🧠 🧠 🧠 🧠 🧠

🧠 🧠 🧠 🧠 🧠 🧠 🧠 🧠 🧠 🚫

Additional details

BrainSwipes is intended as the primary method of QC for HBCD outputs processed by XCPD. For previous datasets the conversion from 1x9 to 3x3 has been handled by a script in the brainswipes repository

Due to the policies and architecture used by HBCD, it is not possible to use this method.

Next steps

The python tool above could be used. It generally runs quickly. If there is a simple way to output images in a 3x3 format originally this may be cleaner.

tsalo commented 8 months ago

Do these figures need to be in the actual executive summary, or can they be files in the figures folder without being rendered in any of the HTML reports?

BarryTik commented 8 months ago

They do not need to be rendered in any HTML reports, just need the png files in the figures folder

tsalo commented 8 months ago

Good to know. Which figures do you need in this format? All of the below, or just a subset?

BarryTik commented 8 months ago

All of them please!

tsalo commented 8 months ago

The code you linked doesn't work on XCP-D's figures- the image sizes don't match. I tried to modify it in #1091, but it's not working for the T1wOnTask and TaskOnT1w figures.

BarryTik commented 8 months ago

Sorry about that. That's some fairly old code and I haven't tested it recently. I'll try to get it working on some newly generated HBCD images and get back to you next week.

BarryTik commented 8 months ago

Fixed a typo and adjusted image sizes. Managed to get it to run on some recently processed data. https://github.com/DCAN-Labs/BrainSwipes/blob/fea192bdda28d2cb2fe4a9c6e4a5998d516a97f1/tools/images/ingest_brainswipes_data.py#L113