-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added clist gneration counters and progenitor fields. Added segment d…
…eletion and creation features to Edit Segments.
- Loading branch information
Paul Wiggins
committed
Jul 24, 2018
1 parent
cc261ee
commit 182925d
Showing
9 changed files
with
490 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function x = intFixPos( x, ss ) | ||
|
||
|
||
if x(1) < 1 | ||
x(1) = 1; | ||
elseif x(1) > ss(2) | ||
x(1) = ss(2); | ||
end | ||
|
||
if x(2) < 1 | ||
x(2) = 1; | ||
elseif x(2) > ss(1) | ||
x(2) = ss(1); | ||
end | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
function mask = intRemovePillars(phase, CONST) | ||
|
||
|
||
|
||
if exist( 'CONST' ) && ~isempty( CONST ) && ... | ||
isfield( CONST.superSeggerOpti, 'remove_pillars' ) | ||
radius = CONST.superSeggerOpti.remove_pillars.radius; | ||
cut = CONST.superSeggerOpti.remove_pillars.cut; | ||
Area_Cut = CONST.superSeggerOpti.remove_pillars.Area_Cut; | ||
debug = CONST.superSeggerOpti.remove_pillars.debug; | ||
|
||
else | ||
radius = 2; | ||
cut = 0.05; | ||
Area_Cut = 700; | ||
debug = false; | ||
end | ||
|
||
|
||
[~,~,~,D] = curveFilter( double(phase), radius ); | ||
|
||
D = D/max(D(:)); | ||
|
||
|
||
D(D<cut) = cut; | ||
|
||
ws = logical(watershed(D)); | ||
|
||
lab = bwlabel(ws); | ||
|
||
props = regionprops( lab, {'Area'} ); | ||
|
||
A = [props.Area]; | ||
|
||
|
||
|
||
mask = ismember( lab, find(A<Area_Cut) ); | ||
|
||
se = strel('disk',1); | ||
mask = imdilate(mask,se); | ||
|
||
|
||
if debug | ||
figure( 'name', ['intRemovePillars: Area cut: A = ',num2str(Area_Cut)] ); | ||
clf; | ||
comp( {phase}, {lab,'label',A} ); | ||
drawnow; | ||
|
||
|
||
|
||
figure( 'name', ['intRemovePillars: Masked region' ] ); | ||
clf; | ||
comp( {phase}, {mask,'r',.5} ); | ||
drawnow; | ||
end | ||
|
||
|
||
|
||
|
||
|
||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
182925d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Paul, Thanks for the code to Remove CellASIC pillars. Could also provide default values for CONST:
CONST.superSeggerOpti.remove_pillars.flag = 1;
CONST.superSeggerOpti.remove_pillars.radius = ?;
CONST.superSeggerOpti.remove_pillars.cut = ?;
CONST.superSeggerOpti.remove_pillars.Area_Cut = ?;
CONST.superSeggerOpti.remove_pillars.debug = ?;
Natalia
182925d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
182925d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
182925d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Paul,
Thanks a lot. It works for our images.