Isis 3 Programmer Reference
Image.h
Go to the documentation of this file.
1
2#ifndef Image_H
3#define Image_H
26#include <QObject>
27
28#include <QString>
29
30#include "Angle.h"
31#include "Distance.h"
32#include "FileName.h"
33
34#include <SpiceUsr.h>
35#include <SpiceZfc.h>
36#include <SpiceZmc.h>
37
38class QUuid;
39class QMutex;
40class QXmlStreamWriter;
41
42namespace geos {
43 namespace geom {
44 class MultiPolygon;
45 }
46}
47
48namespace Isis {
49 class Cube;
50 class FileName;
51 class ImageDisplayProperties;
52 class Project;
53 class PvlObject;
54
105 class Image : public QObject {
106 Q_OBJECT
107 public:
108 explicit Image(QString imageFileName, QObject *parent = 0);
109 explicit Image(Cube *imageCube, QObject *parent = 0);
110 explicit Image(Cube *imageCube, geos::geom::MultiPolygon *footprint, QString id,
111 QObject *parent = 0);
112 ~Image();
113
114 void fromPvl(const PvlObject &pvl);
115 PvlObject toPvl() const;
116
117 bool isFootprintable() const;
118 Cube *cube();
119 void closeCube();
122 QString fileName() const;
123 QString observationNumber();
124 QString serialNumber();
125 geos::geom::MultiPolygon *footprint();
126 const geos::geom::MultiPolygon *footprint() const;
127 void setId(QString id);
128
129 bool initFootprint(QMutex *cameraMutex);
130
131 double aspectRatio() const;
132 QString id() const;
133 double resolution() const;
134 Angle emissionAngle() const;
135 Angle incidenceAngle() const;
136 double lineResolution() const;
137 Distance localRadius() const;
138 Angle northAzimuth() const;
139 Angle phaseAngle() const;
140 double sampleResolution() const;
141
142 void copyToNewProjectRoot(const Project *project, FileName newProjectRoot);
143 void deleteFromDisk();
144 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
145
146 public slots:
147 void updateFileName(Project *);
148
149 private:
150 geos::geom::MultiPolygon *createFootprint(QMutex *cameraMutex);
151 void initCamStats();
152 void initQuickFootprint();
153
154 private:
155 Image(const Image &other);
156 Image &operator=(const Image &rhs);
157
158 SpiceInt *m_bodyCode;
162 // QString *m_name; //!< Name of the target
163
164
170
175
179 QString m_fileName;
180
185
190
195
200
204 geos::geom::MultiPolygon *m_footprint;
208 QUuid *m_id;
209
219
220 };
221 // TODO: add QDataStream >> and << ???
222}
223
224Q_DECLARE_METATYPE(Isis::Image *);
225
226#endif
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 is the GUI communication mechanism for cubes.
This represents a cube in a project-based GUI interface.
Definition Image.h:105
Cube * cube()
Get the Cube pointer associated with this display property.
Definition Image.cpp:262
Angle incidenceAngle() const
Get the incidence angle of this image, as calculated and attached by camstats.
Definition Image.cpp:450
double m_sampleResolution
Sample resolution of the image.
Definition Image.h:215
void copyToNewProjectRoot(const Project *project, FileName newProjectRoot)
Copy the cub/ecub files associated with this image into the new project.
Definition Image.cpp:509
void setId(QString id)
Override the automatically generated ID with the given ID.
Definition Image.cpp:358
Distance m_localRadius
Local radius of the image.
Definition Image.h:216
Angle phaseAngle() const
Get the phase angle of this image, as calculated and attached by camstats.
Definition Image.cpp:490
QString m_instrumentId
Instrument id associated with this Image.
Definition Image.h:184
void closeCube()
Cleans up the Cube pointer.
Definition Image.cpp:282
Distance localRadius() const
Get the local radius of this image, as calculated and attached by camstats.
Definition Image.cpp:470
geos::geom::MultiPolygon * footprint()
Get the footprint of this image (if available).
Definition Image.cpp:349
SpiceInt * m_bodyCode
The NaifBodyCode value, if it exists in the labels.
Definition Image.h:158
double m_lineResolution
Line resolution of the image.
Definition Image.h:214
QString serialNumber()
Returns the serial number of the Cube.
Definition Image.cpp:336
QUuid * m_id
A unique ID for this Image (useful for others to reference this Image when saving to disk).
Definition Image.h:208
~Image()
Clean up this image.
Definition Image.cpp:136
double m_aspectRatio
Aspect ratio of the image.
Definition Image.h:210
QString m_serialNumber
The serial number for this image.
Definition Image.h:194
Angle m_incidenceAngle
Incidence angle of the image.
Definition Image.h:213
Angle emissionAngle() const
Get the emission angle of this image, as calculated and attached by camstats.
Definition Image.cpp:440
void updateFileName(Project *)
Change the on-disk file name for this cube to be where the image ought to be in the given project.
Definition Image.cpp:666
double lineResolution() const
Get the line resolution of this image, as calculated and attached by camstats.
Definition Image.cpp:460
bool isFootprintable() const
Test to see if it's possible to create a footprint from this image.
Definition Image.cpp:228
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Write the Image properties out to an XML file.
Definition Image.cpp:601
Angle m_emissionAngle
Emmission angle of the image.
Definition Image.h:212
double aspectRatio() const
Get the aspect ratio of this image, as calculated and attached by camstats.
Definition Image.cpp:411
QString m_fileName
The on-disk file name of the cube associated with this Image.
Definition Image.h:179
PvlObject toPvl() const
Convert this Image to PVL.
Definition Image.cpp:201
Image(QString imageFileName, QObject *parent=0)
Create an image from a cube file on disk.
Definition Image.cpp:40
Angle m_phaseAngle
Phase angle for the image.
Definition Image.h:218
QString m_spacecraftName
Spacecraft name associated with this Image.
Definition Image.h:199
double m_resolution
Resolution of the image.
Definition Image.h:211
QString m_observationNumber
The observation number for this image.
Definition Image.h:189
Cube * m_cube
The cube associated with this Image.
Definition Image.h:169
ImageDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this image.
Definition Image.cpp:295
Angle northAzimuth() const
Get the north azimuth of this image, as calculated and attached by camstats.
Definition Image.cpp:480
QString observationNumber()
Returns the observation number of the Cube.
Definition Image.cpp:324
Angle m_northAzimuth
North Azimuth for the image.
Definition Image.h:217
QString fileName() const
Get the file name of the cube that this image represents.
Definition Image.cpp:315
void initCamStats()
Checks to see if the Cube label contains Camera Statistics.
Definition Image.cpp:709
QString id() const
Get a unique, identifying string associated with this image.
Definition Image.cpp:420
double resolution() const
Get the resolution of this image, as calculated and attached by camstats.
Definition Image.cpp:430
void fromPvl(const PvlObject &pvl)
Read the image settings from a Pvl.
Definition Image.cpp:169
bool initFootprint(QMutex *cameraMutex)
Calculate a footprint for this image.
Definition Image.cpp:384
void deleteFromDisk()
Delete the image data from disk.
Definition Image.cpp:561
geos::geom::MultiPolygon * createFootprint(QMutex *cameraMutex)
Calculates a footprint for an Image using the camera or projection information.
Definition Image.cpp:681
ImageDisplayProperties * m_displayProperties
The GUI information for how this Image ought to be displayed.
Definition Image.h:174
geos::geom::MultiPolygon * m_footprint
A 0-360 ocentric lon,lat degrees footprint of this Image.
Definition Image.h:204
void initQuickFootprint()
Creates a default ImagePolygon option which is read into the Cube.
Definition Image.cpp:792
double sampleResolution() const
Get the sample resolution of this image, as calculated and attached by camstats.
Definition Image.cpp:500
The main project for ipce.
Definition Project.h:287
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16