16 #include "Device/Mask/DetectorMask.h"
17 #include "Device/Mask/IShape2D.h"
21 #include <QVBoxLayout>
25 , m_interpolation_flag_backup(false)
30 const QModelIndex& maskContainerIndex,
90 std::unique_ptr<IShape2D> roi;
92 DetectorMask detectorMask(result->axis(0), result->axis(1));
93 const double scale = 1.0;
98 roi = roiItem->createShape(scale);
100 std::unique_ptr<IShape2D> shape(maskItem->createShape(scale));
101 detectorMask.addMask(*shape, maskItem->maskValue());
108 detectorMask.addMask(*roi,
true);
110 if (!detectorMask.hasMasks())
113 for (
size_t i = 0; i < result->size(); ++i)
114 if (detectorMask.isMasked(i))
Defines class IntensityDataItem.
Defines MaskItems classes.
Defines class MaskResultsPresenter.
Defines class SessionModel.
Datafield * getDatafield()
void setDatafield(Datafield *data) override
The given pointer becomes owned by this class!!
void setInterpolated(bool interp)
bool isInterpolated() const
A base class for all mask items.
QModelIndex m_maskContainerIndex
std::unique_ptr< Datafield > m_dataBackup
void setMaskContext(SessionModel *maskModel, const QModelIndex &maskContainerIndex, IntensityDataItem *intensityItem)
void updatePresenter(MaskEditorFlags::PresentationType presentationType)
void setShowMaskMode()
Update IntensityDataItem in SessionModel to represent masked areas. Corresponding bins of Datafield w...
Datafield * createMaskPresentation() const
Constructs Datafield which contains original intensity data except masked areas, and areas outside of...
IntensityDataItem * m_intensityDataItem
MaskResultsPresenter(QWidget *parent=nullptr)
SessionModel * m_maskModel
bool m_interpolation_flag_backup
void setOriginalMode()
Restores original state of IntensityDataItem.
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
SessionItem * itemForIndex(const QModelIndex &index) const
QModelIndex index(int row, int column, const QModelIndex &parent) const override
int rowCount(const QModelIndex &parent) const override