Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
Separated the mkdir commands for 5 and 6

Also setup the dcm-rehead: examples to rename automatically
  • Loading branch information
echudlow authored Aug 19, 2024
1 parent 1c2881d commit b5b9456
Showing 1 changed file with 12 additions and 4 deletions.
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

0 comments on commit b5b9456

Please sign in to comment.