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
07d98e78
Commit
07d98e78
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
gvdm->detector projector: added nearest neighbour proection (plus some other fixes)
Signed-off-by:
Nicola Vigano
<
vigano@yoda.esrf.fr
>
parent
8c95274c
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
zUtil_Deformation/gtDefFwdProjGvdm.m
+23
-9
23 additions, 9 deletions
zUtil_Deformation/gtDefFwdProjGvdm.m
with
23 additions
and
9 deletions
zUtil_Deformation/gtDefFwdProjGvdm.m
+
23
−
9
View file @
07d98e78
...
...
@@ -22,10 +22,16 @@ function bl = gtDefFwdProjGvdm(grain, ref_sel, gv, fedpars, parameters, det_ind,
g
=
gtMathsRod2OriMat
(
grain
.
R_vector
);
pls_orig
=
grain
.
allblobs
.
plorig
(
ref_sel
,
:);
if
(
strcmpi
(
fedpars
.
defmethod
,
'rod_rightstretch'
))
% We bring the plane normals back to the status of pl_cry
pls_orig
=
gtVectorLab2Cryst
(
pls_orig
,
g
);
if
(
isfield
(
grain
.
allblobs
,
'plcry'
))
pls_orig
=
grain
.
allblobs
.
plcry
(
ref_sel
,
:);
else
% We bring the plane normals back to the status of pl_cry
pls_orig
=
grain
.
allblobs
.
plorig
(
ref_sel
,
:);
pls_orig
=
gtVectorLab2Cryst
(
pls_orig
,
g
);
end
else
pls_orig
=
grain
.
allblobs
.
plorig
(
ref_sel
,
:);
end
sinths
=
grain
.
allblobs
.
sintheta
(
ref_sel
);
...
...
@@ -62,6 +68,8 @@ function bl = gtDefFwdProjGvdm(grain, ref_sel, gv, fedpars, parameters, det_ind,
uvw_shifts
=
round
(
or_uvw
)
'
;
end
linear_interp
=
~
(
isfield
(
fedpars
,
'projector'
)
&&
strcmpi
(
projector
,
'nearest'
));
num_oversampling
=
size
(
gv
.
d
,
3
);
gvpow
=
gv
.
pow
(
1
,
uinds
);
...
...
@@ -198,18 +206,24 @@ function bl = gtDefFwdProjGvdm(grain, ref_sel, gv, fedpars, parameters, det_ind,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Distribute value over 8 pixels
[
ucbl8
,
ints8
]
=
gtMathsGetInterpolationIndices
(
uvw_bl
,
gvpow_v
,
fedpars
.
bltype
);
if
(
linear_interp
)
[
ucbl8
,
ints8
]
=
gtMathsGetInterpolationIndices
(
uvw_bl
,
...
gvpow_v
,
fedpars
.
bltype
);
else
ucbl8
=
round
(
uvw_bl
);
ints8
=
gvpow_v
;
end
% Accumulate all intensities in the blob voxel-wise
% 'uvw' needs to be nx3; 'ints' is now 1xnx8
try
tmp_bl
(
ii_b
)
.
intm
=
accumarray
(
ucbl8
,
ints8
,
blob_uvw_size
);
catch
mexc
disp
(
' '
)
disp
(
'ERROR'
)
disp
([
'The error is probably caused by the projected intensities'
...
' f
alling outside the blob volume. Try increasing the blob'
...
'
volume padding: fedpars.detector(det_ind).blobsizeadd
'
])
fprintf
([
'\n\nERROR\nThe error is probably caused by the'
' projected intensities falling outside the blob volume.'
'\nTry increasing the blob volume padding:'
' f
edpars.detector(det_ind).blobsizeadd, or FIXING'
'
YOUR CODE!!\n\n
'
])
disp
(
'Blob ID:'
)
disp
(
ii_b
)
disp
(
'Blob size:'
)
...
...
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