How to display reasonable output from a RCNN in JS
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
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() |
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
<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 !--> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
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
.material-switch > input[type="checkbox"] { | |
display: none; | |
} | |
.material-switch > label { | |
cursor: pointer; | |
height: 0px; | |
position: relative; | |
width: 40px; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Often it is important to change a core configuration setting in pyspark before running (like a serializer, PYTHONHASHSEED for python3 users, or
from pyspark import SparkContext
from pyspark.serializers import PickleSerializer
new_conf = sc._conf.setExecutorEnv('PYTHONHASHSEED', '1234')
sc.stop()
sc = pyspark.SparkContext(conf = new_conf, serializer = PickleSerializer())