ssh-keygen -t rsa -b 4096 -C "[email protected]" # generate the SSH key
xclip -sel clip < ~/.ssh/id_rsa.pub # send the key to che clipboard
ssh [email protected] # SSH to storm
ssh-add
[Add the previous key to ~/.ssh/authorized_keys
], then
# Paste this code into the Slicer Python console | |
pip_install('highresnet') | |
import SampleData | |
from highresnet.inference import infer | |
from highresnet.cli.download_oasis import download_oasis | |
input_path = download_oasis() | |
loadVolume(input_path) |
import numpy as np | |
import matplotlib.pyplot as plt | |
def fourier_transform(array: np.ndarray): | |
transformed = np.fft.fftn(array) | |
fshift = np.fft.fftshift(transformed) | |
return fshift | |
def inv_fourier_transform(fshift: np.ndarray): | |
f_ishift = np.fft.ifftshift(fshift) |
import tempfile | |
from pathlib import Path | |
from subprocess import call | |
# pip install moviepy opencv-python scikit-image face_recognition | |
import cv2 | |
import numpy as np | |
from PIL import Image | |
from tqdm import tqdm |
# Last modified on the 14th of May, 2018 | |
mkdir -p ~/git | |
cd ~/git | |
# Replace fepegar by your username on Inria Forge. You’ll be asked your password | |
user="fepegar" | |
# To clone the master branch: | |
git clone https://[email protected]/authscm/$user/git/morpheme-privat/morpheme-privat.git --depth 1 | |
# Install zlib1g-dev if Linux |
mkdir -p $HOME/git | |
cd $HOME/git | |
git clone https://github.com/KCL-BMEIS/niftyreg.git --depth 1 | |
cd niftyreg | |
mkdir build install | |
cd build | |
# This gave me trouble on a DGX | |
## If cmake is run just once, make may not work. Might be related to https://stackoverflow.com/q/47684410/3956024 | |
#cmake -DCMAKE_INSTALL_PREFIX:STRING=../install -DUSE_CUDA:BOOL=ON -DCMAKE_C_COMPILER:STRING=/usr/bin/gcc-6 .. |
ssh-keygen -t rsa -b 4096 -C "[email protected]" # generate the SSH key
xclip -sel clip < ~/.ssh/id_rsa.pub # send the key to che clipboard
ssh [email protected] # SSH to storm
ssh-add
[Add the previous key to ~/.ssh/authorized_keys
], then
import numpy as np | |
import SampleData | |
def getSampleVolume(): | |
# Download MRHead | |
sampleDataLogic = SampleData.SampleDataLogic() | |
volumeNode = sampleDataLogic.downloadMRHead() | |
return volumeNode |