Skip to content

Commit

Permalink
min PLD update
Browse files Browse the repository at this point in the history
  • Loading branch information
willtack committed Jan 31, 2023
1 parent 5509276 commit 1b46472
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ full_analysis.prj
build_and_deploy.sh
app_old/for_testing/full_analysis
bfg-1.13.1.jar
app/old/
full_analysis07
app/full_analysis07/for_redistribution_files_only/full_analysis
app/full_analysis07.zip
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ ENV FLYWHEEL /flywheel/v0
RUN mkdir -p ${FLYWHEEL}
RUN mkdir -p ${FLYWHEEL}/opt

# Install MCR. Install path: usr/local/MATLAB/MATLAB_Runtime/v97
RUN wget -O opt/mcr.zip http://ssd.mathworks.com/supportfiles/downloads/R2019b/Release/0/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019b_glnxa64.zip
RUN unzip opt/mcr.zip -d opt/
RUN opt/install -mode silent -agreeToLicense yes
# Install MCR. Install path: /usr/local/MATLAB/MATLAB_Runtime/v97
RUN wget -O /opt/mcr.zip http://ssd.mathworks.com/supportfiles/downloads/R2019b/Release/0/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019b_glnxa64.zip
RUN unzip /opt/mcr.zip -d /opt/
RUN /opt/install -mode silent -agreeToLicense yes

# Install libs
RUN apt-get -y install libxmu6
Expand All @@ -102,7 +102,9 @@ COPY . /flywheel/v0/
RUN chmod +x ${FLYWHEEL}/*

# Change permissions
RUN chmod 777 /
#RUN chmod 777 /
RUN chmod 777 ${FLYWHEEL}/app/full_analysis07/for_redistribution_files_only/run_full_analysis.sh
RUN chmod 777 ${FLYWHEEL}/app/full_analysis07/for_redistribution_files_only/full_analysis

# ENV preservation for Flywheel Engine
RUN env -u HOSTNAME -u PWD | \
Expand Down
Binary file removed app/full_analysis07.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hasl-decode",
"label": "HASL Decoder: Hadamard-encoded ASL (HASL) processing pipeline",
"description": "Hadamard-encoded multi-delay ASL data(HASL) processing pipeline for measuring cerebrovascular reactivity. Decodes the Hadamard matrix into three post-labelling delays and calculates cerebral blood flow, arterial transit time and transit time-corrected cerebral blood flow.",
"version": "0.6.2_0.6.2",
"version": "0.7.3_0.8.1",
"inputs": {
"asl": {
"base": "file",
Expand Down Expand Up @@ -41,7 +41,7 @@
"custom": {
"gear-builder": {
"category": "analysis",
"image": "willtack/hasl:0.6.2"
"image": "willtack/hasl:0.7.3_0.8.1"
},
"flywheel": {
"suite": "BrainScienceCenter"
Expand Down
4 changes: 3 additions & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FLYWHEEL_BASE=/flywheel/v0
MCR_ROOT=/usr/local/MATLAB/MATLAB_Runtime/v97/ # double check this
INPUT_DIR=${FLYWHEEL_BASE}/input
OUTPUT_DIR=${FLYWHEEL_BASE}/output
CODE_DIR=${FLYWHEEL_BASE}/app/full_analysis/07/for_redistribution_files_only
CODE_DIR=${FLYWHEEL_BASE}/app/full_analysis07/for_redistribution_files_only

# Make sure that /output directory exists
if [[ ! -d "${OUTPUT_DIR}" ]]
Expand Down Expand Up @@ -54,6 +54,8 @@ bet2 "${mprageFile}" "${mprageFileBet}" -v -f 0.5 -g 0


# Run the Matlab executable
chmod +x ${CODE_DIR}/run_full_analysis.sh
chmod +x ${CODE_DIR}/full_analysis
time ${CODE_DIR}/run_full_analysis.sh "${MCR_ROOT}"\
"${aslFile}"\
"${m0File}"\
Expand Down
21 changes: 19 additions & 2 deletions src/full_analysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
asl_para = auxil_asl_para_init();

asl_para.LD = 3.5;
asl_para.PLD = 0.7;
asl_para.PLD = 1.0;
asl_para.PLD_Num = 7;
asl_para.PLD_Lin = 0.5;
asl_para.T1b = 1.65;
Expand Down Expand Up @@ -171,7 +171,24 @@

nii.hdr.dime.dim(5)=1;
nii.img = ttccbf_img(:,:,:,4);
save_nii(nii, fullfile(subj_folder, 'ttcbf.nii'));
save_nii(nii, fullfile(subj_folder, 'ttcbf4.nii'));

nii.hdr.dime.dim(5)=1;
nii.img = ttccbf_img(:,:,:,1);
save_nii(nii, fullfile(subj_folder, 'ttcbf1.nii'));

nii.hdr.dime.dim(5)=1;
nii.img = ttccbf_img(:,:,:,6);
save_nii(nii, fullfile(subj_folder, 'ttcbf6.nii'));

nii.hdr.dime.dim(5)=1;
nii.img = ttccbf_img(:,:,:,7);
save_nii(nii, fullfile(subj_folder, 'ttcbf7.nii'));

nii.hdr.dime.dim(5)=1;
nii.img = ttccbf_img(:,:,:,7);
save_nii(nii, fullfile(subj_folder, 'ttcbf8.nii'));


tt_img = tt_img.*1000; % *1000:change unit from 's' to 'ms'
nii.hdr.dime.dim(5)=1;
Expand Down

0 comments on commit 1b46472

Please sign in to comment.