Isis 3 Programmer Reference
Spectel.cpp
1
6/* SPDX-License-Identifier: CC0-1.0 */
7
8#include "Spectel.h"
9
10namespace Isis{
11
19 Pixel(0, 0, 0, Isis::Null) {
22 }
23
24
38 Spectel::Spectel(int sample, int line, int band, double DN, double center, double width):
39 Pixel(sample, line, band, DN) {
40 m_center = center;
41 m_width = width;
42 }
43
54 Spectel::Spectel(Pixel pixel, double center, double width) : Pixel(pixel) {
55 m_center = center;
56 m_width = width;
57 }
58
59
67 Spectel::Spectel(const Spectel& spectel) : Pixel(spectel.sample(),
68 spectel.line(), spectel.band(), spectel.DN()) {
69 m_center = spectel.centerWavelength();
70 m_width = spectel.filterWidth();
71 }
72
73
77
78
81 Pixel::operator=(other);
82 m_center = other.centerWavelength();
83 m_width = other.filterWidth();
84 return *this;
85 }
86
87
96 return m_center;
97 }
98
99
107 double Spectel::filterWidth() const {
108 return m_width;
109 }
110}
Store and/or manipulate pixel values.
Definition Pixel.h:48
Pixel & operator=(const Pixel &other)
Copy assignment operator.
Definition Pixel.cpp:66
Stores information about a "Spectral pixel" or spectel.
Definition Spectel.h:26
virtual ~Spectel()
Default destructor.
Definition Spectel.cpp:75
double m_center
Center wavelength associated with pixel.
Definition Spectel.h:41
double centerWavelength() const
Gets central wavelength of spectel.
Definition Spectel.cpp:95
Spectel & operator=(const Spectel &other)
Copy assignment operator.
Definition Spectel.cpp:80
double filterWidth() const
Gets wavelength width associated with spectel.
Definition Spectel.cpp:107
double m_width
Wavelength width (FWHM) associated with pixel.
Definition Spectel.h:43
Spectel()
Constructs an empty Spectel.
Definition Spectel.cpp:18
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
const double Null
Value for an Isis Null pixel.