GLIMSView Source Code Documentation

ImageCalculatorDialog Class Reference

#include <ImageCalculatorDialog.h>

Inheritance diagram for ImageCalculatorDialog:

Inheritance graph
[legend]

List of all members.


Detailed Description

ImageCalculatorDialog is the GUI interface for the image calculation and arithmatic.

This class handles all user input, and calls other classes for actual computation.

Author:
Erica Liszewski 2006-04-20
What's New:
2006-07-28 New Image Calculator tool auto-generates polygons based on conditional statement that includes/excludes pixels from the area
History:
2006-08-06 Deborah Lee Soltesz added algorithm choosing functionality. The choice is passed along to the ImageShapeFinder class that implements the algorithm through the ImageCalculator class. This is a temporary capability and will be removed when the final algorithm is developed.
Todo:
dls 2006-08-06 remove algorithm choice functionality

Definition at line 38 of file ImageCalculatorDialog.h.


Signals

void imgCalcComplete ()

Public Member Functions

 ImageCalculatorDialog (GLIMSProject *proj)
 ImageCalculatorDialog(GLIMSProject *proj) GLIMSProject *proj - the project this is associated with Creates a new ImageCalculatorDialog associated with the specified project;.
 ~ImageCalculatorDialog ()
 ~ImageCalculatorDialog() destructor

Protected Slots

void doCalculation ()
 void doCalculation() Called when the go button is pushed.
void clearEquation ()
 void clearEquation() Called when the Clear button is pushed.
void acceptString (char *ch)
 void acceptString(char* ch) char* ch - the string to be added Called when various buttons are pressed that add a string value to the equation (i.e.
void acceptFunction (char *ch)
 void acceptFunction(char* ch) char* ch - the function to be added Called when various buttons are pushed, The function name is passed in as a string, and the parenthesis are places at the end.
void acceptFunction (const QString &ch)
 void acceptFunction(const QString & ch) const QString & ch - the function to be added Same as above, but takes a QString instead of a char*.
void insertBand (QListBoxItem *item)
 void insertBand(QListBoxItem * item) QListBoxItem * item - the layer to be added Adds a variable representing a layer to the equation.
void setColor (int index)

Protected Member Functions

void buildDialog ()
 void buildDialog() Build up the GUI dialog box

Protected Attributes

GLIMSProjectmProj
 the project
ImageCalculatorcalculator
 the calculator that does processing
QPushButtongo
 start calculation button
QPushButtoncancel
 cancel button
QLineEdit * equation
 the equation entered by user
QComboBox * functions
 possible functions
QComboBox * lineStyle
 possible line styles
QListBox * variables
 possible variables (layers)
QVBoxLayout * vbox
 box layout for layout
QComboBox * algorithms

Constructor & Destructor Documentation

ImageCalculatorDialog::ImageCalculatorDialog ( GLIMSProject proj  ) 

ImageCalculatorDialog(GLIMSProject *proj) GLIMSProject *proj - the project this is associated with Creates a new ImageCalculatorDialog associated with the specified project;.

Definition at line 6 of file ImageCalculatorDialog.cpp.

References buildDialog(), calculator, and mProj.

Here is the call graph for this function:

ImageCalculatorDialog::~ImageCalculatorDialog (  ) 

~ImageCalculatorDialog() destructor

Definition at line 15 of file ImageCalculatorDialog.cpp.

References calculator.


Member Function Documentation

void ImageCalculatorDialog::buildDialog (  )  [protected]

void ImageCalculatorDialog::doCalculation (  )  [protected, slot]

void doCalculation() Called when the go button is pushed.

Starts the calculation with the equation currently in the equation QLineEdit.

Todo:
dls - get rid of algorithm chooser

Definition at line 310 of file ImageCalculatorDialog.cpp.

References algorithms, ImageCalculator::calculate(), calculator, equation, imgCalcComplete(), lineStyle, and ImageCalculator::setAlgorithm().

Referenced by buildDialog().

void ImageCalculatorDialog::clearEquation (  )  [protected, slot]

void clearEquation() Called when the Clear button is pushed.

Clears the equation in the QLineEdit.

Definition at line 319 of file ImageCalculatorDialog.cpp.

References equation.

Referenced by buildDialog().

void ImageCalculatorDialog::acceptString ( char *  ch  )  [protected, slot]

void acceptString(char* ch) char* ch - the string to be added Called when various buttons are pressed that add a string value to the equation (i.e.

things like 'and', 'or', etc).

Definition at line 324 of file ImageCalculatorDialog.cpp.

References equation.

Referenced by buildDialog().

void ImageCalculatorDialog::acceptFunction ( char *  ch  )  [protected, slot]

void acceptFunction(char* ch) char* ch - the function to be added Called when various buttons are pushed, The function name is passed in as a string, and the parenthesis are places at the end.

(i.e. for a sine function, you would only pass in 'sin' and the parens would be added to display 'sin()' in the equation.

Definition at line 329 of file ImageCalculatorDialog.cpp.

References equation.

Referenced by buildDialog().

void ImageCalculatorDialog::acceptFunction ( const QString &  ch  )  [protected, slot]

void acceptFunction(const QString & ch) const QString & ch - the function to be added Same as above, but takes a QString instead of a char*.

This is used for the functions drop-down.

Definition at line 344 of file ImageCalculatorDialog.cpp.

References equation.

void ImageCalculatorDialog::insertBand ( QListBoxItem *  item  )  [protected, slot]

void insertBand(QListBoxItem * item) QListBoxItem * item - the layer to be added Adds a variable representing a layer to the equation.

This is called when an item in the layers listbox is double-clicked.

Definition at line 360 of file ImageCalculatorDialog.cpp.

References equation.

Referenced by buildDialog().

void ImageCalculatorDialog::setColor ( int  index  )  [protected, slot]

Definition at line 366 of file ImageCalculatorDialog.cpp.

void ImageCalculatorDialog::imgCalcComplete (  )  [signal]

Referenced by doCalculation().


Member Data Documentation

the project

Definition at line 57 of file ImageCalculatorDialog.h.

Referenced by buildDialog(), and ImageCalculatorDialog().

the calculator that does processing

Definition at line 58 of file ImageCalculatorDialog.h.

Referenced by doCalculation(), ImageCalculatorDialog(), and ~ImageCalculatorDialog().

start calculation button

Definition at line 59 of file ImageCalculatorDialog.h.

Referenced by buildDialog().

cancel button

Definition at line 60 of file ImageCalculatorDialog.h.

Referenced by buildDialog().

QLineEdit* ImageCalculatorDialog::equation [protected]

the equation entered by user

Definition at line 61 of file ImageCalculatorDialog.h.

Referenced by acceptFunction(), acceptString(), buildDialog(), clearEquation(), doCalculation(), and insertBand().

QComboBox* ImageCalculatorDialog::functions [protected]

possible functions

Definition at line 62 of file ImageCalculatorDialog.h.

Referenced by buildDialog().

QComboBox* ImageCalculatorDialog::lineStyle [protected]

possible line styles

Definition at line 63 of file ImageCalculatorDialog.h.

Referenced by buildDialog(), and doCalculation().

QListBox* ImageCalculatorDialog::variables [protected]

possible variables (layers)

Definition at line 64 of file ImageCalculatorDialog.h.

Referenced by buildDialog().

QVBoxLayout* ImageCalculatorDialog::vbox [protected]

box layout for layout

Definition at line 65 of file ImageCalculatorDialog.h.

Referenced by buildDialog().

QComboBox* ImageCalculatorDialog::algorithms [protected]

Todo:
dls - get rid of algorithm chooser
possible variables (layers)

Definition at line 68 of file ImageCalculatorDialog.h.

Referenced by buildDialog(), and doCalculation().


The documentation for this class was generated from the following files:

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov