Skip to content

Instantly share code, notes, and snippets.

View fedorov's full-sized avatar
🇺🇦
Времена не выбирают, в них живут и умирают. - Александр Кушнер

Andrey Fedorov fedorov

🇺🇦
Времена не выбирают, в них живут и умирают. - Александр Кушнер
View GitHub Profile
@fedorov
fedorov / google.js
Last active June 2, 2022 14:25
This the template OHIF Viewer configuration file for connecting with Google Healthcare DICOM. See tutorial here: https://tinyurl.com/idc-ohif-gcp
window.config = {
routerBasename: '/',
enableGoogleCloudAdapter: true,
// enable series filter parameter
filterQueryParam: true,
healthcareApiEndpoint: 'https://healthcare.googleapis.com/v1',
servers: {
// This is an array, but we'll only use the first entry for now
dicomWeb: [],
},
{
"hosting": {
"public": "public",
"headers": [
{
"source": "/**",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache, no-store, must-revalidate"
@fedorov
fedorov / stack_trace.txt
Created June 28, 2019 18:27
Slicer Jun 27 2019 crash after installing SimpleITK with pip
Process: Slicer [78341]
Path: /Applications/Slicer.app/Contents/MacOS/Slicer
Identifier: ???
Version: ??? (4.11.0-2019-06-27)
Code Type: X86-64 (Native)
Parent Process: zsh [738]
Responsible: Slicer [78341]
User ID: 501
Date/Time: 2019-06-28 14:19:39.643 -0400
@fedorov
fedorov / crash_trace.txt
Created September 6, 2018 15:59
Slicer crash on invoking "Extension Manager", macOS, Sept 6, 2018, nightly
Process: Slicer [48459]
Path: /Applications/Slicer.app/Contents/MacOS/Slicer
Identifier: ???
Version: ??? (4.9.0-2018-09-04)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Slicer [48459]
User ID: 501
Date/Time: 2018-09-06 11:58:11.619 -0400
@fedorov
fedorov / A.repeatability.7.19.16.R
Created September 29, 2017 21:16
Repeatability analysis R script
rm(list=ls())
library(ICC)
dat<-read.table('data20160211.csv',header=TRUE,sep=';')
library(outliers); library(lme4); library(lmerTest); library(boot)
library(multcomp)
types<-c("ADC1400", "SUB", "T2AX")
structures<-c("PeripheralZone", "TumorROI_PZ_1", "NormalROI_PZ_1",
"WholeGland")
get.dat<-function(quantity, structures, types, dat){
X<-dat[dat$Quantity==quantity & !is.na(dat$Value) &
@fedorov
fedorov / read1500.cc
Created August 12, 2017 19:58
Sample program reading an SR document based on TID 1500 and printing details on the measurements
/*
* Sample program reading an SR document based on TID 1500 and printing details on the measurements
*
* Author: J. Riesmeier, Oldenburg, Germany
*
*/
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
@fedorov
fedorov / ITK header - TCGA-02-0006_1996.08.23_GlistrBoost.nii.gz
Last active August 4, 2017 16:42
nibabel difference between TCIA-GBM segmentation headers
LargestPossibleRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [240, 240, 155]
BufferedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [240, 240, 155]
RequestedRegion:
Dimension: 3
@fedorov
fedorov / metadata.json
Created April 26, 2017 21:32
dcmqi metadata JSON for the FreeSurfer brain label conversion use case
{
"ContentCreatorName": "FreeSurfer",
"ClinicalTrialSeriesID": "Session1",
"ClinicalTrialTimePointID": "1",
"SeriesDescription": "Segmentation",
"SeriesNumber": "300",
"InstanceNumber": "1",
"BodyPartExamined": "BRAIN",
"segmentAttributes": [
[
@fedorov
fedorov / Linker command line after upgrade
Last active February 23, 2017 18:20
Slicer extension build problems after upgrade of ITK to 4.11
/usr/bin/c++ -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -D_FORTIFY_SOURCE=2 -fdiagnostics-show-option -Wl,--no-undefined -fstack-protector-all -Wno-deprecated -Woverloaded-virtual -Wstrict-null-sentinel -msse2 -Wall -Wno-deprecated -msse2 -g -lpthread CMakeFiles/paramap2itkimage.dir/home/fedorov/builds/Slicer4-Debug/Slicer-build/Base/CLI/SEMCommandLineLibraryWrapper.cxx.o -o ../../lib/Slicer-4.7/cli-modules/paramap2itkimage -L/home/fedorov/builds/Slicer4-Debug/teem-build/bin -Wl,-rpath,/home/fedorov/builds/Slicer4-Debug/teem-build/bin:/home/fedorov/builds/Slicer4-Debug/Slicer-build/bin:/home/fedorov/builds/Slicer4-Debug/JsonCpp-build/src/lib_json/.:/home/fedorov/builds/Slicer4-Debug/DCMTK-build/lib: ../../lib/Slicer-4.7/cli-modules/libparamap2itkimageLib.a /home/fedorov/builds/Slicer4-Debug/Slicer-build/bin/libITKFactoryRegistration.so /home/fedorov/builds/Slicer4-Debug/JsonCpp-build/src/lib_json/./libjsoncpp.so ../../bin/libdcmqi.a /home/fedorov/builds/Slicer4-De
#!/usr/bin/python
#
# Delete the label image from an Aperio SVS file.
#
# Copyright (c) 2012-2013 Carnegie Mellon University
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, version 2.1.