Skip to content

Instantly share code, notes, and snippets.

Kevin Mader kmader

  • Magic Leap
  • Zurich, Switzerland
View GitHub Profile
View Comparing_Heart_Rate.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmader
kmader / CornerstoneDemo.ipynb
Created Aug 30, 2018
Cornerstone Demo Notebook
View CornerstoneDemo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmader
kmader / volume_labelmap.py
Created Aug 17, 2018
convert volumes to labelmaps in Slicer3D
View volume_labelmap.py
from glob import glob
import os
cur_glob = '/Volumes/NO NAME/*seg.nii'
files_to_process = glob(cur_glob)
print('Processing', len(files_to_process), 'files')
def process_file(in_path):
slicer.mrmlScene.Clear(0)
[success, loadedVolumeNode] = slicer.util.loadVolume(in_path, returnNode=True)
outputLabelMap = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLLabelMapVolumeNode')
vol_logic = slicer.modules.volumes.logic()
@kmader
kmader / jupyanno.html
Created Aug 2, 2018
FunAnnotation.html
View jupyanno.html
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<title>Thebe Lab examples</title>
<link rel="stylesheet" type="text/css" href="index.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js">
</script>
<!-- Configure and load Thebe !-->
@kmader
kmader / ImageEnhancementPlayground.ipynb
Created Mar 7, 2018
Using IPywidgets and Matplotlib Together
View ImageEnhancementPlayground.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmader
kmader / README.md
Created Feb 13, 2018
RCNN / YOLO in JS
View README.md

How to display output

How to display reasonable output from a RCNN in JS

@kmader
kmader / CNN_MNIST_PlaidML.ipynb
Last active Oct 29, 2017
PlaidML Keras MNIST
View CNN_MNIST_PlaidML.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmader
kmader / AnalysisSubmitTool.ipynb
Created Oct 20, 2017
A simple Dash and Luigi Job Submission Tool
View AnalysisSubmitTool.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View R Snippet for reading dicom headers
library(tidyverse)
library(oro.dicom)
knime.in$Location %>%
plyr::ldply(function(in_path) {
readDICOMFile(as.character(in_path), pixelData = F)$hdr %>%
group_by(name) %>% summarize_all(funs(first)) %>% # remove duplicate names
select(name, value) %>% spread(name, value) %>% # reformat as a table
head(1)
}
) -> all_header
@kmader
kmader / material_switch.css
Last active Jul 26, 2017
Here is a collection of useful CSS files that I 'host' on gist for use in dash-apps
View material_switch.css
.material-switch > input[type="checkbox"] {
display: none;
}
.material-switch > label {
cursor: pointer;
height: 0px;
position: relative;
width: 40px;
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.