Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
graintracking
DCT
Commits
969bb255
Commit
969bb255
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Grain segmentation: added logic that uses the reconstruction std-dev to reduce artifacts
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
fe1879c0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
4_grains/GtThreshold.m
+23
-0
23 additions, 0 deletions
4_grains/GtThreshold.m
5_reconstruction/gtRecDefaultParameters.m
+2
-1
2 additions, 1 deletion
5_reconstruction/gtRecDefaultParameters.m
with
25 additions
and
1 deletion
4_grains/GtThreshold.m
+
23
−
0
View file @
969bb255
...
...
@@ -292,6 +292,25 @@ classdef GtThreshold < handle
if
(
is_6D
)
grain_out
.
vol
=
grain_rec
.
ODF6D
.
intensity
;
grain_out
.
shift
=
grain_rec
.
ODF6D
.
shift
;
par_thr
=
obj
.
getThrParams
();
if
(
par_thr
.
weight_by_stddev
...
&&
isfield
(
grain_rec
.
ODF6D
,
'voxels_stddev_R_vectors'
))
% Let's use the std-dev info about the reconstruction to
% make the segmentation better
valid_inds
=
grain_out
.
vol
>
0
;
stddev_vol
=
smooth3
(
grain_rec
.
ODF6D
.
voxels_stddev_R_vectors
);
stddev_valid
=
stddev_vol
(
valid_inds
);
vol_valid
=
grain_out
.
vol
(
valid_inds
);
stddev_rescale
=
max
(
stddev_valid
(:))
-
stddev_valid
;
stddev_rescale
=
(
stddev_rescale
-
min
(
stddev_rescale
(:)))
...
.
/
(
max
(
stddev_rescale
(:))
-
min
(
stddev_rescale
(:)));
grain_out
.
vol
(
valid_inds
)
=
vol_valid
.*
stddev_rescale
;
end
else
grain_out
.
vol
=
grain_rec
.
VOL3D
.
intensity
;
grain_out
.
shift
=
grain_rec
.
VOL3D
.
shift
;
...
...
@@ -369,6 +388,10 @@ classdef GtThreshold < handle
if
(
~
isfield
(
thr_params
,
'percent_of_peak'
))
thr_params
.
percent_of_peak
=
2.5
;
end
if
(
~
isfield
(
thr_params
,
'weight_by_stddev'
))
thr_params
.
weight_by_stddev
=
true
;
end
end
function
grain_seg
=
thresholdAutoSingleGrain
(
obj
,
grain_rec
)
...
...
This diff is collapsed.
Click to expand it.
5_reconstruction/gtRecDefaultParameters.m
+
2
−
1
View file @
969bb255
...
...
@@ -21,5 +21,6 @@ function par_rec = gtRecDefaultParameters(varargin)
% Grain segmentation related values
par_rec
.
thresholding
=
struct
(
...
'percentile'
,
20
,
'do_morph_recon'
,
true
,
...
'percent_of_peak'
,
2.5
,
'num_iter'
,
0
,
'iter_factor'
,
1
);
'percent_of_peak'
,
2.5
,
'num_iter'
,
0
,
'iter_factor'
,
1
,
...
'weight_by_stddev'
,
true
);
end
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