diff --git a/SIRF_data_preparation/README.md b/SIRF_data_preparation/README.md index 2d187eb..d17d37d 100644 --- a/SIRF_data_preparation/README.md +++ b/SIRF_data_preparation/README.md @@ -35,24 +35,24 @@ PYTHONPATH=~/devel/PETRIC:$PYTHONPATH` 1. Run initial [data_QC.py](data_QC) ``` - python ../../SIRF_data_preparation/data_QC.py + python -m SIRF_data_preparation.data_QC ``` 2. Run [create_initial_images.py](create_initial_images). ``` - python ../../SIRF_data_preparation/create_initial_images.py --template_image= + python -m SIRF_data_preparation.create_initial_images --template_image= ``` where the template image is one of the given VOIs (it does not matter which one, as they should all have the same geometry). (If you need to create VOIs yourself, you can use `None` or the vendor image). 3. Edit `OSEM_image.hv` to add modality, radionuclide and duration info which got lost (copy from `prompts.hs`) 4. Edit [dataset_settings.py](dataset_settings.py) for subsets (used by our reference reconstructions only, not by participants). -5. Edit [../petric.py](petric.py) for slices to use for creating figures (`DATA_SLICES`). Note that `data_QC.py` outputs centre-of-mass of the VOIs, which can be helpful for this. -6. Run [data_QC.py](data_QC) which should now make more plots. Check VOI alignment etc. +5. Edit [../petric.py](petric.py) for slices to use for creating figures (`DATA_SLICES`). Note that `data_QC` outputs centre-of-mass of the VOIs, which can be helpful for this. +6. Run [data_QC](data_QC) which should now make more plots. Check VOI alignment etc. ``` - python ../../SIRF_data_preparation/data_QC.py --dataset= + python -m SIRF_data_preparation.data_QC --dataset= ``` 7. `cd ../..` -8. `python SIRF_data_preparation/run_OSEM.py ` -9. `python SIRF_data_preparation/run_BSREM.py ` +8. `python -m SIRF_data_preparation.run_OSEM ` +9. `python -m SIRF_data_preparation.run_BSREM ` 10. Adapt [plot_BSREM_metrics.py](plot_BSREM_metrics.py) (probably only the ``) and run interactively. 11. Copy the BSREM ` iter_final` to `data//PETRIC/reference_image`, e.g. ``` diff --git a/SIRF_data_preparation/Siemens_mMR_ACR/README.md b/SIRF_data_preparation/Siemens_mMR_ACR/README.md index 8d1562d..ad419f4 100644 --- a/SIRF_data_preparation/Siemens_mMR_ACR/README.md +++ b/SIRF_data_preparation/Siemens_mMR_ACR/README.md @@ -4,7 +4,7 @@ ugly and temporary Steps to follow: 1. `python SIRF_data_preparation/Siemens_mMR_ACR/download.py` 2. `python SIRF_data_preparation/Siemens_mMR_ACR/prepare.py` (As there is no useful mumap, this will **not** do attenuation and scatter estimation) -3. `python SIRF_data_preparation/create_initial_images.py data/Siemens_mMR_ACR/final --template_image=None` (Reconstruct at full FOV size) +3. `python SIRF_data_preparation.create_initial_images data/Siemens_mMR_ACR/final --template_image=None` (Reconstruct at full FOV size) 4. `mv data/Siemens_mMR_ACR/final/OSEM_image.* data/Siemens_mMR_ACR/processing` (this is really an NAC image and ideally would be renamed) 5. `python SIRF_data_preparation/Siemens_mMR_ACR/register_mumap.py` (output is orgdata/Siemens_mMR_ACR/processing/reg_mumap.hv etc) 6. However, registration failed, so this needs a manual intervention step: @@ -24,9 +24,9 @@ Steps to follow: stir_math --accumulate orgdata/Siemens_mMR_ACR/processing/reg_mumap.hv orgdata/Siemens_mMR_ACR/output/ACR_hardware-to-STIR.nii.gz ``` 7. 11. `python SIRF_data_preparation/run_OSEM.py Siemens_mMR_ACR`--end 200` (As there is now a useful mumap, this will now do attenuation and scatter estimation) -8. `python SIRF_data_preparation/create_initial_images.py data/Siemens_mMR_ACR --template_image=../../orgdata/Siemens_mMR_ACR/output/sampling_masks/acr-all-sampling-0-2mm_dipy.nii` -9. `python SIRF_data_preparation/data_QC.py --srcdir='data/Siemens_mMR_ACR' --transverse_slice=99` -10. edit `SIRF_data_prepatation/dataset_settings.py` for subsets etc. edit `OSEM_image.hv` to add modality, radionuclide and duration info which got lost. +8. `python -m SIRF_data_preparation.create_initial_images data/Siemens_mMR_ACR --template_image=../../orgdata/Siemens_mMR_ACR/output/sampling_masks/acr-all-sampling-0-2mm_dipy.nii` +9. `python -m SIRF_data_preparation.data_QC --srcdir='data/Siemens_mMR_ACR' --transverse_slice=99` +10. edit `petric.py` and `SIRF_data_preparation/dataset_settings.py` for subsets etc. edit `OSEM_image.hv` to add modality, radionuclide and duration info which got lost. 11. `python SIRF_data_preparation/Siemens_mMR_ACR/VOI_prep.py` 12. `python SIRF_data_preparation/run_OSEM.py Siemens_mMR_ACR` 13. `python SIRF_data_preparation/run_BSREM.py Siemens_mMR_ACR` diff --git a/SIRF_data_preparation/Siemens_mMR_ACR/prepare.py b/SIRF_data_preparation/Siemens_mMR_ACR/prepare.py index 7cce5c5..884b1c7 100644 --- a/SIRF_data_preparation/Siemens_mMR_ACR/prepare.py +++ b/SIRF_data_preparation/Siemens_mMR_ACR/prepare.py @@ -2,7 +2,7 @@ import logging import os -from SIRF_data_preparation.data_utilities import prepare_challenge_Siemens_data, the_data_path, the_orgdata_path +from ..data_utilities import prepare_challenge_Siemens_data, the_data_path, the_orgdata_path scanID = 'Siemens_mMR_ACR' diff --git a/SIRF_data_preparation/Siemens_mMR_NEMA_IQ/prepare_mMR_NEMA_IQ_data.py b/SIRF_data_preparation/Siemens_mMR_NEMA_IQ/prepare_mMR_NEMA_IQ_data.py index 99464c1..c88ec51 100644 --- a/SIRF_data_preparation/Siemens_mMR_NEMA_IQ/prepare_mMR_NEMA_IQ_data.py +++ b/SIRF_data_preparation/Siemens_mMR_NEMA_IQ/prepare_mMR_NEMA_IQ_data.py @@ -2,7 +2,7 @@ import logging import os -from .data_utilities import prepare_challenge_Siemens_data, the_data_path +from ..data_utilities import prepare_challenge_Siemens_data, the_data_path, the_orgdata_path this_directory = os.path.dirname(__file__) repo_directory = os.path.dirname(this_directory)