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
from util import * | |
from rish import rish | |
N_shm=2 | |
def approxSignal(imgPath, maskPath): | |
directory = os.path.dirname(imgPath) | |
inPrefix = imgPath.split('.nii')[0] | |
prefix = os.path.split(inPrefix)[-1] | |
outPrefix = os.path.join(directory, 'harm', prefix) |
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
def single_pass(InputImage, scale): | |
temp_image= InputImage.copy() | |
for s in range(scale,0,-1): | |
temp_image= single_scale(temp_image, s) | |
temp_image= findLargestConnectMask(temp_image) | |
OutputImage= temp_image |
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
antsApplyTransforms -d 3 -i /rds/general/user/fmoro/home/bioaxlive/Controls/DTI/London/COB_I078/harm_trial_4/COB_I078_mask.nii.gz \ | |
-o /rds/general/user/fmoro/home/bioaxlive/Controls/DTI/London/COB_I078/harm_trial_4/COB_I078_mask_resampledWarped.nii.gz \ | |
-r /rds/general/user/fmoro/home/template_lau4/template0.nii.gz \ | |
-t /rds/general/user/fmoro/home/template_lau4/COB_I078_FA*[!Inverse]Warp.nii.gz \ | |
-t /rds/general/user/fmoro/home/template_lau4/COB_I078_FA*GenericAffine.mat | |
# if the above does not work, do | |
ls /rds/general/user/fmoro/home/template_lau4/COB_I078_FA*[!Inverse]Warp.nii.gz | |
ls /rds/general/user/fmoro/home/template_lau4/COB_I078_FA*GenericAffine.mat | |
# and replace the last two lines in the former block with absolute paths obtained from the latter |
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
#!/usr/bin/env python | |
import dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
from dash_table import DataTable | |
from dash_table.Format import Format | |
import pandas as pd | |
app = dash.Dash(__name__) |
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
# run as python shape_check.py | |
from conversion import read_cases | |
import numpy as np | |
from nibabel import load | |
from os.path import isfile | |
# copy this script to DIAGNOSE_CTE_U01/derivatives/pnlpipe and run from there | |
# adjust caselist if necessary | |
cases=read_cases('../../caselists/Caselist_ALL.txt') |
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
# copy this script in the following directory and run from there | |
# cd DIAGNOSE_CTE_U01/derivatives/pnlpipe | |
# run as sh fix_bbox.sh | |
for c in $(cat incongruous_cases.txt) | |
do | |
mask_name=sub-${c}/ses-01/dwi/sub-${c}_ses-01_desc-dwiXcCNNQc_mask.nii.gz | |
bse_name=sub-${c}/ses-01/dwi/sub-${c}_ses-01_desc-dwiXc_bse.nii.gz | |
echo $c |
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
#!/usr/bin/env python | |
import dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
from dash.dependencies import Input, Output | |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] | |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) |
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
#!/usr/bin/env python | |
import dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] | |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) |
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
import pandas as pd | |
import pdfkit | |
df=pd.DataFrame(columns= ['col 1', 'col 2']) | |
df.loc[0]=[1,2] | |
df.loc[1]=[3,4] | |
df.loc[3]=["2020-06-05 00:50:22.953896: E tensorflow/stream_executor/cuda/cuda_driver.cc:806] failed to allocate 225.53M (236486144 bytes) from device: CUDA_ |
OlderNewer