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
330317cd
Commit
330317cd
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
DetectorMask + swig switch
parent
410cbfb4
No related branches found
No related tags found
1 merge request
!844
correct some SWIG switches
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Device/Mask/DetectorMask.cpp
+4
-0
4 additions, 0 deletions
Device/Mask/DetectorMask.cpp
Device/Mask/DetectorMask.h
+9
-3
9 additions, 3 deletions
Device/Mask/DetectorMask.h
with
13 additions
and
3 deletions
Device/Mask/DetectorMask.cpp
+
4
−
0
View file @
330317cd
...
@@ -75,6 +75,10 @@ Histogram2D* DetectorMask::createHistogram() const
...
@@ -75,6 +75,10 @@ Histogram2D* DetectorMask::createHistogram() const
return
dynamic_cast
<
Histogram2D
*>
(
IHistogram
::
createHistogram
(
data
));
return
dynamic_cast
<
Histogram2D
*>
(
IHistogram
::
createHistogram
(
data
));
}
}
bool
DetectorMask
::
hasMasks
()
const
{
return
!
m_shapes
.
empty
();
}
size_t
DetectorMask
::
numberOfMasks
()
const
size_t
DetectorMask
::
numberOfMasks
()
const
{
{
return
m_shapes
.
size
();
return
m_shapes
.
size
();
...
...
This diff is collapsed.
Click to expand it.
Device/Mask/DetectorMask.h
+
9
−
3
View file @
330317cd
...
@@ -15,14 +15,18 @@
...
@@ -15,14 +15,18 @@
#ifndef BORNAGAIN_DEVICE_MASK_DETECTORMASK_H
#ifndef BORNAGAIN_DEVICE_MASK_DETECTORMASK_H
#define BORNAGAIN_DEVICE_MASK_DETECTORMASK_H
#define BORNAGAIN_DEVICE_MASK_DETECTORMASK_H
#include
"Base/Types/CloneableVector.h"
#include
"Device/Data/OutputData.h"
#include
"Device/Data/OutputData.h"
#include
"Device/Mask/IShape2D.h"
#include
"Device/Mask/IShape2D.h"
#ifndef SWIG
#include
"Base/Types/CloneableVector.h"
#endif
class
Histogram2D
;
class
IAxis
;
class
IAxis
;
template
<
class
T
>
template
<
class
T
>
class
OutputData
;
class
OutputData
;
class
Histogram2D
;
//! Collection of detector masks.
//! Collection of detector masks.
//! @ingroup detector
//! @ingroup detector
...
@@ -49,7 +53,7 @@ public:
...
@@ -49,7 +53,7 @@ public:
Histogram2D
*
createHistogram
()
const
;
Histogram2D
*
createHistogram
()
const
;
//! Returns true if has masks
//! Returns true if has masks
bool
hasMasks
()
const
{
return
!
m_shapes
.
empty
();
}
bool
hasMasks
()
const
;
int
numberOfMaskedChannels
()
const
{
return
m_number_of_masked_channels
;
}
int
numberOfMaskedChannels
()
const
{
return
m_number_of_masked_channels
;
}
...
@@ -60,7 +64,9 @@ public:
...
@@ -60,7 +64,9 @@ public:
private
:
private
:
void
process_masks
();
void
process_masks
();
#ifndef SWIG
CloneableVector
<
IShape2D
>
m_shapes
;
CloneableVector
<
IShape2D
>
m_shapes
;
#endif
std
::
vector
<
bool
>
m_mask_of_shape
;
std
::
vector
<
bool
>
m_mask_of_shape
;
OutputData
<
bool
>
m_mask_data
;
OutputData
<
bool
>
m_mask_data
;
int
m_number_of_masked_channels
;
int
m_number_of_masked_channels
;
...
...
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