Commit 73e8d894 authored by actb's avatar actb

Merge branch 'msLoG'

parents e6b28637 b9137e5e
......@@ -127,8 +127,13 @@ Distance.movieDistance(conn,CONSTANTS);
ljsLog('finished batch segmentation -- launching resegAndTrack');
if bTrack
if ispc
nodecmd='node.exe ';
else
nodecmd='node ';
end
rnt=getLeverjsPath('resegAndTrackDataset.js');
system(['node.exe ' rnt ' "' ...
system([nodecmd rnt ' "' ...
strDB '" resegAll 1 "{}" ' ]);
end
elapsedTime=toc(d0);
......
% shut off ui elements
UISERVER='http://localhost:4444/'
targetCell=3
panelName='h2b';
targetCell=7
panelName='erk_7';
outfolder='moviePanels';
if ~exist(outfolder,'dir')
mkdir(outfolder)
......@@ -16,14 +16,14 @@ offState='none';
onState='';
ui.sidebar=offState;
ui.webToolbar=offState;
ui.logoDiv=onState;
ui.clockButton=onState;
ui.logoDiv=offState;
ui.clockButton=offState;
webwrite([UISERVER 'ui'],weboptions('MediaType','application/json'),ui);
options=weboptions();
options.Timeout=60;
strDB='C:\z\leverjs\Olivier\20190226_4d_wt_PI3K_wt_stack_S01.LEVER';
strDB='C:\z\leverjs\Olivier\newSeg\20190226_4d_wt_PI3K_wt_stack_S01.LEVER';
[conn,CONSTANTS]=openDB(strDB);
cmd=['select time,centroid from tblCells where trackID=' num2str(targetCell)];
qTarget=fetch(conn,cmd);
......
......@@ -3,16 +3,21 @@ movieFile='20190226_4d_wt_PI3K_wt_stack_S01.mp4';
v=VideoWriter(movieFile,'MPEG-4');
v.FrameRate=15;
open(v)
targetTracks=[4,7];
strTargetTracks=jsonencode(targetTracks);
if length(targetTracks)>1
strTargetTracks(1)='(';
strTargetTracks(end)=')';
end
% feature graph
cmd=['select tblCells.time,tblCells.trackID,tblCellFeatures.* from tblCellFeatures inner join tblCells on tblCellFeatures.cellID '...
'=tblCells.cellID where tblCells.trackID=' num2str(targetCell)]
'=tblCells.cellID where tblCells.trackID in ' strTargetTracks];
q=fetch(conn,cmd);
% tags={'seg_nobright','noseg','green_nobright','red_nobright','lineage'}
% tags={'dolly_seg','dolly_noSeg'}
tags={'h2b','erk'}
% tags={'dolly_seg','dolly_noSeg'}
tags={'h2b','fx','erk_4','erk_7'}
movie_frames='./moviePanels';
flist=dir(fullfile(movie_frames,[tags{1} '_*.tif']));
......@@ -26,27 +31,21 @@ for time=1:length(flist)
imx{i}=imread(fullfile(movie_frames,[tags{i} '_' num2str(time) '.tif']));
end
imx{2}=imresize(imx{2},size(imx{1},1)/size(imx{2},1));
implot_4=MovieMaker.getndbPlot(q,4,time,CONSTANTS.imageData.NumberOfFrames);
implot_4=imresize(implot_4,size(imx{1},1)./size(implot_4,1));
implot_7=MovieMaker.getndbPlot(q,7,time,CONSTANTS.imageData.NumberOfFrames);
implot_7=imresize(implot_7,size(imx{1},1)./size(implot_7,1));
figure(5);clf;plot(q.ndbErk,q.time,'linewidth',2);hold on;set(gcf,'color','w');axis ij;
axis on;
set(gca,'yaxislocation','right')
xlabel('Cell 3 NDB ERK','fontsize',16)
ylabel('time','fontsize',16)
plot([0,1],[time,time],'-r','linewidth',2);
ylim([1,CONSTANTS.imageData.NumberOfFrames])
imPlot=getframe(gcf);
imPlot=imPlot.cdata;
imPlot=imresize(imPlot,size(imx{1},1)/size(imPlot,1));
border=255*ones(size(imx{1},1),5,3);
imCombined=[ imx{1} border imx{2} imPlot];
%
% borderH=255*ones(5,2*size(imx{1},2)+5,3);
% imCombined=[ imx{1} border imx{2}; borderH; imx{3} border imx{4} ];
% imLineage=imresize(imx{end},size(imCombined,1)/size(imx{end},1));
% imCombined=[imCombined imLineage];
border=255*ones(size(imx{1},1),5,3);
imrow1=[ imx{1} border imx{3} border implot_4];
imrow2=[ imx{2} border imx{4} border implot_7];
hborder=255*ones(5,size(imrow1,2),3);
imCombined=[imrow1;hborder;imrow2];
%
% borderH=255*ones(5,2*size(imx{1},2)+5,3);
% imCombined=[ imx{1} border imx{2}; borderH; imx{3} border imx{4} ];
% imLineage=imresize(imx{end},size(imCombined,1)/size(imx{end},1));
% imCombined=[imCombined imLineage];
% x dim is biggeset -- force that to 1920, preserve aspect ratio
imCombined=imresize(imCombined, 1920/size(imCombined,2));
writeVideo(v,imCombined);
......@@ -54,5 +53,4 @@ for time=1:length(flist)
end
close(v)
\ No newline at end of file
function imPlot=getndbPlot(q,trackID,time,nFrames)
figure(5);clf;plot(q.ndbErk(q.trackID==trackID),q.time(q.trackID==trackID),'linewidth',2);
hold on;set(gcf,'color','w');axis ij;
axis on;
set(gca,'yaxislocation','right')
xlabel(['Cell ' num2str(trackID) ' NDB ERK'],'fontsize',16)
ylabel('time','fontsize',16)
plot([0,1],[time,time],'-r','linewidth',2);
ylim([1,nFrames])
imPlot=getframe(gcf);
imPlot=imPlot.cdata;
if exist('sz','var')
imPlot=imresize(imPlot,sz);
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment