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
f6f43b42
Commit
f6f43b42
authored
6 years ago
by
Wolfgang Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
minor fixes
Signed-off-by:
Wolfgang Ludwig
<
wolfgang.ludwig@esrf.fr
>
parent
925af908
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
1_preprocessing/gtPreprocessing.m
+8
-3
8 additions, 3 deletions
1_preprocessing/gtPreprocessing.m
5_reconstruction/gtReconstructGrains.m
+11
-5
11 additions, 5 deletions
5_reconstruction/gtReconstructGrains.m
with
19 additions
and
8 deletions
1_preprocessing/gtPreprocessing.m
+
8
−
3
View file @
f6f43b42
...
...
@@ -200,8 +200,9 @@ else
if
strcmpi
(
check
,
'y'
)
parameters
.
acq
.
rotu
=
gtFindRotationAxis
(
parameters
.
acq
,
bbdir
);
parameters
.
acq
.
rotx
=
parameters
.
acq
.
rotu
;
parameters
.
detgeo
.
detrefpos
(
2
)
=
-
(
parameters
.
acq
.
rotu
-
parameters
.
acq
.
xdet
/
2
-
0.5
)
*
parameters
.
detgeo
.
pixelsizeu
;
parameters
.
detgeo
.
detrefpos
(
3
)
=
0
;
% Here we define the LabZ = 0 position as the center of the detector
%Calculate detrefpos later using gtGeoDetRefPos
%parameters.detgeo.detrefpos(2) = -(parameters.acq.rotu - parameters.acq.xdet / 2 - 0.5) * parameters.detgeo.pixelsizeu;
%parameters.detgeo.detrefpos(3) = 0;
end
save
(
parameters_name
,
'parameters'
);
...
...
@@ -215,7 +216,7 @@ else
if
strcmpi
(
check
,
'y'
)
parameters
.
acq
.
bb
=
gtFindSampleEdges
(
parameters
.
acq
,
parameters
.
prep
,
bbdir
);
parameters
.
prep
.
bbox
=
parameters
.
acq
.
bb
+
[
-
parameters
.
prep
.
margin
0
2
*
parameters
.
prep
.
margin
0
];
% define the sample envelope - assume centred on direct beam
labgeo_tmp
=
gtGeoSamEnvFromAcq
(
parameters
.
labgeo
,
parameters
.
acq
);
parameters
.
labgeo
.
samenvtop
=
labgeo_tmp
.
samenvtop
;
...
...
@@ -225,6 +226,10 @@ else
save
(
parameters_name
,
'parameters'
);
end
% end no_direct_beam case
% Update Detector reference position
parameters
.
detgeo
=
gtGeoDetDefaultParameters
(
parameters
.
acq
);
save
(
parameters_name
,
'parameters'
);
if
isempty
(
parameters
.
acq
.
maxradius
)
check
=
'y'
;
else
...
...
This diff is collapsed.
Click to expand it.
5_reconstruction/gtReconstructGrains.m
+
11
−
5
View file @
f6f43b42
function
gtReconstructGrains
(
first
,
last
,
workingdirectory
,
phaseID
,
parameters
,
varargin
)
function
varargout
=
gtReconstructGrains
(
first
,
last
,
workingdirectory
,
phaseID
,
parameters
,
varargin
)
% GTRECONSTRUCTGRAINS Launch a series of 3D ART (ASTRA) reconstruction on a GPU machine
% gtReconstructGrains(first, last, workingdirectory, phaseID, [parameters], [varargin])
% --------------------------------------------------------------------------------------------------
...
...
@@ -14,6 +14,7 @@ function gtReconstructGrains(first, last, workingdirectory, phaseID, parameters,
% parameters = <struct> {parameters.mat}
% varargin = parameters.rec
% example: 'list', [1, 3, 4:10]
% 'display', true
% Version 001
if
(
~
gtCheckGpu
())
...
...
@@ -45,7 +46,7 @@ function gtReconstructGrains(first, last, workingdirectory, phaseID, parameters,
rec_gr
=
parameters
.
rec
;
rec_gr
.
algorithm
=
'SIRT'
;
end
rec_gr
.
display
=
false
;
if
(
~
isempty
(
varargin
))
rec_gr
=
parse_pv_pairs
(
rec_gr
,
varargin
);
parameters
.
rec
.
grains
=
rec_gr
;
...
...
@@ -91,9 +92,9 @@ function gtReconstructGrains(first, last, workingdirectory, phaseID, parameters,
switch
(
upper
(
rec_gr
.
algorithm
))
case
{
'SIRT'
,
'3DTV'
}
gtAstraReconstructGrain
(
gr_id
,
phaseID
,
parameters
);
rec_vol
=
gtAstraReconstructGrain
(
gr_id
,
phaseID
,
parameters
);
case
{
'6DL1'
,
'6DLS'
,
'6DTV'
,
'6DTVL1'
}
gtReconstructGrainOrientation
(
gr_id
,
phaseID
,
parameters
);
rec_vol
=
gtReconstructGrainOrientation
(
gr_id
,
phaseID
,
parameters
);
end
if
(
~
isdeployed
)
try
...
...
@@ -102,9 +103,14 @@ function gtReconstructGrains(first, last, workingdirectory, phaseID, parameters,
catch
sprintf
(
'Segmentation of grain %d failed - check reconstruction!'
,
gr_id
)
end
if
rec_gr
.
display
GtVolView
(
rec_vol
.
intensity
)
end
end
end
fprintf
(
'Done (in %f seconds).\n'
,
toc
(
c
))
if
nargout
>
0
varargout
{
1
}
=
rec_vol
;
end
cd
(
currentDir
);
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