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
86971798
Commit
86971798
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
6D-reconstruction: share some setup code
Signed-off-by:
Nicola Vigano
<
vigano@yoda.esrf.fr
>
parent
0d3943c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
+13
-25
13 additions, 25 deletions
zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
with
13 additions
and
25 deletions
zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
+
13
−
25
View file @
86971798
...
...
@@ -42,14 +42,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
function
[
algo
,
good_orients
,
blobs
]
=
getGrainReconstructionAlgo
(
self
,
sampler
,
num_interp
,
varargin
)
% Build Empty volumes
ref_gr
=
sampler
.
get_reference_grain
();
proj
=
ref_gr
.
proj
(
self
.
det_index
);
spacing
=
mean
([
proj
.
vol_size_y
,
proj
.
vol_size_x
,
proj
.
vol_size_z
])
*
(
self
.
rspace_oversize
-
1
);
volume_size
=
ceil
([
proj
.
vol_size_y
,
proj
.
vol_size_x
,
proj
.
vol_size_z
]
+
spacing
);
if
(
self
.
volume_downscaling
>
1
)
volume_size
=
ceil
(
volume_size
/
self
.
volume_downscaling
);
end
volume_size
=
self
.
get_volume_size
(
ref_gr
);
switch
(
lower
(
self
.
shape_functions_type
))
case
'none'
...
...
@@ -93,14 +86,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
% Build Empty volumes
ref_gr
=
sampler
(
1
)
.
get_reference_grain
();
proj
=
ref_gr
.
proj
(
self
.
det_index
);
spacing
=
mean
([
proj
.
vol_size_y
,
proj
.
vol_size_x
,
proj
.
vol_size_z
])
*
(
self
.
rspace_oversize
-
1
);
volume_size
=
ceil
([
proj
.
vol_size_y
,
proj
.
vol_size_x
,
proj
.
vol_size_z
]
+
spacing
);
if
(
self
.
volume_downscaling
>
1
)
volume_size
=
ceil
(
volume_size
/
self
.
volume_downscaling
);
end
volume_size
=
self
.
get_volume_size
(
ref_gr
);
for
ii_g
=
1
:
num_grains
gr
=
sampler
(
ii_g
)
.
get_reference_grain
();
...
...
@@ -536,6 +522,17 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
'good_orients'
,
{
true
(
1
,
tot_orient
)}
);
end
function
volume_size
=
get_volume_size
(
self
,
ref_gr
)
proj
=
ref_gr
.
proj
(
self
.
det_index
);
spacing
=
mean
([
proj
.
vol_size_y
,
proj
.
vol_size_x
,
proj
.
vol_size_z
])
*
(
self
.
rspace_oversize
-
1
);
volume_size
=
ceil
([
proj
.
vol_size_y
,
proj
.
vol_size_x
,
proj
.
vol_size_z
]
+
spacing
);
if
(
self
.
volume_downscaling
>
1
)
volume_size
=
ceil
(
volume_size
/
self
.
volume_downscaling
);
end
end
function
[
sub_blob_slices
,
proj_coeffs
]
=
get_sub_blobs
(
self
,
blobs
,
slices_interp
,
padding
)
num_blobs
=
numel
(
blobs
);
sub_blob_slices
=
cell
(
num_blobs
,
1
);
...
...
@@ -771,18 +768,9 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
sliceLims
=
[
floor
(
sliceLims
(:,
1
)),
ceil
(
sliceLims
(:,
2
))]
+
1
;
end
function
volume_size
=
get_volume_size
(
self
,
gr_center
,
Ws
,
bls
)
% At this point we kinda lost the original blob size
% information! so we get it from the mask ;)
BBs
(:,
[
1
,
3
])
=
cat
(
1
,
bls
(:)
.
bbuim
);
BBs
(:,
[
2
,
4
])
=
cat
(
1
,
bls
(:)
.
bbvim
);
BBs
=
[
BBs
(:,
1
:
2
),
(
BBs
(:,
3
:
4
)
-
BBs
(:,
1
:
2
)
+
1
)];
verts
=
gtFwdSimComputeCircumscribingPolyhedron
(
gr_center
,
Ws
,
BBs
,
self
.
parameters
,
self
.
det_index
);
volume_size
=
round
(
max
(
verts
,
[],
1
)
-
min
(
verts
,
[],
1
)
/
self
.
parameters
.
fsim
.
oversize
);
end
function
[
geometries
,
offsets
]
=
makeSubBlobGeometries
(
self
,
...
grains_props
,
proj_coeffs
,
extreemes_blobs_w
,
w_tab
,
abs_lims
)
...
...
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