This file contains 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
function [ x ] = bisectionSearch( y, fn ,e ) | |
% BISECTIONSEARCH Searches for x that results in y for function fn with max | |
% error e between a<=x<=b, or until iteration does not change value of y | |
% FUNCTION MUST BE MONOTONIC | |
% Hyo Byun | |
% Mayberg Lab, Emory University | |
% 2013 | |
% Set bounds | |
a=0; |
This file contains 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
function time = progress( startT, i, N ) | |
% PROGRESS | |
% Outputs estimated time and percentage till completion | |
% To use, before loop, save startT ( startT=clock; ) | |
% then, inside loop, call progress using following variables: | |
% startT : beginning time defined above using clock | |
% i : ith iteration | |
% N : total number of expected iterations | |
% | |
% Hyo Byun |
This file contains 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
#!/bin/bash | |
cd /mnt/QNAPimaging/DBS/callie/fMRI/subjects | |
files=`find -name *.rest.callie_proc_05222013.nii.gz | cut -c3-` | |
for f in $files; do | |
cp -v $f /research/images/DBS/callie_proc_05222013 | |
done |
This file contains 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
images='dir1 | |
dir2 | |
' | |
for i in $images; do | |
mkdir /research/CIDAR_proc_test/2ndset/$i | |
cp -vR /mnt/DICOM_originals/CIDAR/dicom/$i/*interleaved_Combined* /research/CIDAR_proc_test/2ndset/$i/ | |
cp -vR /mnt/DICOM_originals/CIDAR/dicom/$i/*sequential_Combined* /research/CIDAR_proc_test/2ndset/$i/ | |
cp -vR /mnt/DICOM_originals/CIDAR/dicom/$i/*t1* /research/CIDAR_proc_test/2ndset/$i/ | |
done |
This file contains 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
cd /research/CIDAR_proc_test | |
images=`find . -mindepth 1 -maxdepth 1 -type d | cut -c3- | sort` | |
cd /research/CIDAR/QC_output | |
for i in $images; do | |
feh --auto-zoom --fullscreen --draw-filename \ | |
mosaic/$i\_anat.png \ | |
mosaic/$i\_RestSeq.png \ | |
mosaic/$i\_RestAlt.png \ |
This file contains 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
/* THIS CODE IS MY OWN WORK, IT WAS WRITTEN WITHOUT CONSULTING A TUTOR OR CODE WRITTEN BY OTHER STUDENTS -HYO BYUN*/ | |
import java.util.*; | |
public class BinPacking { | |
/* ----------------------------------------------------------- | |
SolveBP(k1, s1, k2, s2, k3, s3, Cap): | |
NOTE DOESN"T USE RESIDUAL CAP, USES FILLED CAP | |
returns the min # bins needed to pack: |
This file contains 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
import javax.imageio.ImageIO; | |
import java.awt.image.BufferedImage; | |
import java.io.*; | |
import java.lang.*; | |
public class Convert { | |
public static void main(String[] args) { | |
boolean preview = false; | |
if (args.length >0 && args[0].equals("p")) { | |
preview=true; |