Skip to content
Snippets Groups Projects
Commit c00749cf authored by ac_fx's avatar ac_fx
Browse files

added generic param getter

parent 9362e935
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,8 @@ ljsctc.gtConfig='GT';
gtRoot=[ljsctc.rawImagePath(1:strfind(ljsctc.rawImagePath,baseName)+length(baseName))];
gtTraining=[gtRoot 'training/**/man_seg*.tif'];
ljsctc.gtTrainingPath=gtTraining;
% verify training path with next line...
% fprintf(1,'ljsctc found %d training images\n',length(dir(ljsctc.gtTrainingPath)));
if strcmp(trainOrChallenge,'training')
% this is passed to CTC scoring code
ljsctc.gtEvalPath = [gtRoot 'training/' datasetSpecifier '/' movieID '_GT'];
......
% % see comments in get_ljsctc
% % here we provide a generic version, based on the following file structure:
% % -----------------------------------------------------------------------------------------
% % - ROOT/Fluo-C3DL-MDA231
% % > 01
% · images...
% > 01_GT
% - SEG
% · images...
% - TRA
% · images...
% > 01_ST
% - SEG
% · images...
% - SEG_org
% · images...
% > 02
% · images...
% > 02_GT
% - SEG
% · images...
% - TRA
% · images...
% > 02_ST
% - SEG
% · images...
% - SEG_org
% · images...
% % -----------------------------------------------------------------------------------------
%
% %
function ljsctc=get_ljsctc_generic(ROOT,dsName,movieID)
ljsctc = [];
ljsctc.outPath = './output';
ljsctc.expName=[dsName '_' movieID]; % you could add 'training' or 'challenge' here if you want
% to omit a field, set it to []. rawImagePath,outPath,segParams expName, are minimum
% required param set
ljsctc.rawImagePath = fullfile(ROOT,dsName,movieID);
% THIS IS IMPORTANT! leverjs uses physical-based measurements. you must set
% the correct pixel (voxel) physical size...(always a 3 vector). NOTE that
% some of the pixel physical sizes are encoded in the supplied tiff
% metadata incorrectly! so, the ones we use are set manually from the ctc
% website
% the preferred way to get segparams. if you set segParams, we use that
% baseName should be short enough to specify a single movie, e.g. Fluo-C3DL-MDA231
baseName=dsName;
[sp,pixelSize]=getSegParams(baseName); % from the manual tuned cache
if ~isempty(sp)
ljsctc.segParams = sp;
ljsctc.pixelPhysicalSize=pixelSize;
else
% we didn't find the segparams and pixelsize. we will learn segparams
% automatically (likely not as well as the manual param set). pixelSize
% is important though. you should get that value from the microscope. it's
% given for each dataset on the ctc website. please be sure to get that
% correctly. our default is to read it from the raw image tiffs, but
% for some of the ctc movies that value is set incorrectly!
%
end
% which ground truth to use, and where to write exported output
ljsctc.gtConfig='GT';
% if no ljsctc.segparams, and no match in the cached settings list, train a new
% classifier to predict segParams. we'll use all the tiffs returned by this
% next path string. try e.g. dir(ljsctc.gtTrainingPath) to verify it's the
% man_seg tiffs
% e.g. for ST ground truth:
ljsctc.gtTrainingPath=fullfile(ROOT,dsName,'**/*_ST/man_seg*.tif');
% if you don't want to run the training:
% ljsctc.gtTrainingPath=[];
% if you want to check the training path:
fprintf(1,'ljsctc found %d training images\n',length(dir(ljsctc.gtTrainingPath)));
bEvalTrainingMovie=false;
if bEvalTrainingMovie
% this is passed to CTC scoring code
% only set this if you want to have the CTC SEG,TRA and DET scores
% generated (i.e. if you have a training movie
ljsctc.gtEvalPath = fullfile(ROOT,dsName, [movieID '_GT']);
else
% this is passed to CTC scoring code
ljsctc.gtEvalPath = [];
end
% used for e.g. TRIF,TRIC,DRO datasets where we don't export full movie
% (we still process whole thing though)
% for this file tree above, that would be
% e.g. ljsctc.gtConstraintPath = fullfile(ROOT,dsName, [movieID '_GT']);
%
ljsctc.gtConstraintPath = [];
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment