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
a51a462b
Commit
a51a462b
authored
10 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Spot montage: added multi-detector support
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
b4f5b235
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_GUI/gtGuiGrainMontage.m
+42
-16
42 additions, 16 deletions
zUtil_GUI/gtGuiGrainMontage.m
with
42 additions
and
16 deletions
zUtil_GUI/gtGuiGrainMontage.m
+
42
−
16
View file @
a51a462b
function
selected
=
gtGuiGrainMontage
(
gr
,
selected
,
use_blobs
)
function
selected
=
gtGuiGrainMontage
(
gr
,
selected
,
use_blobs
,
det_ind
)
% GUIGTMONTAGE
% selected = gtGuiGrainMontage(gr, selected, use_blobs)
% selected = gtGuiGrainMontage(gr, selected, use_blobs
, det_ind
)
% --------------------------------------------------------------------------
%
if
(
~
exist
(
'selected'
,
'var'
)
||
isempty
(
selected
)
)
selected
=
gr
.
selected
;
if
(
~
exist
(
'selected'
,
'var'
))
selected
=
[]
;
end
if
(
~
exist
(
'use_blobs'
,
'var'
)
||
isempty
(
use_blobs
))
use_blobs
=
false
;
end
if
(
~
exist
(
'det_ind'
,
'var'
))
det_ind
=
1
;
end
% Init the GUI
gui_data
=
gtGuiGrainMontage_init
(
gr
,
selected
,
use_blobs
);
gui_data
=
gtGuiGrainMontage_init
(
gr
,
selected
,
use_blobs
,
det_ind
);
while
(
1
)
% Wait for the application to close
...
...
@@ -32,10 +36,39 @@ function selected = gtGuiGrainMontage(gr, selected, use_blobs)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Private functions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
gui_data
=
gtGuiGrainMontage_init
(
gr
,
selected
,
use_blobs
)
function
gui_data
=
gtGuiGrainMontage_init
(
gr
,
selected
,
use_blobs
,
det_ind
)
gui_data
=
[];
% Coping with different versions of FwdSim
if
(
isempty
(
selected
))
if
(
isfield
(
gr
.
proj
(
det_ind
),
'selected'
))
selected
=
gr
.
proj
(
det_ind
)
.
selected
;
else
selected
=
gr
.
selected
;
end
end
if
(
isfield
(
gr
.
proj
(
det_ind
),
'included'
))
included
=
gr
.
proj
(
det_ind
)
.
included
;
ondet
=
gr
.
proj
(
det_ind
)
.
ondet
;
else
included
=
gr
.
included
;
ondet
=
gr
.
ondet
;
end
if
(
use_blobs
&&
~
isfield
(
gr
.
proj
(
det_ind
),
'bl'
))
gr
.
proj
(
det_ind
)
.
bl
=
gr
.
bl
;
end
if
(
isfield
(
gr
,
'spotid'
))
spot_ids
=
gr
.
spotid
(
included
);
else
spot_ids
=
zeros
(
numel
(
included
),
1
);
end
if
(
isfield
(
gr
,
'intensity'
))
intensities
=
gr
.
intensity
;
else
intensities
=
zeros
(
numel
(
included
),
1
);
end
% Condition to exit from the gui
gui_data
.
close
=
false
;
...
...
@@ -100,10 +133,7 @@ function selected = gtGuiGrainMontage(gr, selected, use_blobs)
% Let's store the selected images vector in input
gui_data
.
selected
=
selected
;
spot_ids
=
gr
.
spotid
(
gr
.
included
);
intensities
=
gr
.
intensity
;
omegas_th
=
gr
.
allblobs
.
omega
(
gr
.
ondet
(
gr
.
included
));
omegas_th
=
gr
.
allblobs
.
omega
(
ondet
(
included
));
% hack to make it display the images: may be a matlab bug
% related to flushing
...
...
@@ -114,17 +144,13 @@ function selected = gtGuiGrainMontage(gr, selected, use_blobs)
% Sorting by Omegas
[
~
,
order
]
=
sort
(
omegas_th
);
if
(
use_blobs
&&
~
isfield
(
gr
.
proj
,
'bl'
))
gr
.
proj
.
bl
=
gr
.
bl
;
end
for
ii
=
1
:
length
(
selected
)
index
=
order
(
ii
);
if
(
use_blobs
)
img
=
sum
(
gr
.
proj
.
bl
(
index
)
.
intm
,
3
)
'
;
img
=
sum
(
gr
.
proj
(
det_ind
)
.
bl
(
index
)
.
intm
,
3
)
'
;
else
img
=
squeeze
(
gr
.
proj
.
stack
(:,
index
,
:))
'
;
img
=
squeeze
(
gr
.
proj
(
det_ind
)
.
stack
(:,
index
,
:))
'
;
end
% hack to make it display the images: may be a matlab bug
...
...
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