File indexing completed on 2024-05-12 03:44:33

0001 /*
0002     SPDX-FileCopyrightText: 2023 Joseph McGee <joseph.mcgee@sbcglobal.net>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #ifndef IMAGINGCAMERADATA_H
0010 #define IMAGINGCAMERADATA_H
0011 
0012 #include <QAbstractItemModel>
0013 #include <QVector>
0014 #include "cameragainreadmode.h"
0015 #include "cameragainreadnoise.h"
0016 
0017 QT_BEGIN_NAMESPACE
0018 namespace OptimalExposure
0019 {
0020 
0021 typedef enum { SENSORTYPE_MONOCHROME, SENSORTYPE_COLOR } SensorType;
0022 // GAIN_SELECTION_TYPE_FIXED is for future development of CCD cameras in which read-noise does not vary with gain.
0023 typedef enum { GAIN_SELECTION_TYPE_NORMAL, GAIN_SELECTION_TYPE_ISO_DISCRETE, GAIN_SELECTION_TYPE_FIXED } GainSelectionType;
0024 
0025 
0026 class ImagingCameraData
0027 {
0028 
0029     public:
0030         ImagingCameraData() {}
0031         ImagingCameraData(const QString &cameraId, OptimalExposure::SensorType sensorType,
0032                           OptimalExposure::GainSelectionType gainSelectionType, const QVector<int> &gainSelectionRange,
0033                           const QVector<OptimalExposure::CameraGainReadMode> &CameraGainReadModeVector);
0034 
0035         int getDataClassVersion();
0036         void setDataClassVersion(int newDataClassVersion);
0037 
0038         QString getCameraId();
0039         void setCameraId(const QString newCameraId);
0040 
0041         SensorType getSensorType() const;
0042         void setSensorType(SensorType newSensorType);
0043 
0044         OptimalExposure::GainSelectionType getGainSelectionType() const;
0045         void setGainSelectionType(OptimalExposure::GainSelectionType newGainSelectionType);
0046 
0047         int getGainMin();
0048         int getGainMax();
0049 
0050         QVector<CameraGainReadMode> getCameraGainReadModeVector();
0051         void setCameraGainReadModeVector(QVector<CameraGainReadMode> newCameraGainReadModeVector);
0052 
0053         QVector<int> getGainSelectionRange();
0054         void setGainSelectionRange(QVector<int> newGainSelectionRange);
0055 
0056 
0057 
0058     private:
0059         QString cameraId;
0060         int dataClassVersion;
0061 
0062         OptimalExposure::SensorType sensorType;
0063         OptimalExposure::GainSelectionType gainSelectionType;
0064 
0065         // For GAIN_SELECTION_TYPE_NORMAL gainSelection holds only the min and max gains.
0066         // For GAIN_SELECTION_TYPE_ISO_DISCRETE, gainSelection hold the discrete values.
0067         // For GAIN_SELECTION_TYPE_FIXED the gainSelection will not be populated
0068         QVector<int> gainSelectionRange;
0069         QVector<OptimalExposure::CameraGainReadMode> CameraGainReadModeVector;
0070 
0071 
0072 };
0073 }
0074 QT_END_NAMESPACE
0075 #endif // IMAGINGCAMERADATA_H