Isis Developer Reference
ProcessPolygons.h
Go to the documentation of this file.
1 #ifndef ProcessPolygons_h
2 #define ProcessPolygons_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include <geos/geom/Coordinate.h>
10 #include <geos/geom/MultiPolygon.h>
11 #include <geos/geom/Polygon.h>
12 
13 #include "Brick.h"
14 #include "FileName.h"
15 #include "Process.h"
16 #include "ProjectionFactory.h"
17 
18 namespace Isis {
19 
47  class ProcessPolygons : public Isis::Process {
48 
49  public:
51 
52  void SetStatCubes(const QString &parameter, const int nsamps,
53  const int nlines, int nbands = 1);
54 
55  void SetStatCubes(const QString &avgFileName, const QString
56  &countFileName, Isis::CubeAttributeOutput &atts,
57  const int nsamps, const int nlines, int nbands = 1);
58  void SetIntersectAlgorithm(const bool useCenter);
59 
60  Isis::Cube *AppendOutputCube(const QString &avgFileName,
61  const QString &countFileName = "");
62 
63  void Rasterize(std::vector<double> &samples,
64  std::vector<double> &lines,
65  std::vector<double> &values);
66 
67  void Rasterize(std::vector<double> &samples,
68  std::vector<double> &lines,
69  int &band, double &value);
70 
71  void EndProcess();
72  void Finalize();
73 
74  private:
75  void FillPolygon(int Flag);
76  void GetPolygonCoords();
77 
78  bool m_useCenter;
79  std::vector<double> m_sampleVertices, m_lineVertices, m_dns;
80  int m_band;
81  Brick *m_average;
82  Brick *m_count;
83  geos::geom::Polygon *m_imagePoly;
84 
85  };
86 
87 };
88 
89 #endif
FileName.h
ProjectionFactory.h
Isis::ProcessPolygons::Rasterize
void Rasterize(std::vector< double > &samples, std::vector< double > &lines, std::vector< double > &values)
Definition: ProcessPolygons.cpp:44
Isis::BoxcarCachingAlgorithm
This algorithm is designed for applications that jump around between a couple of spots in the cube wi...
Definition: BoxcarCachingAlgorithm.h:32
Isis::ProcessPolygons
Definition: ProcessPolygons.h:47
BoxcarCachingAlgorithm.h
SpecialPixel.h
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Process.h
Isis::ProcessPolygons::ProcessPolygons
ProcessPolygons()
Definition: ProcessPolygons.cpp:28
Isis::Process
Base class for all cube processing derivatives.
Definition: Process.h:143
Isis::CubeAttributeOutput
Manipulate and parse attributes of output cube filenames.
Definition: CubeAttribute.h:473
Isis::globalFactory
static geos::geom::GeometryFactory::Ptr globalFactory
Definition: PolygonTools.h:51
Isis::Brick
Buffer for containing a three dimensional section of an image.
Definition: Brick.h:45
Isis::FileName::baseName
QString baseName() const
Returns the name of the file without the path and without extensions.
Definition: FileName.cpp:145
Isis::ProcessPolygons::Finalize
void Finalize()
Cleans up by closing cubes and freeing memory for owned cubes.
Definition: ProcessPolygons.cpp:258
Isis::ProcessPolygons::SetIntersectAlgorithm
void SetIntersectAlgorithm(const bool useCenter)
Sets the algorithm for how output pixels are rasterized.
Definition: ProcessPolygons.cpp:380
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
ProcessPolygons.h
Application.h
Isis::ProcessPolygons::EndProcess
void EndProcess()
Definition: ProcessPolygons.cpp:245
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::ProcessPolygons::AppendOutputCube
Isis::Cube * AppendOutputCube(const QString &avgFileName, const QString &countFileName="")
This gives the option to append to the cube.
Definition: ProcessPolygons.cpp:275
Isis::ProcessPolygons::SetStatCubes
void SetStatCubes(const QString &parameter, const int nsamps, const int nlines, int nbands=1)
Definition: ProcessPolygons.cpp:355
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Brick.h
Isis::FileName::extension
QString extension() const
Returns the last extension of the file name.
Definition: FileName.cpp:178
std
Namespace for the standard library.
Isis::IsValidPixel
bool IsValidPixel(const double d)
Returns if the input pixel is valid.
Definition: SpecialPixel.h:223
PolygonTools.h
Isis::Cube::open
void open(const QString &cfile, QString access="r")
This method will open an isis cube for reading or reading/writing.
Definition: Cube.cpp:627
Isis::FileName::path
QString path() const
Returns the path of the file name.
Definition: FileName.cpp:103
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16