-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Apr 2010 $Rev$ $Date$ | ||
% Apr 2010 | ||
|
||
% Loop over # of tracks (slow...any faster way?) | ||
for iTrk=1:length(tracks) | ||
|
@@ -42,4 +42,4 @@ | |
% Update header | ||
n_scalars_old = header.n_scalars; | ||
header.n_scalars = n_scalars_old + 1; | ||
header.scalar_name(n_scalars_old + 1,1:size(name,2)) = name; | ||
header.scalar_name(n_scalars_old + 1,1:size(name,2)) = name; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Sept 2010 $Rev$ $Date$ | ||
% Sept 2010 | ||
|
||
%% Check and format input arguments | ||
if nargin < 6 || isempty(starting_pts_in) | ||
|
@@ -158,4 +158,4 @@ | |
export(starting_pts_out, 'file', fullfile(outDir, 'starting_pts_out.txt')) | ||
|
||
close all | ||
fclose all; | ||
fclose all; |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Apr 2010 $Rev$ $Date$ | ||
% Apr 2010 | ||
|
||
if nargin < 5, slices = []; end | ||
if nargin < 4, volume = []; end | ||
|
@@ -93,4 +93,4 @@ | |
end | ||
end | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Apr 2010 $Rev$ $Date$ | ||
% Apr 2010 | ||
|
||
if nargin<3, spacing = []; end | ||
if nargin<2 || isempty(nPoints_new), nPoints_new = 100; end | ||
|
@@ -83,4 +83,4 @@ | |
[~, ind] = min(dists); | ||
tracks_interp(iTrk).tiePoint = ind; | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Apr 2010 $Rev$ $Date$ | ||
% Apr 2010 | ||
|
||
% Put in matrix form if possible | ||
if isstruct(tracks) && length(unique(cat(tracks.nPoints)))==1 | ||
|
@@ -40,4 +40,4 @@ | |
for i=1:length(tracks) | ||
lengths(i) = sum(sqrt(squeeze(sum((tracks(i).matrix(2:end,1:3) - tracks(i).matrix(1:(end-1),1:3)).^2, 2))), 1); | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Apr 2010 $Rev$ $Date$ | ||
% Apr 2010 | ||
|
||
scalars = zeros(tracks(1).nPoints, header.n_count, header.n_scalars); | ||
|
||
|
@@ -43,4 +43,4 @@ | |
end | ||
|
||
scalar_mean = squeeze(nanmean(scalars, 2)); | ||
scalar_sd = squeeze(nanstd(scalars, 0, 2)); | ||
scalar_sd = squeeze(nanstd(scalars, 0, 2)); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ function trk_plot(header,tracks,volume,slices) | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Mar 2010 $Rev$ $Date$ | ||
% Mar 2010 | ||
|
||
% Input argument defaults | ||
if nargin < 4, slices = []; end | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Mar 2010 $Rev$ $Date$ | ||
% Mar 2010 | ||
|
||
% Parse in header | ||
fid = fopen(filePath, 'r'); | ||
|
@@ -80,4 +80,4 @@ | |
header.swap_zx = fread(fid, 1, 'uchar'); | ||
header.n_count = fread(fid, 1, 'int')'; | ||
header.version = fread(fid, 1, 'int')'; | ||
header.hdr_size = fread(fid, 1, 'int')'; | ||
header.hdr_size = fread(fid, 1, 'int')'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Mar 2010 $Rev$ $Date$ | ||
% Mar 2010 | ||
|
||
if nargin < 2, tiePoint = []; end | ||
|
||
|
@@ -69,4 +69,4 @@ | |
if tiePoint | ||
[tracks_out.tiePoint] = deal(tiePoint); | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Mar 2010 $Rev$ $Date$ | ||
% Mar 2010 | ||
|
||
% Input argument defaults | ||
if nargin < 4 || isempty(method), method = 'quick'; end | ||
|
@@ -64,4 +64,4 @@ | |
meanInt = nanmean(ints(ints>0)); | ||
stdInt = nanstd(ints(ints>0)); | ||
nVox = length(unique(ceil(vert ./ repmat(header.voxel_size, size(vert,1),1)), 'rows')); | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ function trk_stats_overlay(exptDir,subDir,tract_info,corrected) | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Sept 2010 $Rev$ $Date$ | ||
% Sept 2010 | ||
|
||
%% Load files and setup | ||
% Load the statistical results dataset from R | ||
|
@@ -91,4 +91,4 @@ function trk_stats_overlay(exptDir,subDir,tract_info,corrected) | |
|
||
% Save the results for final visualization in TrackVis | ||
savePath = fullfile(exptDir, 'results.trk'); | ||
trk_write(header_mean_sc, track_mean_sc_str, savePath) | ||
trk_write(header_mean_sc, track_mean_sc_str, savePath) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Mar 2010 $Rev$ $Date$ | ||
% Mar 2010 | ||
|
||
% Input argument defaults | ||
if nargin < 4 || isempty(method), method = 'quick'; end | ||
|
@@ -58,4 +58,4 @@ | |
% Calculate descriptive statistics | ||
meanInt = mean(ints(ints>0)); | ||
stdInt = std(ints(ints>0)); | ||
nVox = length(unique(vert_vox_rnd, 'rows')); | ||
nVox = length(unique(vert_vox_rnd, 'rows')); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ function trk_write(header,tracks,savePath) | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Apr 2010 $Rev$ $Date$ | ||
% Apr 2010 | ||
|
||
fid = fopen(savePath, 'w'); | ||
|
||
|
@@ -66,4 +66,4 @@ function trk_write(header,tracks,savePath) | |
end | ||
end | ||
|
||
fclose(fid); | ||
fclose(fid); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ function trk_write_ascii(tracks,filePath) | |
|
||
% Author: John Colby ([email protected]) | ||
% UCLA Developmental Cognitive Neuroimaging Group (Sowell Lab) | ||
% Oct 2010 $Rev$ $Date$ | ||
% Oct 2010 | ||
|
||
if nargin < 2 || isempty(filePath); filePath = fullfile(pwd, 'tracks.txt'); end | ||
if nargin < 1 || isempty(tracks); error('Must supply tracks to write.'); end | ||
|
@@ -45,4 +45,4 @@ function trk_write_ascii(tracks,filePath) | |
fprintf(fid, 'Streamline\tPoint\tx\ty\tz\tFA\n'); | ||
fprintf(fid, '%i\t%i\t%f\t%f\t%f\t%0.4f\n', permute(outmat,[2 1 3])); | ||
|
||
fclose(fid); | ||
fclose(fid); |