SetsompopLab / MRF

This is the repository for MRF related projects of the Setsompop Lab at Stanford University. The code here is used to read and reconstruct MRF data and accompanying calibration scans.
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Using 02_recon just for subspace reconstruction #2

Open Michaelsqj opened 1 year ago

Michaelsqj commented 1 year ago

Hi there,

I'm currently working on subspace reconstruction. I'm wondering would the code in 02_recon work for subspace reconstruction or is it specific to MRF?

To be more specific, I have a

I could do adjoint reconstruction in MATLAB. But when I tried to pass these data into the main.py, the reconstructed output doesn't make sense.

May I ask is there any advice for making the code run for my data? Or does the code only work for MRF data?

Cannot be more grateful for the help!

SophieSchau commented 10 months ago

Hi Qijia, sorry for the delay in getting back to you, I've not been monitoring this repo for a while.

There is no inherent reason this code wouldn't work for non-MRF data but it has never been tested on anything else. It also has some specific quirks that are worth being aware of, e.g.

  1. In load_data.py (https://github.com/SetsompopLab/MRF/blob/f034fcdcc89881e104abeb7725d451e1da4cbe4c/src/02_recon/load_data.py#L61) you can see some things like by default it will throw away rewinder points in the trajectory as well as some points from the beginning of the trajectory and data (this made sense for our use case, but that might not be the case in general).
  2. load_data.py also uses .mat files for the trajectory and phi, but the raw data is imported as numpy arrays. There are different conventions with regards to how the data are stored in these different formats which this function takes care of, but if you're importing your data in a different way you might run into trouble.
  3. Many of the optional parameters (https://github.com/SetsompopLab/MRF/blob/f034fcdcc89881e104abeb7725d451e1da4cbe4c/src/02_recon/main.py#L313) can affect your result and their defaults are set MRF data in our pipeline. Worth going through and checking that it's not something there that is messing you up.

I'm glad you are trying out this code, and hope you can get it to work. If you want me to have a closer look at your specific data and call to main.py, please send more details (in particular the full call with all arguments, and what data types and inherent shapes you use).

Cheers!