Kstars

indicamerachip.h
1/*
2 SPDX-FileCopyrightText: 2022 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "../fitsviewer/fitsview.h"
10#include "indicommon.h"
11
12namespace ISD
13{
14
15class Camera;
16
17/**
18 * @class CameraChip
19 * CameraChip class controls a particular chip in camera. While most amateur camera only have a single sensor, some
20 * cameras (e.g. SBIG CCDs) have additional chips for guiding purposes.
21 */
23{
24 public:
25 typedef enum { PRIMARY_CCD, GUIDE_CCD } ChipType;
26
27 CameraChip(ISD::Camera *camera, ChipType type);
28
29 FITSView *getImageView(FITSMode imageType);
30 void setImageView(FITSView *image, FITSMode imageType);
31 void setCaptureMode(FITSMode mode)
32 {
33 captureMode = mode;
34 }
35 void setCaptureFilter(FITSScale fType)
36 {
37 captureFilter = fType;
38 }
39
40 // Common commands
41 bool getFrame(int *x, int *y, int *w, int *h);
42 bool getFrameMinMax(int *minX, int *maxX, int *minY, int *maxY, int *minW, int *maxW, int *minH, int *maxH);
43 bool setFrame(int x, int y, int w, int h, bool force = false);
44
45 bool resetFrame();
46 bool capture(double exposure);
47 bool setFrameType(CCDFrameType fType);
48 bool setFrameType(const QString &name);
49 CCDFrameType getFrameType();
50 bool setBinning(int bin_x, int bin_y);
51 bool setBinning(CCDBinType binType);
52 CCDBinType getBinning();
53 bool getBinning(int *bin_x, int *bin_y);
54 bool getMaxBin(int *max_xbin, int *max_ybin);
55 ChipType getType() const
56 {
57 return m_Type;
58 }
59 ISD::Camera *getCCD()
60 {
61 return m_Camera;
62 }
63
64 // Set Image Info
65 bool setImageInfo(uint16_t width, uint16_t height, double pixelX, double pixelY, uint8_t bitdepth);
66 // Get Image Info
67 bool getImageInfo(uint16_t &width, uint16_t &height, double &pixelX, double &pixelY, uint8_t &bitdepth);
68 // Bayer Info
69 bool getBayerInfo(uint16_t &offsetX, uint16_t &offsetY, QString &pattern);
70
71 bool isCapturing();
72 bool abortExposure();
73
74 FITSMode getCaptureMode() const
75 {
76 return captureMode;
77 }
78 FITSScale getCaptureFilter() const
79 {
80 return captureFilter;
81 }
82 bool isBatchMode() const
83 {
84 return batchMode;
85 }
86 void setBatchMode(bool enable)
87 {
88 batchMode = enable;
89 }
90 QStringList getFrameTypes() const
91 {
92 return frameTypes;
93 }
94 void addFrameLabel(const QString &label)
95 {
96 frameTypes << label;
97 }
98 void clearFrameTypes()
99 {
100 frameTypes.clear();
101 }
102
103 bool canBin() const;
104 void setCanBin(bool value);
105
106 bool canSubframe() const;
107 void setCanSubframe(bool value);
108
109 bool canAbort() const;
110 void setCanAbort(bool value);
111
112 const QSharedPointer<FITSData> &getImageData() const;
113 void setImageData(const QSharedPointer<FITSData> &data)
114 {
115 imageData = data;
116 }
117
118 int getISOIndex() const;
119 bool getISOValue(QString &value) const;
120 bool setISOIndex(int value);
121
122 QStringList getISOList() const;
123
124 private:
125 QPointer<FITSView> normalImage, focusImage, guideImage, calibrationImage, alignImage;
126 QSharedPointer<FITSData> imageData { nullptr };
127 FITSMode captureMode { FITS_NORMAL };
128 FITSScale captureFilter { FITS_NONE };
129 bool batchMode { false };
130 QStringList frameTypes;
131 bool CanBin { false };
132 bool CanSubframe { false };
133 bool CanAbort { false };
134
135 ISD::Camera *m_Camera { nullptr };
136 ChipType m_Type;
137};
138
139}
CameraChip class controls a particular chip in camera.
Camera class controls an INDI Camera device.
Definition indicamera.h:45
ISD is a collection of INDI Standard Devices.
void clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.