This file contains hidden or 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
# http://blog.seljebu.no/2014/11/22/install-numba-in-osx-yosemite-with-brew/ | |
# http://www.australsounds.com/2014/10/installing-numba-in-os-x-1010.html | |
brew tap homebrew/versions | |
brew install --disable-assertions --rtti llvm37 | |
git clone https://github.com/numba/llvmlite | |
cd llvmlite | |
LLVM_CONFIG=/usr/local/Cellar/llvm37/3.7.1/bin/llvm-config-3.7 python setup.py install | |
cd .. |
This file contains hidden or 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
#!/bin/bash | |
set -x | |
set -e | |
git clone https://github.com/Kitware/VTK.git | |
cd VTK | |
mkdir build | |
cd build |
This file contains hidden or 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/python | |
import numpy as np | |
import cv2 | |
import densecrf as dcrf | |
from skimage.segmentation import relabel_sequential | |
import sys | |
# Usage: | |
# python dense_inference.py image annotations output |
Swig can be installed separately:
brew install swig
Then run the SuperBuild:
git clone https://github.com/kaspermarstal/SimpleElastix
This file contains hidden or 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
# http://stackoverflow.com/questions/9924135/fast-cartesian-to-polar-to-cartesian-in-python | |
import cv2 | |
import numpy as np | |
import scipy.ndimage as nd | |
import irtk | |
def polar2cart(r, theta, center): | |
x = r * np.cos(theta) + center[0] |
This file contains hidden or 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 dicom | |
import numpy as np | |
def load_dcm(filename): | |
dcm = dicom.ReadFile(filename) | |
# http://www.creatis.insa-lyon.fr/pipermail/dcmlib/2005-September/002141.html | |
# http://www.dabsoft.ch/dicom/3/C.7.6.2.1.1/ | |
# http://xmedcon.sourceforge.net/Docs/OrientationDicomStandard | |
img0 = dcm[(0x5200, 0x9230)][0] # Per-frame Functional Groups Sequence |
Note: this page was originally written in pmWiki for the wiki of the Biomedia group.
It was converted to markdown using an HTML-to-markdown converter and a markdown editor.
See the official documentation for more info about SLURM.
the --wrap
option allows you to pass one-liners to sbatch (see sbatch -h
):
This file contains hidden or 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 numpy as np | |
def dr_toolbox(D,n_components=None): | |
""" | |
Landmark isomap dimensionality reduction method | |
This is the version implemented in | |
http://homepage.tudelft.nl/19j49/Matlab_Toolbox_for_Dimensionality_Reduction.html | |
Parameters | |
---------- |
This file contains hidden or 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 jython | |
# \begin{enumerate} | |
# \item Process $\rightarrow$ Gaussian Blur | |
# \item Process $\rightarrow$ Enhance Contrast (normalize \& equalize histogram) | |
# \item Image $\rightarrow$ Type $\rightarrow$ HSB stack | |
# \item Image $\rightarrow$ Stacks $\rightarrow$ Stack to images | |
# \item keep only the Hue image | |
# \item Process $\rightarrow$ Find maxima... (noise tolerance 60) | |
# \end{enumerate} |