Isis 3 Programmer Reference
Spectel.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 
8 #include "Spectel.h"
9 
10 namespace 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 
76  }
77 
78 
81  Pixel::operator=(other);
82  m_center = other.centerWavelength();
83  m_width = other.filterWidth();
84  return *this;
85  }
86 
87 
95  double Spectel::centerWavelength() const {
96  return m_center;
97  }
98 
99 
107  double Spectel::filterWidth() const {
108  return m_width;
109  }
110 }
Isis::Spectel
Stores information about a "Spectral pixel" or spectel.
Definition: Spectel.h:26
Isis::Spectel::centerWavelength
double centerWavelength() const
Gets central wavelength of spectel.
Definition: Spectel.cpp:95
Isis::Pixel::operator=
Pixel & operator=(const Pixel &other)
Copy assignment operator.
Definition: Pixel.cpp:66
Isis::Spectel::filterWidth
double filterWidth() const
Gets wavelength width associated with spectel.
Definition: Spectel.cpp:107
Isis::Spectel::m_center
double m_center
Center wavelength associated with pixel.
Definition: Spectel.h:41
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::Pixel
Store and/or manipulate pixel values.
Definition: Pixel.h:48
Isis::Spectel::~Spectel
virtual ~Spectel()
Default destructor.
Definition: Spectel.cpp:75
Isis::Spectel::Spectel
Spectel()
Constructs an empty Spectel.
Definition: Spectel.cpp:18
Isis::Spectel::m_width
double m_width
Wavelength width (FWHM) associated with pixel.
Definition: Spectel.h:43
Isis::Spectel::operator=
Spectel & operator=(const Spectel &other)
Copy assignment operator.
Definition: Spectel.cpp:80
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16