SyneRBI / SIRF-Exercises

SIRF Training and demonstration material
http://www.ccpsynerbi.ac.uk
Apache License 2.0
18 stars 21 forks source link

Add Working Directory function #101

Closed ashgillman closed 3 years ago

ashgillman commented 3 years ago

Fix #84.

TODO: Finish remaining notebooks

ashgillman commented 3 years ago

Before I fix all notebooks, looking for general approval of the solution

ashgillman commented 3 years ago

This gives:

> tree --filelimit 15 data
data
├── meas_MID00103_FID57244_test.dat
├── meas_MID00103_FID57244_test.dat.md5
├── meas_MID00108_FID57249_test_2D_2x.dat
├── meas_MID00108_FID57249_test_2D_2x.dat.md5
├── MR
│   ├── meas_MID00103_FID57244_test.dat
│   ├── meas_MID00108_FID57249_test_2D_2x.dat
│   └── PTB_ACRPhantom_GRAPPA
│       ├── ptb_resolutionphantom_fully_ismrmrd.h5
│       ├── ptb_resolutionphantom_GRAPPA2_ismrmrd.h5
│       ├── ptb_resolutionphantom_GRAPPA4_ismrmrd.h5
│       └── README.txt
├── NEMA_IQ.zip
├── NEMA_IQ.zip.md5
├── PET
│   ├── mMR
│   │   └── NEMA_IQ
│   │       ├── 20170809_NEMA_60min_UCL.l
│   │       ├── 20170809_NEMA_60min_UCL.l.hdr
│   │       ├── 20170809_NEMA_MUMAP_UCL.v
│   │       ├── 20170809_NEMA_MUMAP_UCL.v.hdr
│   │       ├── 20170809_NEMA_UCL.n
│   │       ├── 20170809_NEMA_UCL.n.hdr
│   │       ├── info.txt
│   │       ├── LICENSE.txt
│   │       ├── md5
│   │       │   ├── 20170809_NEMA_60min_UCL.l.hdr.md5
│   │       │   ├── 20170809_NEMA_60min_UCL.l.md5
│   │       │   ├── 20170809_NEMA_MUMAP_UCL.v.hdr.md5
│   │       │   ├── 20170809_NEMA_MUMAP_UCL.v.md5
│   │       │   ├── 20170809_NEMA_UCL.n.hdr.md5
│   │       │   └── 20170809_NEMA_UCL.n.md5
│   │       ├── norm.n.hdr
│   │       ├── NOTICE.txt
│   │       ├── README.md
│   │       ├── umap.v.hdr
│   │       └── warn.txt
│   └── working_folder
│       ├── brain
│       │   ├── attenuation.hv
│       │   ├── attenuation.v
│       │   ├── emission.hv
│       │   ├── emission.v
│       │   └── template_sinogram.hs
│       └── thorax_single_slice
│           ├── attenuation.hv
│           ├── attenuation.v
│           ├── emission.hv
│           ├── emission.v
│           └── template_sinogram.hs
├── PTB_ACRPhantom_GRAPPA.zip
├── PTB_ACRPhantom_GRAPPA.zip.md5
├── Synergistic
│   ├── brainweb [58 entries exceeds filelimit, not opening dir]
│   └── brainweb_single_slice [67 entries exceeds filelimit, not opening dir]
└── working_folder
    ├── Introductory
    │   ├── acquisition_model_mr_pet_ct
    │   │   ├── subject_04.bin.gz
    │   │   └── subject_04.npz
    │   └── introduction
    │       ├── subject_04.bin.gz
    │       └── subject_04.npz
    └── MR
        ├── a_fully_sampled
        │   ├── ptb_resolutionphantom_fully_ismrmrd.h5
        │   ├── ptb_resolutionphantom_GRAPPA2_ismrmrd.h5
        │   └── ptb_resolutionphantom_GRAPPA4_ismrmrd.h5
        ├── b_kspace_filter
        │   ├── ptb_resolutionphantom_fully_ismrmrd.h5
        │   ├── ptb_resolutionphantom_GRAPPA2_ismrmrd.h5
        │   └── ptb_resolutionphantom_GRAPPA4_ismrmrd.h5
        ├── c_coil_combination
        │   ├── ptb_resolutionphantom_fully_ismrmrd.h5
        │   ├── ptb_resolutionphantom_GRAPPA2_ismrmrd.h5
        │   └── ptb_resolutionphantom_GRAPPA4_ismrmrd.h5
        ├── d_undersampled_reconstructions
        │   ├── ptb_resolutionphantom_fully_ismrmrd.h5
        │   ├── ptb_resolutionphantom_GRAPPA2_ismrmrd.h5
        │   └── ptb_resolutionphantom_GRAPPA4_ismrmrd.h5
        └── e_advanced_recon
            ├── ptb_resolutionphantom_fully_ismrmrd.h5
            ├── ptb_resolutionphantom_GRAPPA2_ismrmrd.h5
            └── ptb_resolutionphantom_GRAPPA4_ismrmrd.h5

22 directories, 62 files

I guess you can ignore data/working_folder/PET/working_folder, it would move

ashgillman commented 3 years ago

some suggestions.

I think this is good.

However, I'm somewhat reluctant to copy all the data in every exercise if it's read-only. I know we did it in many of the PET exercises as it's easy to copy the whole folder (but it'd probably be a bad idea to do it for the NEMA for instance). Is it easy enough to read them from their original location?

Great, I think thats nicer and was my first thought.

ashgillman commented 3 years ago

Please don't merge yet - I have pushed changes but haven't tested. I want to test with Docker, but ironing out kinks...

ashgillman commented 3 years ago

Tested with Docker and slight fixes - I think this should be good on my end

KrisThielemans commented 3 years ago

I didn't check this carefully but we'll find out how good a job you did!