1 #include "QnetPointDistanceFilter.h" 40 QLabel *label =
new QLabel(
"Filter points that are within given distance of another point.");
41 QLabel *lessThan =
new QLabel(
"Distance to another point is less than");
42 m_lineEdit =
new QLineEdit;
43 QLabel *meters =
new QLabel(
"meters");
44 QLabel *pad =
new QLabel;
47 QGridLayout *gridLayout =
new QGridLayout();
48 gridLayout->addWidget(label, 0, 0, 1, 2);
49 gridLayout->addWidget(lessThan, 1, 0);
50 gridLayout->addWidget(m_lineEdit, 1, 1);
51 gridLayout->addWidget(meters, 1, 2);
52 gridLayout->addWidget(pad, 2, 0);
53 gridLayout->setRowStretch(2, 50);
54 this->setLayout(gridLayout);
81 if (controlNet() == NULL) {
82 QMessageBox::information((
QWidget *)parent(),
83 "Error",
"No points to filter");
88 if (m_lineEdit->text() ==
"") {
89 QMessageBox::information((
QWidget *)parent(),
90 "Error",
"Distance value must be entered");
94 double userEntered = m_lineEdit->text().toDouble();
100 for (
int i = filteredPoints().size() - 1; i >= 0; i--) {
101 ControlPoint &cp1 = *(*controlNet())[filteredPoints()[i]];
116 cam1 = controlNet()->
Camera(camIndex1);
117 cam1->
SetImage(cm1.GetSample(), cm1.GetLine());
122 for (
int j = 0; j < controlNet()->
GetNumPoints(); j++) {
123 if (j == filteredPoints()[i]) {
136 cam2 = controlNet()->
Camera(camIndex2);
137 cam2->
SetImage(cm2.GetSample(), cm2.GetLine());
145 if (dist < userEntered) {
146 if (!temp.contains(filteredPoints()[i])) {
147 temp.push_back(filteredPoints()[i]);
155 qSort(temp.begin(), temp.end());
157 filteredPoints() = temp;
160 emit filteredListModified();
This class defines a body-fixed surface point.
int serialNumberIndex(const QString &sn)
Return a list index given a serial number.
Distance GetDistanceToPoint(const SurfacePoint &other) const
Computes and returns the distance between two surface points.
SurfacePoint GetBestSurfacePoint() const
Returns the adjusted surface point if it exists, otherwise returns the a priori surface point...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
int GetNumPoints() const
Return the number of control points in the network.
virtual void filter()
Filters a list of points for points that are less than the user entered distance from another point i...
const ControlMeasure * GetRefMeasure() const
Get the reference control measure.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
Namespace for ISIS/Bullet specific routines.
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
Distance GetLocalRadius() const
Return the radius of the surface point.
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
QnetPointDistanceFilter(QnetNavTool *navTool, QWidget *parent=0)
Contructor for the Point Distance filter.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.