Skip to content

Instantly share code, notes, and snippets.

@dgutman
dgutman / gist:3e9768ad44ba4ecd3cf94ac4fe4e5cb4
Last active Feb 12, 2020
Find an index on a table in MSSQL
View gist:3e9768ad44ba4ecd3cf94ac4fe4e5cb4
exec sp_helpindex 'dbo.MF_EMR_SPECIALTESTSPROCEDURES'
HealthFactorTypeSID
SELECT [DWViewSchema]
,[DWViewName]
,[DWPartitionKey]
,[DWPartitionKeyDataType]
FROM [CDWWork].[Meta].[DWView]
WHERE [DWViewName] = 'HealthFactor'
is another way
View FuseAxialAndSagitalMRI_ImageSet.py
## This script is a nipype pipeline to combine two MRI images for the same subject that have been acquired in different orientations
## and different spatial resolution.
__author__ = 'dgutman'
"""" This script will take a very disorganized set of axial that had a mask manually drawn in the axial plain, as well as sagittal dog images
and register and reorient them so the data can be used for later averaging
The mask doesn't have to be perfect, but should be fairly close and not include excessive
amounts of neck
@dgutman
dgutman / RunHCP_Registration-Pipeline-GIST.py
Created Sep 28, 2018
Creates Registrations using ANTS and Nipype between DTI space to the MNI Reference Space; also applies the XFMs to an ROI in MNI Space and registers it to the DTI space
View RunHCP_Registration-Pipeline-GIST.py
import nipype
import os,glob,sys,shutil
sys.path.append("/usr/lib/ants/")
import nipype.interfaces.fsl as fsl
import nipype.pipeline.engine as pe
import nipype.interfaces.utility as util
import nipype.interfaces.io as nio
import nipype.interfaces.ants as ants
from nipype.interfaces.ants import Registration, RegistrationSynQuick,WarpImageMultiTransform
from nipype.interfaces.fsl import Info
View gist:10010489
import urllib2
import json
import os
import csv
import pandas as pd
import xlrd
from pandas.io.parsers import ExcelFile
from xml.dom import minidom
@dgutman
dgutman / xnat-base-setup.sh
Last active Dec 14, 2015
XNAT Ubuntu Install Script for 12.04 LTS
View xnat-base-setup.sh
## David A Gutman dgutman _at_ emory.edu
## This script walks through install an XNAT Ubuntu Virtual Machine for a VMware Host
## Note: this script can not be run as a single bash script.
# This is a fork/update of johnpaulett's guest setup script
# https://gist.github.com/johnpaulett/206346
## VMWARE Setup: I allocated 80GB for the main XNAT partition (using Thin Provisioning)
## Also I set up an additional disk as a standalone partition to actually store all my data
## Presumably you do not want to have your VM image with your database/XNAT/etc in the same VM as
## storage
View DicomServer.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>
configuration file for DicomServer, by karchie@npg.wustl.edu
</comment>
<entry key="arcspec">/home/xnat/xnat_data/cache/archive_specification.xml</entry>
<entry key="xnat_url">http://localhost:8080/xnat</entry>
<entry key="user">admin</entry>