Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile #4

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SHELL := /bin/bash
.PHONY: all clean
.SUFFIXES:

Expand All @@ -10,18 +11,25 @@ examples/dicom/6/: examples/
wget https://github.com/user-attachments/files/15515915/gre_phantom_dcm_nii.zip
unzip gre_phantom_dcm_nii.zip
cd dicom/
mkdir {5,6}
mkdir 5
mkdir 6
mv TESTBR.MR.DEV-SCHIRDA_041119_BRAINO.0005.* 5
mv TESTBR.MR.DEV-SCHIRDA_041119_BRAINO.0006.* 6

.venv/bin/activate:
./setup_env.bash

dcm-rehead/: examples/dicom/6/ | .venv/bin/activate
source .venv/bin/activate && \
dicom-rewrite-pname -o $@/5 -n fmap_acq-dwi examples/dicom/5/*
dicom-rewrite-pname -o $@/6 -n fmap_acq-dwi examples/dicom/6/*
. .venv/bin/activate && \
rename 's/-//g' examples/dicom/5/* && \
rename 's/_//g' examples/dicom/5/* && \
rename 's/-//g' examples/dicom/6/* && \
rename 's/_//g' examples/dicom/6/* && \
dicom-rewrite-pname -o dcm-rehead//5 -n fmapacqdwi examples/dicom/5/* && \
dicom-rewrite-pname -o dcm-rehead//6 -n fmapacqdwi examples/dicom/6/*

txt/input-reproin.txt: dcm-rehead/ $(wildcard dcm-rehead/*)
dcmdirtab -d 'dcm-rehead/*' > $@
bids/: dcm-rehead/
./01_dcm-bids.sh $</*/

Expand Down
Loading