Skip to content

Commit

Permalink
Fixing mistakenly committed code.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmperry committed Jun 5, 2014
1 parent c3b7d9e commit d1c88b2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
3 changes: 1 addition & 2 deletions mrAnatomy/mrRx/rxAlign.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% on mrVista sessions.
%
% The argument can either be the path to a mrVista
% session directory, or a view from an existing
% session directory, or a view from an existing
% directory. If omitted, it assumes you're already
% in the session directory and starts up a hidden
% inplane view.
Expand Down Expand Up @@ -42,7 +42,6 @@
end
anat = viewGet(inplane,'Anatomy Data');
ipVoxelSize = viewGet(inplane,'Voxel Size');
keyboard

vol = double(vol);
anat = double(anat);
Expand Down
27 changes: 13 additions & 14 deletions mrDiffusion/preprocess/dtiRawFitTensorMex.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
% because they produce very human-friendly numbers (eg. free diffusion of
% water is 3 micron^2/msec). Your adcUnits are determined by the units in
% which your bvals are specified. (adcUnits = 1/bvalUnits) For our GE
% Bammer/Hedehus DTI sequence, the native bvalUnits are sec/mm^2. However,
% Bammer/Hedehus DTI sequence, the native bvalUnits are sec/mm^2. However,
% we usually divide the bval by 1000, producing msec/micrometer^2 units.
%
% Currently, the only supported fitMethod is 'ls' (linear least-squares).
Expand All @@ -25,7 +25,7 @@
%
% Currently, specifying the bootstrap causes the resulting dt6 file to have
% the following additional variables:
%
%
% faStd, mdStd: standard deviations on fa and mean diffusivity.
%
% pddDisp: dispersion of PDD axes (based on the Watson) in degrees of
Expand Down Expand Up @@ -55,11 +55,11 @@
% 2009.11.15 AJS: Added bCalcBrainMask flag so that I don't throw away
% voxels just because they don't fit the brain mask parameters... this is
% particularly important for phantom data

if(~exist('dwRaw','var')||isempty(dwRaw))
[f,p] = uigetfile({'*.nii.gz;*.nii';'*.*'}, 'Select the raw DW NIFTI dataset...');
if(isnumeric(f)) error('User cancelled.'); end
dwRaw = fullfile(p,f);
dwRaw = fullfile(p,f);
end
if(ischar(dwRaw))
% dwRaw can be a path to the file or the file itself
Expand Down Expand Up @@ -94,7 +94,7 @@
end

% If clobber is passed in as 1 and the processing has been done previously
% overwrite the directory that contains the data.
% overwrite the directory that contains the data.
if(~exist('clobber','var')) || isempty('clobber')
clobber = 0;
end
Expand All @@ -121,8 +121,8 @@
%binDirName = fullfile(p,f);
end
if (exist(dt6FileName,'file') || (exist(binDirName,'dir') && ~isempty(dir(fullfile(binDirName,'*.nii*'))))) && clobber == -1
disp('Tensor fitting already completed and "Clobber" is set to "false". Exiting tensor fit.');
return
disp('Tensor fitting already completed and "Clobber" is set to "false". Exiting tensor fit.');
return
end
end
if(~exist(binDirName,'dir'))
Expand Down Expand Up @@ -156,7 +156,7 @@
else
bs.permutations = dtiBootGetPermutations(nvols, bs.n);
end

if(~exist('fitMethod','var')||isempty(fitMethod))
fitMethod = 'ls';
end
Expand Down Expand Up @@ -187,8 +187,7 @@
minD = min(d(d(:)>0));

%% Compute a brain mask
%
keyboard
%
disp('Computing brain mask from average b0...');
b0 = mean(d(:,:,:,bvals<=0.01),4);
try
Expand Down Expand Up @@ -221,7 +220,7 @@
b0 = int16(round(b0));

%% Fit the tensor maps.
%
%
disp('Fitting the tensor model...');
% Compute the X-matrix (this will be inverted for the tensor fit)
% Each row is of the form:
Expand Down Expand Up @@ -255,7 +254,7 @@
wmProb(~brainMask) = 0;
wmProb = uint8(round(wmProb*255));
%wmMask = wmProb>0.5;
%wmMask = uint8(dtiCleanImageMask(wmMask,0,0));
%wmMask = uint8(dtiCleanImageMask(wmMask,0,0));

%% Save all results
%
Expand Down Expand Up @@ -302,7 +301,7 @@
% NIFTI convention is for the 6 unique tensor elements stored in the 5th
% dim in lower-triangular, row-order (Dxx Dxy Dyy Dxz Dyz Dzz). NIFTI
% reserves the 4th dim for time, so in the case of a time-invatiant tensor,
% we just leave a singleton 4th dim. Our own internal convention is
% we just leave a singleton 4th dim. Our own internal convention is
% [Dxx, Dyy, Dzz, Dxy, Dxz, Dyz], so we use the code below to convert to
% the NIFTI order and dt6=squeeze(ni.data(:,:,:,1,[1 3 6 2 4 5])); to get
% back to our convention. FOr reference- the 3x3 tensor matrix is:
Expand All @@ -319,7 +318,7 @@
files.mdStd = fullfile(pBinDir,'mdStd.nii.gz');
files.pddDisp = fullfile(pBinDir,'pddDispersion.nii.gz');
dtiWriteNiftiWrapper(single(faStd), xformToAcPc, fullfile(ppBinDir,files.faStd), 1, desc, 'FA stdev');
dtiWriteNiftiWrapper(single(mdStd), xformToAcPc, fullfile(ppBinDir,files.mdStd), 1, desc, 'MD stdev');
dtiWriteNiftiWrapper(single(mdStd), xformToAcPc, fullfile(ppBinDir,files.mdStd), 1, desc, 'MD stdev');
dtiWriteNiftiWrapper(pddDisp, xformToAcPc, fullfile(ppBinDir,files.pddDisp), 1, desc, 'PDD disp (deg)');
end
save(dt6FileName,'adcUnits','params','files');
Expand Down
6 changes: 3 additions & 3 deletions mrMesh/mrm/mrmStart.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
case {'GLNXA64'}
% check whether we are using fedora, and if so, what version
[s,r]=unix('cat /proc/version | grep fc14.x86_64'); %#ok<*ASGLU>
%[t v] = unix('cat /proc/version | grep centos'); %#ok<*ASGLU>
[t v] = unix('cat /proc/version | grep centos'); %#ok<*ASGLU>
[x y] = unix('cat /proc/version | grep Ubuntu'); %#ok<*ASGLU>
if ~isempty(strfind(r,'fc14.x86_64')),
srvPath = which('mrMeshSrv_FC14.glxa64');
% elseif ~isempty(strfind(v,'centos'))
% srvPath = which('mrMeshSrv_Centos.glxa64');
elseif ~isempty(strfind(v,'centos'))
srvPath = which('mrMeshSrv_Centos.glxa64');
elseif ~isempty(strfind(y,'Ubuntu'))
disp('Ubuntu system detected: Loading mrMeshSrv for Ubuntu 12.04')
srvPath = which('mrMeshSrv_Ubuntu1204.glxa64');
Expand Down
2 changes: 1 addition & 1 deletion mrMesh/tcpToolbox/pnet_readMsg.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

% Don't wait forever before aborting:
if ispc, pnet(con,'setreadtimeout',4);
else pnet(con,'setreadtimeout',6);
else pnet(con,'setreadtimeout',2);
end

% The header and trailer are each 8 bytes long
Expand Down

0 comments on commit d1c88b2

Please sign in to comment.