Skip to content

Instantly share code, notes, and snippets.

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

Andrey Fedorov fedorov

🇺🇦
Времена не выбирают, в них живут и умирают. - Александр Кушнер
View GitHub Profile
Type: Information
Time: Tue Mar 22 17:00:11 2016
Description: BRAINSFitIGT completed without errors
Type: Information
Time: Tue Mar 22 17:00:10 2016
Description: BRAINSFitIGT standard output:
TranformTypes: Rigid(1 of 2).
General Registration (BRAINS) standard output:
Original Fixed image origin[-71.857, -97.5889, 15.724, 0]
TranformTypes: Rigid(1 of 3).
TranformTypes: Affine(2 of 3).
TranformTypes: BSpline(3 of 3).
Initializing transform with useCenterOfROIAlign
General Registration (BRAINS) standard output:
Original Fixed image origin[-71.857, -97.5889, 15.724, 0]
TranformTypes: Rigid(1 of 1).
Initializing transform with useCenterOfROIAlign
Initializing transform with useCenterOfROIAlign to
VersorRigid3DTransform (0x104ab77c0)
RTTI typeinfo: itk::VersorRigid3DTransform<double>
Reference Count: 2
@fedorov
fedorov / dcmqi-seg.jsonld
Created May 6, 2016 20:32
Experiment to use JSON-LD for communicating metadata to dcmqi conversion tools http://github.com/qiicr/dcmqi
{
"@context": {
"ClinicalTrialSeriesID" : "http://dicom.nema.org/medical/dicom/current/output/chtml/part06/chapter_6.html#para_87c4e314-1f60-49f3-a379-5f6926316ec0",
"ContentCreatorName" : "http://dicom.nema.org/medical/dicom/current/output/chtml/part06/chapter_6.html#para_1d93f33c-3935-49db-97c0-2dcad981f4aa",
"ReaderID" : "ContentCreatorName",
"SessionID" : "ClinicalTrialSeriesID",
"ClinicalTrialTimePointID" : "http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.2.3.html#para_4d2ee376-92b4-4f23-9560-4fd0f5af77ad",
"TimePoint" : "ClinicalTrialTimePointID",
"SeriesDescription" : "http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.3.html#para_5fe2ee7d-82fc-44e4-893b-eecb8eb89550",
"SeriesNumber" : "http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.8.html#para_cf392e6c-ab22-41a7-90ce-cf16145dc849",
@fedorov
fedorov / adcdcmChecks.py
Created August 17, 2016 18:28
Python script to complete DICOM checks using dciodvfy. To use, install pydicom dependency and run from the directory containing "ADC DICOM challenge" data (from Dariya).
import dicom, sys, os, subprocess, re
typesMap = {}
for sd, d, fs in os.walk("."):
for f in fs:
fpath = os.path.join(sd,f)
try:
dcm = dicom.read_file(fpath)
location = fpath.split('/')[1]
#!/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.
@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
@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 / 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 / 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 */