Skip to content

Commit ca1f76f

Browse files
committed
latest version copied from scixminer repo
1 parent b1e0a3e commit ca1f76f

11 files changed

+413
-426
lines changed

Source/callback_livecellminer_import_project.m

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,37 +52,40 @@
5252
inputFiles = dir([inputFolder '*.tif']);
5353
numInputFiles = length(inputFiles);
5454

55-
parfor f=1:numInputFiles
56-
57-
[~, ~, ext] = fileparts(inputFiles(f).name);
58-
currentOutputFile = [parameters.detectionFolder strrep(inputFiles(f).name, ext, parameters.detectionExtension)];
59-
60-
if (isfile(currentOutputFile))
61-
continue;
62-
end
63-
64-
%% specify the XPIWIT command
65-
XPIWITCommand = ['./XPIWIT.sh --output "' outputFolderSeeds '" --input "0, ' inputFolder inputFiles(f).name ', 2, float" --xml "' parameters.XPIWITDetectionPipeline '" --seed 0 --lockfile off --subfolder "filterid, filtername" --outputformat "imagename, filtername" --end'];
55+
%% parfor seems to skip files occasionally, thus perform two consistency runs to be sure all files are present.
56+
for c=1:3
57+
parfor f=1:numInputFiles
58+
59+
[~, ~, ext] = fileparts(inputFiles(f).name);
60+
currentOutputFile = [parameters.detectionFolder strrep(inputFiles(f).name, ext, parameters.detectionExtension)];
61+
62+
if (isfile(currentOutputFile))
63+
continue;
64+
end
6665

67-
%% replace slashes by backslashes for windows systems
68-
if (ispc == true)
69-
XPIWITCommand = strrep(XPIWITCommand, './XPIWIT.sh', 'XPIWIT.exe');
70-
XPIWITCommand = strrep(XPIWITCommand, '\', '/');
66+
%% specify the XPIWIT command
67+
XPIWITCommand = ['./XPIWIT.sh --output "' outputFolderSeeds '" --input "0, ' inputFolder inputFiles(f).name ', 2, float" --xml "' parameters.XPIWITDetectionPipeline '" --seed 0 --lockfile off --subfolder "filterid, filtername" --outputformat "imagename, filtername" --end'];
68+
69+
%% replace slashes by backslashes for windows systems
70+
if (ispc == true)
71+
XPIWITCommand = strrep(XPIWITCommand, './XPIWIT.sh', 'XPIWIT.exe');
72+
XPIWITCommand = strrep(XPIWITCommand, '\', '/');
73+
end
74+
system(XPIWITCommand);
7175
end
72-
system(XPIWITCommand);
7376
end
74-
7577
cd(oldPath);
7678

7779
%% perform cell pose segmentation (optional)
7880
if (parameters.useCellpose == true)
7981
parameters.outputFolderCellPose = [outputFolder 'Cellpose/'];
8082
outputDataExists = true;
8183
if (~isfolder(parameters.outputFolderCellPose))
82-
mkdir(parameters.outputFolderCellPose);
84+
mkdir(parameters.outputFolderCellPose);
85+
outputDataExists = false;
8386
else
8487
%% check if output images already exist
85-
inputFiles = dir([inputFolder '*.tif']);
88+
inputFiles = dir([inputFolder parameters.channelFilter parameters.channelFilter '*.tif']);
8689
outputFiles = dir([parameters.outputFolderCellPose '*_cp_masks.png']);
8790
numInputFiles = length(inputFiles);
8891
numOutputFiles = length(outputFiles);

Source/callback_livecellminer_perform_auto_sync.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
useClassicalSync = ~isempty(strfind(syncMethod, 'Classical'));
3333
useAutoRejection = ~isempty(strfind(syncMethod, 'Auto Rejection'));
3434

35-
if (useAutoRejection == true)
36-
37-
end
3835

3936
%% path to the pretrained model
4037
if (useAutoRejection == true)

Source/callback_livecellminer_perform_backwards_tracking.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
[~, nnDistances] = knnsearch(kdtree, validPositions(:,3:4), 'K', 8);
4848
distances = mean(nnDistances(:,3:end), 2);
4949

50-
currentClusterCutoff = min(0.33 * mean(distances), parameters.maxRadius);
50+
%currentClusterCutoff = min(0.33 * mean(distances), parameters.maxRadius);
51+
currentClusterCutoff = 0.5 * mean(distances);
5152
else
5253
currentClusterCutoff = clusterCutoff;
5354
end

Source/callback_livecellminer_perform_detection_and_tracking.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
%[d_orgs_new] = PerformTracking(d_orgs, settings);
4242
[d_orgs] = callback_livecellminer_perform_backwards_tracking(d_orgs, parameters);
4343

44-
save([parameters.outputFolder 'trackingProject.prjz'], '-mat', 'd_orgs');
44+
save([parameters.outputFolder 'trackingProject.prjz'], '-mat', 'd_orgs', '-v7.3');
4545

4646
%% plot the tracking results
4747
%PlotTrackingResults(d_orgs, settings);

0 commit comments

Comments
 (0)