Skip to content

Commit

Permalink
update addCtxOutlines
Browse files Browse the repository at this point in the history
  • Loading branch information
nsteinme committed Dec 19, 2019
1 parent edbbeae commit 4fa077d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Binary file removed .DS_Store
Binary file not shown.
14 changes: 8 additions & 6 deletions Browsing Functions/addAllenCtxOutlines.m
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@


function addAllenCtxOutlines(bregma, lambda, lineColor)
function addAllenCtxOutlines(bregma, lambda, lineColor, pixSize)
% to get bregma/lambda, do:
% >> figure; imagesc(myImg); axis image;
% then use the cursor to click on bregma, then swap the coords (if cursor
% says X=xx and Y=yy, then bregma is [yy, xx]).
% or leave blank to get prompted with ginput.
% lambda just needs to be on the midline posterior to bregma.

if isempty(bregma)
fprintf(1, 'click bregma\n');
[x,y] = ginput(1);
bregma = [y,x];
bregma = [y,x]
fprintf(1, 'click lambda\n');
[x,y] = ginput(1);
lambda = [y,x];
lambda = [y,x]
end

apDir = lambda-bregma; apDir = apDir./norm(apDir);

pixSize = 0.0217; % mm/pix. This is for PCO edge 5.5 with 0.6x mag (as kilotrode)
if nargin<4
pixSize = 0.0217; % mm/pix. This is for PCO edge 5.5 with 0.6x mag (as kilotrode)
end

ccfbregma = allenCCFbregma()/100/pixSize;

load('J:\allen\ctxOutlines.mat');

load(fullfile(fileparts(mfilename('fullpath')), 'ctxOutlines.mat'));

hold on;
for q = 1:numel(coords) % coords is from ctxOutlines.mat
Expand Down

0 comments on commit 4fa077d

Please sign in to comment.