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
88757828
Commit
88757828
authored
7 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
6D-recosntruction: Initial multi-detector for regular and older cluster reconstructions
Signed-off-by:
Nicola VIGANÒ
<
nicola.vigano@esrf.fr
>
parent
eeeb9ae8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
zUtil_Deformation/Gt6DBlobReconstructor.m
+3
-0
3 additions, 0 deletions
zUtil_Deformation/Gt6DBlobReconstructor.m
zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
+34
-14
34 additions, 14 deletions
zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
with
37 additions
and
14 deletions
zUtil_Deformation/Gt6DBlobReconstructor.m
+
3
−
0
View file @
88757828
...
...
@@ -18,6 +18,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
lambda_l1
=
1e-2
;
lambda_tv
=
1
;
% lambda_det = 1;
orientation_groups
=
[];
...
...
@@ -617,6 +618,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
chunk_size
=
self
.
get_jobs_chunk_size
();
num_geoms
=
self
.
get_number_geometries
();
% renorm_factors = self.lambda_det ./ (self.detector_ss .^ 2);
renorm_factors
=
1
.
/
(
self
.
detector_ss
.^
2
);
do_renorm
=
abs
(
renorm_factors
-
1
)
>
eps
(
'single'
);
...
...
@@ -691,6 +693,7 @@ classdef Gt6DBlobReconstructor < Gt6DVolumeToBlobProjector
for
ii_d
=
1
:
num_det
for
ii
=
1
:
num_ors
self
.
bwd_weights
{
ii
}
=
self
.
bwd_weights
{
ii
}
+
sum
(
self
.
offsets
{
ii_d
}{
ii
}
.
proj_coeffs
);
% self.bwd_weights{ii} = self.bwd_weights{ii} + self.lambda_det(ii_d) * sum(self.offsets{ii_d}{ii}.proj_coeffs);
end
end
fprintf
(
'\b\b (%2.1f s)\n'
,
toc
(
c
));
...
...
This diff is collapsed.
Click to expand it.
zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
+
34
−
14
View file @
88757828
...
...
@@ -38,35 +38,55 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
% Build Empty volumes
ref_gr
=
sampler
.
get_reference_grain
();
volume_size
=
self
.
get_volume_size
(
ref_gr
,
self
.
det_index
(
1
));
or_groups
=
[
1
,
sampler
.
get_total_num_orientations
()]
;
vol_size_mm
=
volume_size
.*
self
.
parameters
.
recgeo
(
1
)
.
voxsize
;
det_ind
=
self
.
det_index
(
1
)
;
or_groups
=
[
1
,
sampler
.
get_total_num_orientations
()]
;
% Deciding the type of num_interp type
num_interp
=
self
.
compute_num_interp
(
num_interp
,
sampler
);
blobs_w_interp
=
self
.
compute_blobs_w_interp
(
num_interp
,
ref_gr
,
det_ind
);
num_det
=
numel
(
self
.
det_ind
ex
);
shape_funcs
=
self
.
get_shape_functions
(
sampler
,
num_interp
,
blobs_w_interp
,
det_ind
);
geometries
=
cell
(
num_det
,
1
);
offsets
=
cell
(
num_det
,
1
);
vol_size_mm
=
volume_size
.*
self
.
parameters
.
recgeo
(
1
)
.
voxsize
;
algo_params
=
self
.
get_algorithm_params
(
sampler
,
blobs_w_interp
,
shape_funcs
,
vol_size_mm
,
det_ind
);
blobs
=
gt6DRecBlobsDefinition
(
num_det
)
;
proj_uv_size
=
zeros
(
num_det
,
2
);
blobs
=
algo_params
.
blobs
;
if
(
isempty
(
blobs
.
psf
)
...
&&
isfield
(
self
.
parameters
.
rec
.
grains
.
options
,
'psf'
)
...
&&
~
isempty
(
self
.
parameters
.
rec
.
grains
.
options
.
psf
))
blobs
.
psf
=
{
permute
(
self
.
parameters
.
rec
.
grains
.
options
.
psf
,
[
1
3
2
])
};
% lambda_det = ones(num_det, 1);
% % lambda_det(2:end) = 1e-1;
for
ii_d
=
1
:
num_det
det_ind
=
self
.
det_index
(
ii_d
);
fprintf
(
'\nProcessing detector: %d\n'
,
det_ind
)
blobs_w_interp
=
self
.
compute_blobs_w_interp
(
num_interp
,
ref_gr
,
det_ind
);
shape_funcs
=
self
.
get_shape_functions
(
sampler
,
num_interp
,
blobs_w_interp
,
det_ind
);
algo_params
=
self
.
get_algorithm_params
(
sampler
,
blobs_w_interp
,
shape_funcs
,
vol_size_mm
,
det_ind
);
blobs
(
ii_d
)
=
algo_params
.
blobs
;
if
(
isempty
(
blobs
(
ii_d
)
.
psf
)
...
&&
isfield
(
self
.
parameters
.
rec
.
grains
.
options
,
'psf'
)
...
&&
~
isempty
(
self
.
parameters
.
rec
.
grains
.
options
.
psf
))
blobs
(
ii_d
)
.
psf
=
{
permute
(
self
.
parameters
.
rec
.
grains
.
options
.
psf
,
[
1
3
2
])
};
end
geometries
{
ii_d
}
=
algo_params
.
geometries
;
offsets
{
ii_d
}
=
algo_params
.
offsets
;
proj_uv_size
(
ii_d
,
:)
=
algo_params
.
proj_uv_size
;
end
algo
=
Gt6DBlobReconstructor
(
volume_size
,
blobs
,
algo_params
.
proj_uv_size
,
...
algo
=
Gt6DBlobReconstructor
(
volume_size
,
blobs
,
proj_uv_size
,
...
'data_type'
,
self
.
data_type
,
...
'geometries'
,
{
algo_params
.
geometries
}
,
...
'offsets'
,
{
algo_params
.
offsets
}
,
...
'geometries'
,
geometries
,
...
'offsets'
,
offsets
,
...
'volume_ss'
,
self
.
volume_downscaling
,
...
'rspace_ss'
,
self
.
rspace_super_sampling
,
...
'orientation_groups'
,
or_groups
,
...
varargin
{:}
);
% 'lambda_det', lambda_det, ...
end
function
[
algo
,
blobs_struct
]
=
get6DAlgorithmMultiRegion
(
self
,
sampler
,
num_interp
,
blobs
,
varargin
)
...
...
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