Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
7ad63543
Commit
7ad63543
authored
1 year ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
rm mask conv from container
parent
22d3374d
No related branches found
No related tags found
1 merge request
!2234
Convert mask coords to bins before passing to detector (#823)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/Job/JobItem.cpp
+1
-2
1 addition, 2 deletions
GUI/Model/Job/JobItem.cpp
GUI/Model/Mask/MaskContainerItem.cpp
+0
-15
0 additions, 15 deletions
GUI/Model/Mask/MaskContainerItem.cpp
GUI/Model/Mask/MaskContainerItem.h
+0
-4
0 additions, 4 deletions
GUI/Model/Mask/MaskContainerItem.h
with
1 addition
and
21 deletions
GUI/Model/Job/JobItem.cpp
+
1
−
2
View file @
7ad63543
...
@@ -334,8 +334,7 @@ void JobItem::adjustReaDataToJobInstrument()
...
@@ -334,8 +334,7 @@ void JobItem::adjustReaDataToJobInstrument()
// Masks conversion can be done in two steps: first from original coords to bins,
// Masks conversion can be done in two steps: first from original coords to bins,
// then from bins to target coords.
// then from bins to target coords.
// If 'IDetector::addBinMask' is used by detector, only "orig coords --> bins" is needed.
// If 'IDetector::addBinMask' is used by detector, only "orig coords --> bins" is needed.
if
(
const
auto
*
container
=
m_realItem
->
data2DItem
()
->
maskContainerItem
())
m_realItem
->
data2DItem
()
->
convertMasksToNbins
();
container
->
convertToNbins
(
m_realItem
->
data2DItem
()
->
c_field
()
->
frame
());
importMasksFromDatafileItem
();
// Copy masks & ROI from DatafileItem on board of instrument.
importMasksFromDatafileItem
();
// Copy masks & ROI from DatafileItem on board of instrument.
cropRealData
();
// Crop DatafileItem to the region of interest.
cropRealData
();
// Crop DatafileItem to the region of interest.
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Mask/MaskContainerItem.cpp
+
0
−
15
View file @
7ad63543
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
#include
"GUI/Model/Mask/MaskContainerItem.h"
#include
"GUI/Model/Mask/MaskContainerItem.h"
#include
"GUI/Model/Mask/MaskItems.h"
#include
"GUI/Model/Mask/MaskItems.h"
#include
"GUI/Model/Mask/MaskUnitsConverter.h"
#include
<QRegularExpression>
#include
<QRegularExpression>
namespace
{
namespace
{
...
@@ -117,20 +116,6 @@ void MaskContainerItem::updateMaskNames()
...
@@ -117,20 +116,6 @@ void MaskContainerItem::updateMaskNames()
}
}
}
}
void
MaskContainerItem
::
convertToNbins
(
const
Frame
&
frame
)
const
{
MaskUnitsConverter
mask_converter
(
frame
);
for
(
auto
*
maskItem
:
maskItems
())
mask_converter
.
convertToNbins
(
maskItem
);
}
void
MaskContainerItem
::
convertFromNbins
(
const
Frame
&
frame
)
const
{
MaskUnitsConverter
mask_converter
(
frame
);
for
(
auto
*
maskItem
:
maskItems
())
mask_converter
.
convertFromNbins
(
maskItem
);
}
void
MaskContainerItem
::
writeTo
(
QXmlStreamWriter
*
w
)
const
void
MaskContainerItem
::
writeTo
(
QXmlStreamWriter
*
w
)
const
{
{
XML
::
writeAttribute
(
w
,
XML
::
Attrib
::
version
,
uint
(
1
));
XML
::
writeAttribute
(
w
,
XML
::
Attrib
::
version
,
uint
(
1
));
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Mask/MaskContainerItem.h
+
0
−
4
View file @
7ad63543
...
@@ -70,10 +70,6 @@ public:
...
@@ -70,10 +70,6 @@ public:
//! Update numbers in mask names
//! Update numbers in mask names
void
updateMaskNames
();
void
updateMaskNames
();
//! Converts masks coordinates to/from frame coordinates
void
convertToNbins
(
const
Frame
&
frame
)
const
;
void
convertFromNbins
(
const
Frame
&
frame
)
const
;
const
QModelIndex
rootIndex
;
const
QModelIndex
rootIndex
;
protected:
protected:
...
...
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