Skip to content
Snippets Groups Projects
Commit 330317cd authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

DetectorMask + swig switch

parent 410cbfb4
No related branches found
No related tags found
1 merge request!844correct some SWIG switches
...@@ -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();
......
...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment