22 ComputeHistogram = InstrData->GetComputeHistogram();
42 InstrData->SetImage(std::move(Image));
46 InstrData->SetIntensityHistogram(std::move(IntensityHistogram));
49 InstrData->SetRGBHistogram(std::move(RGBHistogram));
57 if (!IsImageAvailbale())
61 return std::move(CurrentImage);
66 if (!IsImageAvailbale())
69 return CurrentImage.copy(RegionOfInterest);
74 CurrentImage = std::move(Other);
79 CurrentImage = QImage();
81 IntensityHistogram = {};
97 ComputeHistogram = ComputeHistogramType::NoHistogram;
98 ImageTransformation = {};
Defines a meta instrument for an image capturing device.
virtual ~CameraConfigurator()=0
std::chrono::milliseconds TimeType
Time type describing the camera's times like its exposure time.
QImage GetImageCopy(const QRect &RegionOfInterest=QRect()) const
Copying getter for CurrentImage. This function is more expensive than GetImage().
QImage GetImage() const
Moving getter for CurrentImage.
void SetImage(QImage &&Other)
Setter for CurrentImage.
void ResetImpl(dispatch_tag< InstrumentDataBase >) override final
ComputeHistogramType
Type indicating whether histograms should be computed for newly captured images.
@ IntensityAndRGBHistogram
Combination of IntensityHistogram and RGBHistogram.
@ RGBHistogram
Compute separate histograms for each of the image's color channels (RGB).
@ NoHistogram
Histogram computation is disabled.
@ IntensityHistogram
Compute an intensity histogram by converting the image to grayscale.
void ClearImage() const
Resets CurrentImage to a default-constructed empty image and IntensityHistogram as well as RGBHistogr...
virtual ~CameraParams()=0
void UpdateFuncImpl(dispatch_tag< UpdateTaskBase >, DynExp::InstrumentInstance &Instance) override final
virtual QImage ObtainImage(DynExp::InstrumentInstance &Instance)=0
Retrieves the current image from the underlying hardware device, applies image transformations (e....
virtual void SetExposureTime(const CameraData::TimeType ExposureTime, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Sets the camera's exposure time.
void ResetImpl(dispatch_tag< InstrumentBase >) override final
virtual void StopCapturing(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Stops image capturing.
virtual void StopCapturingSync() const
Synchronized version of StopCapturing(), which blocks until a stop capturing task issued by an overri...
virtual void SetExposureTimeSync(const CameraData::TimeType ExposureTime) const
Synchronized version of SetExposureTime(), which blocks until a set exposure time task issued by an o...
virtual void SetCameraMode(size_t ID, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Sets the image capturing modes the camera should work in.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
const InstrumentBase::InstrumentDataGetterType InstrumentDataGetter
Getter for instrument's data. Refer to InstrumentBase::InstrumentDataGetterType.
Refer to ParamsBase::dispatch_tag.
std::function< void(const TaskBase &, ExceptionContainer &)> CallbackType
Type of a callback function which is invoked when a task has finished, failed or has been aborted....
Refer to DynExp::ParamsBase::dispatch_tag.
Thrown when a list is expected to contain entries and when a query results in an empty answer or an e...
Thrown when a requested feature is either under development and thus not implemented yet or when a sp...
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
ImageHistogramType ConvertRGBToIntensityHistogram(const ImageRGBHistogramType &RGBHistogram)
Computes an intensity (grayscale) histogram from a RGB histogram.
std::array< unsigned long long, 256 > ImageHistogramType
Alias which represents a histogram as a std::array with 256 numeric bins. The lowest (highest) index ...
ImageHistogramType ComputeIntensityHistogram(const QImage &Image)
Computes an intensity (grayscale) histogram from a QImage object.
std::tuple< ImageHistogramType, ImageHistogramType, ImageHistogramType > ImageRGBHistogramType
Alias which represents a RGB histogram as a std::tuple of three ImageHistogramType elements....
ImageRGBHistogramType ComputeRGBHistogram(const QImage &Image)
Computes a RGB histogram from a QImage object.
Accumulates include statements to provide a precompiled header.