Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DeProj
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IAH public
DeProj
Commits
3678b676
Commit
3678b676
authored
5 years ago
by
Sebastien Herbert
Browse files
Options
Downloads
Patches
Plain Diff
Deleting old code
parent
fcbc7b1c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MainScripts/findContour.m
+0
-81
0 additions, 81 deletions
MainScripts/findContour.m
with
0 additions
and
81 deletions
MainScripts/findContour.m
+
0
−
81
View file @
3678b676
...
@@ -18,87 +18,6 @@ function [boundaries, cellIdx] = findContour( labelIm, PARAMS )
...
@@ -18,87 +18,6 @@ function [boundaries, cellIdx] = findContour( labelIm, PARAMS )
fprintf
(
'Recreating the cellular contours\n'
);
fprintf
(
'Recreating the cellular contours\n'
);
%% %% Create a temporary binary image of each individual cell before => Old version from Bellaiche data
% % applying a boundary finding method == OLD VERSION
% for bioCell = 1:length(contour2Dpos) % for all cells
% clear miniContour miniImg
% contour2Dpos{bioCell} = round(contour2Dpos{bioCell}/PARAMS.imSettings.latPixSize); % rescale from µm to pix for image creation
% miniContour=[contour2Dpos{bioCell}(:,1) contour2Dpos{bioCell}(:,2)]-(min(contour2Dpos{bioCell})-1);
% miniImg = zeros(max(miniContour(:,1)),max(miniContour(:,2))); % columns and lines are switched
% for i = 1:size(miniContour,1)
% miniImg(miniContour(i,1),miniContour(i,2))=1;
% end
%
% % append 1 layer in all directions to avoid border effect
% % could be merged with the previous paragraph drawing the contour but simpler like this
% miniImg = [zeros(1,size(miniImg,2)) ; miniImg ; zeros(1,size(miniImg,2))];
% miniImg = [zeros(size(miniImg,1),1) , miniImg , zeros(size(miniImg,1),1)];
% % figure;imshow(testIm)
%
% % Fill contour
% miniImg = imfill(miniImg,'holes');
%
% switch bmethod
%
% case 'msquare'
% % Find contour
% [cellContour2D{bioCell}.Lines,cellContour2D{bioCell}.Vertices]=isocontour(miniImg,0.5);
% % Replace in full image % -1 for start table at 1 and -1 for
% % appened lines
% cellContour2D{bioCell}.Vertices = cellContour2D{bioCell}.Vertices+...
% min(contour2Dpos{bioCell})-2; % replace in full image % -1 for start table at 1 and -1 for appened lines
%
% case 'msquareImproved'
% % Enlarge and erode
% miniImg = imresize(miniImg, 2);
% selem = ones(3,3); %// square, 8-Negihbours
% miniImg = imerode(miniImg, selem);
% % Find contour
% [cellContour2D{bioCell}.Lines,cellContour2D{bioCell}.Vertices]=isocontour(miniImg,0.5);
% % Replace in full image % -1 for start table at 1 and -1 for
% % appened lines and /2 for the enlargment
% cellContour2D.Vertices = (cellContour2D{bioCell}.Vertices)/2-2+...
% min(contour2Dpos{bioCell});
%
% case 'bwboundary'
% [boundaries,~] = bwboundaries(miniImg,'noholes'); % simpler call is boundaries = bwboundaries(miniImg,'noholes');
% cellContour2D{bioCell}.cellCt = boundaries{1}+...
% min(contour2Dpos{bioCell})-2; % replace in full image % -1 for start table at 1 and -1 for appened lines
%
% case 'mask2poly'
% polyCell=mask2poly(miniImg,'Inner','MINDIST');
% % switch columns 1 and 2
% polyCell(:,3) = polyCell(:,1);
% polyCell(:,1) = polyCell(:,2);
% polyCell(:,2) = polyCell(:,3);
% polyCell(:,3) = [];
% cellContour2D{bioCell}.cellCt = polyCell+...
% min(contour2Dpos{bioCell})-2; % replace in full image % -1 for start table at 1 and -1 for appened lines
%
% otherwise
% fprintf('Error: Unknown contour method: %s\n', bmethod);
% end
%
% switch bmethod % this step to reorganize the msquare output
% case {'msquare','msquareImproved'}
% Ori = 1;
% tempVert = zeros(length(cellContour2D{bioCell}.Lines),2);
% for lines = 1:length(cellContour2D{bioCell}.Lines)
% tempVert(lines,:) = cellContour2D{bioCell}.Vertices(cellContour2D{bioCell}.Lines(Ori,1),:);
% Dest = cellContour2D{bioCell}.Lines(Ori,2);
% if length(find(cellContour2D{bioCell}.Lines(:,1)==Dest))~=1
% fprintf('Error: a contour line is open. Check cell %d at Origin = %d\n',...
% bioCell,Dest);
% break
% end
% Ori = find(cellContour2D{bioCell}.Lines(:,1)==Dest);
% end
% cellContour2D{bioCell}.cellCt = tempVert;
% clear tempVert
% end
%%
% Find all the objects in the image
% Find all the objects in the image
cc
=
bwconncomp
(
labelIm
,
4
);
cc
=
bwconncomp
(
labelIm
,
4
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment