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
55ab041c
Commit
55ab041c
authored
9 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
GtOrientationSampling: migrated to the new gtCalculateGrain's omind/included work
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
ba9c15b3
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/GtOrientationSampling.m
+22
-16
22 additions, 16 deletions
zUtil_Deformation/GtOrientationSampling.m
with
22 additions
and
16 deletions
zUtil_Deformation/GtOrientationSampling.m
+
22
−
16
View file @
55ab041c
...
@@ -599,6 +599,9 @@ classdef GtOrientationSampling < handle
...
@@ -599,6 +599,9 @@ classdef GtOrientationSampling < handle
bbpos
(
ii
,:)
=
[
self
.
bl
(
ii
)
.
bbuim
(
1
)
self
.
bl
(
ii
)
.
bbvim
(
1
)
self
.
bl
(
ii
)
.
bbsize
(
1
:
2
)];
bbpos
(
ii
,:)
=
[
self
.
bl
(
ii
)
.
bbuim
(
1
)
self
.
bl
(
ii
)
.
bbvim
(
1
)
self
.
bl
(
ii
)
.
bbsize
(
1
:
2
)];
end
end
ref_omind
=
self
.
ref_gr
.
allblobs
.
omind
;
ref_included
=
self
.
ondet
(
self
.
included
);
fprintf
(
'Computing geometries: '
)
fprintf
(
'Computing geometries: '
)
c
=
tic
();
c
=
tic
();
for
o_ii
=
1
:
numel
(
self
.
lattice
)
for
o_ii
=
1
:
numel
(
self
.
lattice
)
...
@@ -621,37 +624,38 @@ classdef GtOrientationSampling < handle
...
@@ -621,37 +624,38 @@ classdef GtOrientationSampling < handle
switch
(
2
)
switch
(
2
)
case
3
% All in once
case
3
% All in once
num_chars_gr
=
fprintf
(
'gtCalculateGrain in parallel..'
);
num_chars_gr
=
fprintf
(
'gtCalculateGrain in parallel..'
);
self
.
lattice
(
o_ii
)
.
gr
=
gtCalculateGrain_p
(
self
.
lattice
(
o_ii
)
.
gr
,
self
.
parameters
);
self
.
lattice
(
o_ii
)
.
gr
=
gtCalculateGrain_p
(
...
self
.
lattice
(
o_ii
)
.
gr
,
self
.
parameters
,
...
'ref_omind'
,
ref_omind
,
'included'
,
ref_included
);
case
2
% In chunks
case
2
% In chunks
num_chars_gr
=
fprintf
(
'gtCalculateGrain in chunks: '
);
num_chars_gr
=
fprintf
(
'gtCalculateGrain in chunks: '
);
chunk_size
=
1000
;
chunk_size
=
1000
;
for
ii
=
1
:
chunk_size
:
num_orients
for
ii
=
1
:
chunk_size
:
num_orients
end_chunk
=
min
(
ii
+
chunk_size
,
num_orients
);
end_chunk
=
min
(
ii
+
chunk_size
,
num_orients
);
num_chars_gr_ii
=
fprintf
(
'%05d/%05d'
,
ii
,
num_orients
);
num_chars_gr_ii
=
fprintf
(
'%05d/%05d'
,
ii
,
num_orients
);
self
.
lattice
(
o_ii
)
.
gr
(
ii
:
end_chunk
)
=
...
self
.
lattice
(
o_ii
)
.
gr
(
ii
:
end_chunk
)
=
gtCalculateGrain_p
(
...
gtCalculateGrain_p
(
self
.
lattice
(
o_ii
)
.
gr
(
ii
:
end_chunk
),
self
.
parameters
);
self
.
lattice
(
o_ii
)
.
gr
(
ii
:
end_chunk
),
self
.
parameters
,
...
'ref_omind'
,
ref_omind
,
'included'
,
ref_included
);
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr_ii
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr_ii
]));
end
end
fprintf
(
repmat
(
' '
,
[
1
num_chars_gr_ii
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr_ii
]));
case
1
% One by One
case
1
% One by One
num_chars_gr
=
fprintf
(
'gtCalculateGrain: '
);
num_chars_gr
=
fprintf
(
'gtCalculateGrain: '
);
for
ii
=
1
:
num_orients
for
ii
=
1
:
num_orients
num_chars_gr_ii
=
fprintf
(
'%05d/%05d'
,
ii
,
num_orients
);
num_chars_gr_ii
=
fprintf
(
'%05d/%05d'
,
ii
,
num_orients
);
self
.
lattice
(
o_ii
)
.
gr
{
ii
}
=
gtCalculateGrain
(
self
.
lattice
(
o_ii
)
.
gr
{
ii
},
self
.
parameters
);
self
.
lattice
(
o_ii
)
.
gr
{
ii
}
=
gtCalculateGrain
(
...
self
.
lattice
(
o_ii
)
.
gr
{
ii
},
self
.
parameters
,
...
'ref_omind'
,
ref_omind
,
'included'
,
ref_included
);
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr_ii
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr_ii
]));
end
end
fprintf
(
repmat
(
' '
,
[
1
num_chars_gr_ii
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr_ii
]));
end
end
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
' '
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
' '
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr
]));
num_chars_gr
=
fprintf
(
'filtering unneeded "allblobs" fields..'
);
self
.
lattice
(
o_ii
)
.
gr
=
GtOrientationSampling
.
selectBlobsFromGrains
(
...
self
.
lattice
(
o_ii
)
.
gr
,
self
.
ref_gr
.
allblobs
.
omind
,
...
self
.
ondet
(
self
.
included
));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
' '
,
[
1
num_chars_gr
]));
fprintf
(
repmat
(
'\b'
,
[
1
num_chars_gr
]));
num_chars_gr
=
fprintf
(
'computing projection geometries..'
);
num_chars_gr
=
fprintf
(
'computing projection geometries..'
);
bbpos_oi
=
repmat
(
bbpos
,
[
num_orients
,
1
]);
bbpos_oi
=
repmat
(
bbpos
,
[
num_orients
,
1
]);
...
@@ -697,6 +701,9 @@ classdef GtOrientationSampling < handle
...
@@ -697,6 +701,9 @@ classdef GtOrientationSampling < handle
bbpos
(
b_ii
,
:)
=
[
sbl
.
bbuim
(
1
),
sbl
.
bbvim
(
1
),
sbl
.
bbsize
(
1
:
2
)];
bbpos
(
b_ii
,
:)
=
[
sbl
.
bbuim
(
1
),
sbl
.
bbvim
(
1
),
sbl
.
bbsize
(
1
:
2
)];
end
end
ref_omind
=
self
.
ref_gr
.
allblobs
.
omind
;
ref_included
=
self
.
ondet
(
self
.
included
);
fprintf
(
'Computing super-sampling geometries: '
)
fprintf
(
'Computing super-sampling geometries: '
)
c
=
tic
();
c
=
tic
();
for
o_ii
=
1
:
numel
(
self
.
lattice_ss
)
for
o_ii
=
1
:
numel
(
self
.
lattice_ss
)
...
@@ -705,11 +712,10 @@ classdef GtOrientationSampling < handle
...
@@ -705,11 +712,10 @@ classdef GtOrientationSampling < handle
for
g_ii
=
1
:
num_orients
for
g_ii
=
1
:
num_orients
num_chars_gr_ii
=
fprintf
(
'%05d/%05d'
,
g_ii
,
num_orients
);
num_chars_gr_ii
=
fprintf
(
'%05d/%05d'
,
g_ii
,
num_orients
);
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
}
=
gtCalculateGrain_p
(
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
},
self
.
parameters
);
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
}
=
GtOrientationSampling
.
selectBlobsFrom
Grain
s
(
...
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
}
=
gtCalculate
Grain
_p
(
...
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
},
self
.
ref_gr
.
allblobs
.
omind
,
...
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
},
self
.
parameters
,
...
self
.
ondet
(
self
.
included
)
);
'ref_omind'
,
ref_omind
,
'included'
,
ref_
included
);
num_ss_orients
=
numel
(
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
});
num_ss_orients
=
numel
(
self
.
lattice_ss
(
o_ii
)
.
gr
{
g_ii
});
bbpos_oi
=
repmat
(
bbpos
,
[
num_ss_orients
,
1
]);
bbpos_oi
=
repmat
(
bbpos
,
[
num_ss_orients
,
1
]);
...
...
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