-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from KrisThielemans/Mediso_NEMA_IQ
Mediso NEMA IQ data
- Loading branch information
Showing
7 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Data from the Mediso AnyScan at NPL | ||
Initial processing steps | ||
```sh | ||
orgpath=/mnt/share/petric-wip/NEMA_Challenge | ||
#orgpath=~/devel/PETRIC/orgdata/ | ||
# cd $orgpath | ||
#wget https://nplanywhere.npl.co.uk/userportal/?v=4.6.1#/shared/public/nrKe5vWynvyMsp7m/e9e3d4b8-8f83-47be-bf2d-17a96a7a8aac | ||
#unzip NEMA_Challenge.zip | ||
cd ~/devel/PETRIC/data | ||
mkdir -p Mediso_NEMA_IQ | ||
cd Mediso_NEMA_IQ/ | ||
# trim sinograms to avoid "corner" problems in mult_factors | ||
# TODO for next data: use 30 (as some problems remain) | ||
for f in additive_term.hs mult_factors.hs prompts.hs; do | ||
SSRB -t 20 $f $orgpath/sinograms/$f; | ||
done | ||
# alternative if we don't need to trim | ||
#cp -rp $orgpath/sinograms/* . | ||
# get rid of NaNs | ||
python prepare.py | ||
# now handle VOIs | ||
mkdir PETRIC | ||
cp -rp $orgpath/VOIs/* PETRIC | ||
# cp -rp $orgpath/README.md . | ||
cd PETRIC | ||
stir_math VOI_background.hv VOI_backgroung.hv | ||
rm VOI_backgroung.* | ||
rm *ahv | ||
cd .. | ||
python ../../SIRF_data_preparation/create_initial_images.py --template_image=PETRIC/VOI_whole_object.hv . | ||
``` | ||
I needed to fix the OSEM header (manual): | ||
``` | ||
!imaging modality := PT | ||
``` | ||
python ../../SIRF_data_preparation/data_QC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Set NaNs to zero in additive_term | ||
import sirf.STIR | ||
import numpy as np | ||
additive = sirf.STIR.AcquisitionData('additive_term.hs') | ||
add_arr = additive.as_array() | ||
add_arr = np.nan_to_num(add_arr) | ||
new_add = additive.clone() | ||
new_add.fill(add_arr) | ||
new_add.write('additive_term.hs') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters