|
ACF $AcfVersion:0$
|
Standard spectrum implementation for storing sampled spectral data. More...
#include <CSpectrum.h>
Public Member Functions | |
| CSpectrum () | |
| CSpectrum (const CSpectrum &other) | |
| 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. | |
| CSpectrum (const istd::CIntRange &wavelengthRange, const std::vector< double > &spectrumSamples) | |
| CSpectrum (int startWavelength, int endWavelength, int step) | |
| Zero initialize samples to fill range with given step. | |
| CSpectrum (const istd::CIntRange &wavelengthRange, int step) | |
| virtual const ISpectrumInfo * | GetSpectrumInfo () const override |
| virtual istd::CIntRange | GetSpectralRange () const override |
| Get the spectral range of the measured values given in nm. | |
| virtual int | GetStep () const override |
| Get distance/step between the samples in the spectrum definition (in nm). | |
| virtual int | GetSamplesCount () const override |
| Return number of samples. | |
| virtual bool | Serialize (iser::IArchive &archive) override |
| Load or store state of this object as a archive stream. | |
| virtual int | GetSupportedOperations () const override |
| Get set of flags for supported operations. | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override |
| virtual bool | IsEqual (const IChangeable &object) const override |
| virtual istd::IChangeableUniquePtr | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const override |
| Make a copy of this object. | |
| virtual bool | ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) override |
| Reset data to its default state. | |
Public Member Functions inherited from imath::CSampledFunction | |
| CSampledFunction () | |
| CSampledFunction (const CSampledFunction &function) | |
| CSampledFunction (const imath::ISampledFunction &function) | |
| CSampledFunction (int size, double defaultValue=0) | |
| bool | operator== (const CSampledFunction &other) const |
| void | Reset () |
| bool | Initialize (int size, double defaultValue=0) |
| double | GetSampleValue (int index) const |
| void | SetSampleValue (int index, double value) |
| void | SetLogicalRange (const istd::CRange &logicalRange) |
| double | GetSamplingStep () const |
| double | GetSampleCoordinate (int index) const |
| virtual bool | CreateFunction (double *dataPtr, const ArgumentType &sizes) override |
| Create function from input data. | |
| virtual int | GetTotalSamplesCount () const override |
| Get number of samples stored in this container. | |
| virtual double | GetSampleAt (const SampleIndex &index) const override |
| Get sample value at the given index. | |
| virtual int | GetGridSize (int dimensionIndex) const override |
| Get number of samples for specified dimension. | |
| virtual istd::CRange | GetLogicalRange (int dimensionIndex) const override |
| Get logical range for the specified dimension. | |
| virtual istd::CRange | GetResultValueRange (int dimensionIndex, int resultDimension=-1) const override |
| Get the range (boundary) of possible result values for the given axis. | |
| virtual std::vector< double > | GetSamples () const override |
| Get all samples as a vector. | |
| virtual bool | GetValueAt (const ArgumentType &argument, ResultType &result) const override |
| virtual ResultType | GetValueAt (const ArgumentType &argument) const override |
Public Member Functions inherited from imath::ISampledFunction | |
| double | operator[] (int index) const |
Public Member Functions inherited from imath::TISampledFunction< 1, 1 > | |
| virtual int | GetArgumentDimensionality () const |
| Get the number of argument components. | |
| virtual int | GetResultDimensionality () const |
| Get the number of result components. | |
Public Member Functions inherited from imath::TIMathFunction< istd::TIndex< ArgumentDimensions >, TVector< ResultDimensions > > | |
| virtual bool | GetValueAt (const istd::TIndex< ArgumentDimensions > &argument, TVector< ResultDimensions > &result) const=0 |
| Get function value for specified argument value. | |
| virtual TVector< ResultDimensions > | GetValueAt (const istd::TIndex< ArgumentDimensions > &argument) const=0 |
| Get function value for specified argument value. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Public Member Functions inherited from istd::IChangeable | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) |
| Copy this object from another one. | |
| virtual bool | IsEqual (const IChangeable &object) const |
| Compare this object with another object. | |
| virtual void | BeginChanges (const ChangeSet &changeSet) |
| Starts the change transaction. | |
| virtual void | EndChanges (const ChangeSet &changeSet) |
| Ends the change transaction. | |
| virtual void | BeginChangeGroup (const ChangeSet &changeSet) |
| Starts group of changes. | |
| virtual void | EndChangeGroup (const ChangeSet &changeSet) |
| Ends group of changes. | |
Public Member Functions inherited from iser::ISerializable | |
| virtual quint32 | GetMinimalVersion (int versionId) const |
| Get minimal needed version to correct storing of this data. | |
Additional Inherited Members | |
Static Public Member Functions inherited from istd::IChangeable | |
| static const ChangeSet & | GetNoChanges () |
| Get empty set of changes. | |
| static const ChangeSet & | GetAnyChange () |
| Get anonymous change set. | |
| static const ChangeSet & | GetAllChanges () |
| Get anonymous change set. | |
| static const ChangeSet & | GetDelegatedChanges () |
| Get delegated change set. | |
Protected Member Functions inherited from istd::IChangeable | |
| virtual void | OnBeginChanges () |
| Callback function for begin change event. | |
| virtual void | OnEndChanges (const ChangeSet &changeSet) |
| Callback function for end change event. | |
Standard spectrum implementation for storing sampled spectral data.
CSpectrum provides a complete implementation for storing and manipulating spectral data - measurements of light intensity across different wavelengths. It combines sampled function capabilities with spectrum-specific information like wavelength range and step size. This is the concrete class for working with spectral color data.
CSpectrum stores:
Definition at line 211 of file CSpectrum.h.
Definition at line 218 of file CSpectrum.h.
| icmm::CSpectrum::CSpectrum | ( | ) |
| icmm::CSpectrum::CSpectrum | ( | const CSpectrum & | other | ) |
| icmm::CSpectrum::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.
| icmm::CSpectrum::CSpectrum | ( | const istd::CIntRange & | wavelengthRange, |
| const std::vector< double > & | spectrumSamples | ||
| ) |
| icmm::CSpectrum::CSpectrum | ( | int | startWavelength, |
| int | endWavelength, | ||
| int | step | ||
| ) |
Zero initialize samples to fill range with given step.
| icmm::CSpectrum::CSpectrum | ( | const istd::CIntRange & | wavelengthRange, |
| int | step | ||
| ) |
|
overridevirtual |
Make a copy of this object.
Reimplemented from imath::CSampledFunction.
|
overridevirtual |
Reimplemented from imath::CSampledFunction.
|
overridevirtual |
Return number of samples.
Implements icmm::ISpectrumInfo.
|
overridevirtual |
Get the spectral range of the measured values given in nm.
Implements icmm::ISpectrumInfo.
|
overridevirtual |
Implements icmm::ISpectrumInfoProvider.
|
overridevirtual |
Get distance/step between the samples in the spectrum definition (in nm).
We assume that we have regular sampling grid.
Implements icmm::ISpectrumInfo.
|
overridevirtual |
Get set of flags for supported operations.
Reimplemented from imath::CSampledFunction.
|
overridevirtual |
Reimplemented from imath::CSampledFunction.
|
overridevirtual |
Reset data to its default state.
Default implementation in istd::IChangeable does nothing.
true if the operation was successful, and false otherwise. Reimplemented from imath::CSampledFunction.
|
overridevirtual |
Load or store state of this object as a archive stream.
Type of operation is depending on archive type.
Implements iser::ISerializable.