ACF $AcfVersion:0$
CSpectrum.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
8#include <icmm/ISpectrum.h>
10
11
12namespace icmm
13{
14
15
213 virtual public ISpectrum,
214 virtual protected ISpectrumInfo,
215 virtual public iser::ISerializable
216{
217public:
219
221 CSpectrum(const CSpectrum& other);
222
227 CSpectrum(int startWavelength, int endWavelength, const std::vector<double>& spectrumSamples);
228 CSpectrum(const istd::CIntRange& wavelengthRange, const std::vector<double>& spectrumSamples);
229
233 CSpectrum(int startWavelength, int endWavelength, int step);
234 CSpectrum(const istd::CIntRange& wavelengthRange, int step);
235
236 // reimplemented (icmm::ISpectrumInfoProvider)
237 virtual const ISpectrumInfo* GetSpectrumInfo() const override;
238
239 // reimplemented (icmm::ISpectrumInfo)
240 virtual istd::CIntRange GetSpectralRange() const override;
241 virtual int GetStep() const override;
242 virtual int GetSamplesCount() const override;
243
244 // reimplemented (iser::ISerializable)
245 virtual bool Serialize(iser::IArchive& archive) override;
246
247 // reimplemented (istd::IChangeable)
248 virtual int GetSupportedOperations() const override;
249 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
250 virtual bool IsEqual(const IChangeable& object) const override;
252 virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS) override;
253};
254
255
256} // namespace icmm
257
258
Standard spectrum implementation for storing sampled spectral data.
Definition CSpectrum.h:216
virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
imath::CSampledFunction BaseClass
Definition CSpectrum.h:218
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
virtual istd::CIntRange GetSpectralRange() const override
Get the spectral range of the measured values given in nm.
virtual const ISpectrumInfo * GetSpectrumInfo() const override
CSpectrum(const CSpectrum &other)
virtual int GetStep() const override
Get distance/step between the samples in the spectrum definition (in nm).
virtual bool IsEqual(const IChangeable &object) const override
CSpectrum(int startWavelength, int endWavelength, const std::vector< double > &spectrumSamples)
Initialize with given samples First sample is at the start of the range, last sample is at the end.
virtual int GetSamplesCount() const override
Return number of samples.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
CSpectrum(int startWavelength, int endWavelength, int step)
Zero initialize samples to fill range with given step.
virtual bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS) override
Reset data to its default state.
CSpectrum(const istd::CIntRange &wavelengthRange, int step)
CSpectrum(const istd::CIntRange &wavelengthRange, const std::vector< double > &spectrumSamples)
Common interface for a measured or sampled spectrum.
Definition ISpectrum.h:152
Common interface for describing the properties or meta-informations of a measured/sampled spectrum.
Implementation of 1D sampled function with uniform sampling grid.
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common class for all classes which objects can be archived or restored from archive.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains color management classes.