Isis Developer Reference
Shape.h
Go to the documentation of this file.
1#ifndef Shape_H
2#define Shape_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QObject>
13
14#include <QString>
15
16#include "Angle.h"
17#include "ControlPoint.h"
18#include "Distance.h"
19#include "FileName.h"
20#include "Latitude.h"
21#include "Longitude.h"
22
23#include <SpiceUsr.h>
24#include <SpiceZfc.h>
25#include <SpiceZmc.h>
26
27class QUuid;
28class QMutex;
29class QXmlStreamWriter;
30
31namespace geos {
32 namespace geom {
33 class MultiPolygon;
34 }
35}
36
37namespace Isis {
38 class Cube;
39 class FileName;
40 class Image;
41 class Project;
42 class PvlObject;
43 class ShapeDisplayProperties;
44
66 class Shape : public QObject {
67 Q_OBJECT
68 public:
74
75 explicit Shape(QString shapeFileName, QObject *parent = 0);
76 explicit Shape(Cube *shapeCube, QObject *parent = 0);
77 ~Shape();
78
79 void fromPvl(const PvlObject &pvl);
80 PvlObject toPvl() const;
81
82 bool isFootprintable() const;
83 Cube *cube();
84 void closeCube();
88 ShapeType shapeType();
90 QString fileName() const;
91 QString serialNumber();
92 geos::geom::MultiPolygon *footprint();
93 const geos::geom::MultiPolygon *footprint() const;
94 void setId(QString id);
95
96 bool initFootprint(QMutex *cameraMutex);
97
98 double aspectRatio() const;
99 QString id() const;
100 double resolution() const;
101 Angle emissionAngle() const;
102 Angle incidenceAngle() const;
103 double lineResolution() const;
104 Distance localRadius() const;
105 Angle northAzimuth() const;
106 Angle phaseAngle() const;
107 double sampleResolution() const;
108
109 void copyToNewProjectRoot(const Project *project, FileName newProjectRoot);
110 void deleteFromDisk();
111 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
112
113 public slots:
114 void updateFileName(Project *);
115
116 private:
117 Shape(const Shape &other);
118 Shape &operator=(const Shape &rhs);
119
120 void initMemberData();
121 void initShape();
122 void initCamStats();
123 void initMapStats();
124 void initDemStats();
125
126 geos::geom::MultiPolygon *createFootprint(QMutex *cameraMutex);
127 void initQuickFootprint();
128
129 private:
130 SpiceInt *m_bodyCode;
134// QString *m_name; //!< Name of the target
135
136
141 Cube *m_cube;
142 ControlPoint::SurfacePointSource::Source m_surfacePointSource;
144 ShapeType m_shapeType;
145
149 ShapeDisplayProperties *m_displayProperties;
153 QString m_fileName;
157 QString m_serialNumber;
161 QString m_instrumentId;
165 QString m_spacecraftName;
169 geos::geom::MultiPolygon *m_footprint;
173 QUuid *m_id;
174
175 // Level 1 labels
176 double m_aspectRatio;
177 double m_resolution;
178 Angle m_emissionAngle;
179 Angle m_incidenceAngle;
180 double m_lineResolution;
181 Distance m_localRadius;
182 Angle m_northAzimuth;
183 Angle m_phaseAngle;
184 double m_sampleResolution;
185
186 // Mapping labels
187 QString m_targetName;
188 QString m_projectionName;
189 Longitude m_centerLongitude;
190 Latitude m_centerLatitude;
191 Latitude m_minimumLatitude;
192 Latitude m_maximumLatitude;
193 Longitude m_minimumLongitude;
194 Longitude m_maximumLongitude;
195 double m_pixelResolution;
196 double m_scale;
197
198 // Dem Labels
199 Distance m_minimumRadius;
200 Distance m_maximumRadius;
201 };
202
203}
204
206
207#endif
Q_DECLARE_METATYPE(Isis::Shape *)
Defines an angle and provides unit conversions.
Definition Angle.h:45
IO Handler for Isis Cubes.
Definition Cube.h:168
Distance measurement, usually in meters.
Definition Distance.h:34
File name manipulation and expansion.
Definition FileName.h:100
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
The main project for ipce.
Definition Project.h:287
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is the GUI communication mechanism for shape objects.
Definition ShapeDisplayProperties.h:58
This represents a shape in a project-based GUI interface.
Definition Shape.h:66
~Shape()
Clean up this shape.
Definition Shape.cpp:73
Shape(QString shapeFileName, QObject *parent=0)
Create an Shape from a cube file on disk.
Definition Shape.cpp:44
void closeCube()
Cleans up the Cube *.
Definition Shape.cpp:326
PvlObject toPvl() const
Convert this Shape to PVL.
Definition Shape.cpp:252
bool isFootprintable() const
Test to see if it's possible to create a footprint from this shape.
Definition Shape.cpp:278
Distance localRadius() const
Get the local radius of this shape, as calculated and attached by camstats.
Definition Shape.cpp:498
Angle phaseAngle() const
Get the phase angle of this shape, as calculated and attached by camstats.
Definition Shape.cpp:520
void updateFileName(Project *)
Change the on-disk file name for this cube to be where the shape ought to be in the given project.
Definition Shape.cpp:606
double resolution() const
Get the resolution of this shape, as calculated and attached by camstats.
Definition Shape.cpp:454
QString serialNumber()
Get the serial number.
Definition Shape.cpp:369
double sampleResolution() const
Get the sample resolution of this shape, as calculated and attached by camstats.
Definition Shape.cpp:531
ShapeDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this shape.
Definition Shape.cpp:339
double lineResolution() const
Get the line resolution of this shape, as calculated and attached by camstats.
Definition Shape.cpp:487
void deleteFromDisk()
Delete the shape data from disk.
Definition Shape.cpp:575
Angle emissionAngle() const
Get the emission angle of this shape, as calculated and attached by camstats.
Definition Shape.cpp:465
QString id() const
Get a unique, identifying string associated with this shape.
Definition Shape.cpp:443
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Output format:
Definition Shape.cpp:815
double aspectRatio() const
Get the aspect ratio of this shape, as calculated and attached by camstats.
Definition Shape.cpp:433
QString fileName() const
Get the file name of the cube that this shape represents.
Definition Shape.cpp:360
Cube * cube()
Get the Cube * associated with this display property.
Definition Shape.cpp:308
Angle incidenceAngle() const
Get the incidence angle of this shape, as calculated and attached by camstats.
Definition Shape.cpp:476
void copyToNewProjectRoot(const Project *project, FileName newProjectRoot)
Copy the cub/ecub files associated with this shape into the new project.
Definition Shape.cpp:539
ControlPoint::RadiusSource::Source radiusSource()
Definition Shape.cpp:198
bool initFootprint(QMutex *cameraMutex)
Calculate a footprint for this shape.
Definition Shape.cpp:405
void fromPvl(const PvlObject &pvl)
Read the shape settings from a Pvl.
Definition Shape.cpp:220
ShapeType shapeType()
Definition Shape.cpp:203
ShapeType
Definition Shape.h:69
@ Unknown
Definition Shape.h:73
@ Unprojected
Definition Shape.h:72
@ Dem
Definition Shape.h:70
@ Basemap
Definition Shape.h:71
void setId(QString id)
Override the automatically generated ID with the given ID.
Definition Shape.cpp:386
Angle northAzimuth() const
Get the north azimuth of this shape, as calculated and attached by camstats.
Definition Shape.cpp:509
ControlPoint::SurfacePointSource::Source surfacePointSource()
Definition Shape.cpp:193
geos::geom::MultiPolygon * footprint()
Get the footprint of this shape (if available).
Definition Shape.cpp:378
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Definition Image.h:42
Source
Definition ControlPoint.h:453
Source
Definition ControlPoint.h:442