File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
Reduce.h
Go to the documentation of this file.
1 #ifndef _REDUCE_H_
2 #define _REDUCE_H_
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "Buffer.h"
10 #include "Cube.h"
11 #include "IString.h"
12 #include "Portal.h"
13 
14 #include <cmath>
15 
16 namespace Isis {
47  class Reduce {
48  public:
50  Reduce(Isis::Cube *pInCube,const double sampleScale, const double lineScale);
51 
53  ~Reduce();
54 
57 
59  void setInputBoundary(int startSample, int endSample,
60  int startLine, int endLine);
61 
62  protected:
64  double mdSampleScale;
65  double mdLineScale;
69  int miEndLine;
70  mutable double mdLine;
76  mutable int miBandIndex;
78  };
79 
80 
88  class Nearest : public Isis::Reduce {
89  public:
91  Nearest(Isis::Cube *pInCube, double pdSampleScale, double pdLineScale)
92  :Reduce(pInCube, pdSampleScale, pdLineScale){
93  }
94 
96  void operator() (Isis::Buffer & out) const;
97  };
98 
99 
107  class Average : public Isis::Reduce {
108  public:
110  Average(Isis::Cube *pInCube, double pdSampleScale, double pdLineScale,
111  double pdValidPer, QString psReplaceMode)
112  : Reduce(pInCube, pdSampleScale, pdLineScale){
113  mdValidPer = pdValidPer;
114  msReplaceMode = psReplaceMode;
115  }
116 
118  void operator() (Isis::Buffer & out) const;
119 
120  private:
121  mutable double mdValidPer;
122  QString msReplaceMode;
123  mutable double *mdIncTab;
124  mutable double *mdSum;
125  mutable double *mdNpts;
126  mutable double *mdSum2;
127  mutable double *mdNpts2;
128  };
129 
130 }
131 
132 #endif
Portal.h
Cube.h
Isis::Portal
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:36
Isis::SubArea::SetSubArea
void SetSubArea(const int orignl, const int origns, const int sl, const int ss, const int el, const int es, const double linc, const double sinc)
Defines the subarea.
Definition: SubArea.cpp:60
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::Average
Functor for reduce using average functionality.
Definition: Reduce.h:107
SpecialPixel.h
Isis::Reduce::miStartLine
int miStartLine
Input start line.
Definition: Reduce.h:68
Isis::Reduce::miEndSample
int miEndSample
Input end sample.
Definition: Reduce.h:67
Reduce.h
Isis::Nearest
Functor for reduce using near functionality.
Definition: Reduce.h:88
Isis::Reduce::miInputLines
int miInputLines
Input Lines.
Definition: Reduce.h:74
Isis::Reduce::mdLine
double mdLine
Line index.
Definition: Reduce.h:70
Isis::Reduce::miInputBands
int miInputBands
Input Bands.
Definition: Reduce.h:75
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::Nearest::Nearest
Nearest(Isis::Cube *pInCube, double pdSampleScale, double pdLineScale)
Constructor.
Definition: Reduce.h:91
Isis::Average::operator()
void operator()(Isis::Buffer &out) const
Operator () overload.
Definition: Reduce.cpp:172
SubArea.h
IString.h
Isis::Reduce::UpdateOutputLabel
Isis::PvlGroup UpdateOutputLabel(Isis::Cube *pOutCube)
Create label for the reduced output image.
Definition: Reduce.cpp:112
Isis::Reduce::miEndLine
int miEndLine
Input end line.
Definition: Reduce.h:69
Isis::Buffer
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Buffer.h
Isis::Nearest::operator()
void operator()(Isis::Buffer &out) const
Operator () overload.
Definition: Reduce.cpp:145
Isis::SubArea::UpdateLabel
void UpdateLabel(Cube *icube, Cube *ocube, PvlGroup &results)
Modifies a label for a file containing a subarea.
Definition: SubArea.cpp:126
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::Reduce::miStartSample
int miStartSample
Input start sample.
Definition: Reduce.h:66
Isis::Reduce::miOutputLines
int miOutputLines
Output Lines.
Definition: Reduce.h:72
Isis::Reduce::~Reduce
~Reduce()
Destructor.
Definition: Reduce.cpp:66
Isis::Reduce
Reduce the pixel dimensions of an image.
Definition: Reduce.h:47
Isis::Reduce::setInputBoundary
void setInputBoundary(int startSample, int endSample, int startLine, int endLine)
Parameters to input image sub area.
Definition: Reduce.cpp:87
Isis::Cube::sampleCount
int sampleCount() const
Definition: Cube.cpp:1807
Isis::Reduce::mInCube
Isis::Cube * mInCube
Input image.
Definition: Reduce.h:63
Isis::Reduce::miInputSamples
int miInputSamples
Input Samples.
Definition: Reduce.h:73
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Reduce::mdLineScale
double mdLineScale
Line scale.
Definition: Reduce.h:65
Isis::Reduce::miBandIndex
int miBandIndex
Band Index.
Definition: Reduce.h:76
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::Buffer::Band
int Band(const int index=0) const
Returns the band position associated with a shape buffer index.
Definition: Buffer.cpp:162
std
Namespace for the standard library.
Isis::Reduce::Reduce
Reduce(Isis::Cube *pInCube, const double sampleScale, const double lineScale)
Constructor.
Definition: Reduce.cpp:32
Isis::IsValidPixel
bool IsValidPixel(const double d)
Returns if the input pixel is valid.
Definition: SpecialPixel.h:223
Isis::Reduce::m_iPortal
Isis::Portal * m_iPortal
Input portal.
Definition: Reduce.h:77
Isis::Reduce::miOutputSamples
int miOutputSamples
Output Samples.
Definition: Reduce.h:71
Isis::SubArea
Apply corrections to a cube label for subarea extraction.
Definition: SubArea.h:47
Isis::Buffer::size
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
Isis::Reduce::mdSampleScale
double mdSampleScale
Sample scale.
Definition: Reduce.h:64
Isis::Buffer::Line
int Line(const int index=0) const
Returns the line position associated with a shape buffer index.
Definition: Buffer.cpp:145
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Average::Average
Average(Isis::Cube *pInCube, double pdSampleScale, double pdLineScale, double pdValidPer, QString psReplaceMode)
Constructor.
Definition: Reduce.h:110

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 03/21/2022 06:51:20