9#include "MdiCubeViewport.h"
10#include "Projection.h"
11#include "RingPlaneProjection.h"
12#include "SpecialPixel.h"
14#include "TProjection.h"
15#include "ViewportBuffer.h"
16#include "WarningWidget.h"
118 if(cvp == NULL)
return;
120 if(p.x() >= 0 && p.x() < cvp->width() &&
121 p.y() >= 0 && p.y() < cvp->height()) {
153 if((sample < 0.5) || (line < 0.5) ||
159 int isamp = (int)(sample + 0.5);
165 int iline = (int)(line + 0.5);
184 p_latLabel->setText(QString(
"DEC %1").arg(lat));
185 p_lonLabel->setText(QString(
"RA %1").arg(lon));
188 p_latLabel->setText(QString(
"Lat %1").arg(lat));
189 p_lonLabel->setText(QString(
"Lon %1").arg(lon));
197 p_latLabel->setText(QString(
"Rad %1").arg(rad));
198 p_lonLabel->setText(QString(
"Lon %1").arg(lon));
207 else if(cvp->
camera() != NULL) {
216 p_latLabel->setText(QString(
"DEC %1").arg(dec));
217 p_lonLabel->setText(QString(
"RA %1").arg(ra));
222 p_latLabel->setText(QString(
"Lat %1").arg(lat));
223 p_lonLabel->setText(QString(
"Lon %1").arg(lon));
230 p_latLabel->setText(QString(
"Rad %1").arg(rad));
231 p_lonLabel->setText(QString(
"Lon %1").arg(lon));
253 QString pixelString = updateColorLabel(p, buf,
p_grayLabel);
264 QString pixelString = updateColorLabel(p, redBuf,
p_redLabel);
270 pixelString = updateColorLabel(p, greenBuf,
p_grnLabel);
276 pixelString = updateColorLabel(p, blueBuf,
p_bluLabel);
283 QString TrackTool::updateColorLabel(QPoint p,
ViewportBuffer *buf, QLabel *label) {
287 if(p.x() >= rRect.left() && p.x() < rRect.right() &&
288 p.y() >= rRect.top() && p.y() < rRect.bottom()) {
289 const int rBufX = p.x() - rRect.left();
290 const int rBufY = p.y() - rRect.top();
320 QPoint p =
cubeViewport()->viewport()->mapFromGlobal(QCursor::pos());
321 if(p.x() < 0)
return;
322 if(p.y() < 0)
return;
323 if(p.x() >=
cubeViewport()->viewport()->width())
return;
324 if(p.y() >=
cubeViewport()->viewport()->height())
return;
353 QStatusBar *TrackTool::getStatusBar(
void) {
virtual bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
int cubeLines() const
Return the number of lines in the cube.
ViewportBuffer * grayBuffer()
Returns the gray viewport buffer (Will be NULL if in RGB mode.)
int cubeSamples() const
Return the number of samples in the cube.
void viewportToCube(int x, int y, double &sample, double &line) const
Turns a viewport into a cube.
ViewportBuffer * greenBuffer()
Returns the green viewport buffer (Will be NULL if in Gray mode.)
ViewportBuffer * redBuffer()
Returns the red viewport buffer (Will be NULL if in Gray mode.)
ViewportBuffer * blueBuffer()
Returns the blue viewport buffer (Will be NULL if in Gray mode.)
Projection * projection() const
double meters() const
Get the distance in meters.
Adds specific functionality to C++ strings.
QString ToQt() const
Retuns the object string as a QString.
Cube display widget for certain Isis MDI applications.
ProjectionType
This enum defines the subclasses of Projection supported in Isis.
@ Triaxial
These projections are used to map triaxial and irregular-shaped bodies.
virtual bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
bool IsSky() const
Returns true if projection is sky and false if it is land.
ProjectionType projectionType() const
Returns an enum value for the projection type.
Base class for Map Projections of plane shapes.
double RingRadius() const
This returns a radius.
double RingLongitude() const
This returns a ring longitude with correct ring longitude direction and domain as specified in the la...
virtual double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
virtual double RightAscension()
Returns the right ascension angle (sky longitude).
virtual double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
Distance LocalRadius() const
Returns the local radius at the intersection point.
virtual double Declination()
Returns the declination angle (sky latitude).
QString name() const
Gets the shape name.
virtual Target * target() const
Returns a pointer to the target object.
Base class for Map TProjections.
virtual double Latitude() const
This returns a latitude with correct latitude type as specified in the label object.
virtual double Longitude() const
This returns a longitude with correct longitude direction and domain as specified in the label object...
ShapeModel * shape() const
Return the shape.
bool isSky() const
Return if our target is the sky.
Reads and stores visible DN values.
const std::vector< double > & getLine(int line)
Retrieves a line from the buffer.
QRect bufferXYRect()
Returns a rect, in screen pixels, of the area this buffer covers.
bool working()
This tests if queued actions exist in the viewport buffer.
This is free and unencumbered software released into the public domain.
QString PixelToString(double d, double precision=8)
Takes a double pixel value and returns the name of the pixel type as a string.