GLIMSView Source Code Documentation

ImageCalculator Class Reference

#include <ImageCalculator.h>

List of all members.


Detailed Description

ImageCalculator is the middle-man between the GUI (ImageCalculatorDialog) and the actual processing classes.

Input is passed in from the GUI, and used to direct the processing classes to do their thing. Some error checking and messages may be done here, but no user input checking is done below this level.

Author:
Erica Liszewski 2006-04-20
History:
2006-08-06 Deborah Lee Soltesz added algorithm choosing functionality. This class serves simply to convey the algorithm choice from the dialog to the ImageShapeFinder class where the algorithm is implemented.
Todo:
dls 2006-08-06 remove algorithm choice functionality

Definition at line 24 of file ImageCalculator.h.


Public Member Functions

 ImageCalculator (GLIMSProject *proj)
 ImageCalculator(GLIMSProject *proj) GLIMSProject *proj - the project to be associated with Creates an ImageCalculator associated with the given project.
 ~ImageCalculator ()
 ~ImageCalculator() destroys the Image Calculator
void setAlgorithm (int choice)
void calculate (std::string eq)
 void calculate(std::string eq) std::string eq - the equation to be calculated Starts the calculation process on the givin string.
void calculate (std::string eq, int lineStyle)
 void calculate(std::string eq, int lineStyle) std::string eq - the equation to be calculated int lineStyle - the index for specifying a line style Starts the calculation process on the givin string.
void testDriver ()
 void testDriver() A testing function that creates test data and runs a calculation

Public Attributes

int algorithm

Protected Attributes

GLIMSProjectmProj
ImageInterfacemImage

Constructor & Destructor Documentation

ImageCalculator::ImageCalculator ( GLIMSProject proj  ) 

ImageCalculator(GLIMSProject *proj) GLIMSProject *proj - the project to be associated with Creates an ImageCalculator associated with the given project.

Definition at line 7 of file ImageCalculator.cpp.

References ImageInterface::getInterface(), mImage, and mProj.

Here is the call graph for this function:

ImageCalculator::~ImageCalculator (  ) 

~ImageCalculator() destroys the Image Calculator

Definition at line 12 of file ImageCalculator.cpp.

References mImage.


Member Function Documentation

void ImageCalculator::setAlgorithm ( int  choice  )  [inline]

Definition at line 43 of file ImageCalculator.h.

References algorithm.

Referenced by ImageCalculatorDialog::doCalculation().

void ImageCalculator::calculate ( std::string  eq  ) 

void calculate(std::string eq) std::string eq - the equation to be calculated Starts the calculation process on the givin string.

Definition at line 18 of file ImageCalculator.cpp.

Referenced by ImageCalculatorDialog::doCalculation(), and testDriver().

void ImageCalculator::calculate ( std::string  eq,
int  lineStyle 
)

void calculate(std::string eq, int lineStyle) std::string eq - the equation to be calculated int lineStyle - the index for specifying a line style Starts the calculation process on the givin string.

History:
2006-07-29 dls added return if calculation failed.

Definition at line 22 of file ImageCalculator.cpp.

References GLIMSLineData::addLineSetLL(), algorithm, GLIMSGlobals::AVAILCOLORS, DspAttr::color, Shape::getAttr(), ImageInterface::getBands(), GLIMSProject::getDataset(), ImageInterface::getHeight(), GLIMSLineData::getLDFSet(), GLIMSDataset::getLineData(), ImageInterface::getLL(), ImageInterface::getSliceScaled(), GLIMSProject::getViewSet(), ImageInterface::getWidth(), mImage, mProj, Line::nodeset(), ViewSet::repaintViews(), Line::setAttr(), DspAttr::style, DspAttr::width, Node::x, and Node::y.

Here is the call graph for this function:

void ImageCalculator::testDriver (  ) 

void testDriver() A testing function that creates test data and runs a calculation

Definition at line 154 of file ImageCalculator.cpp.

References ImageCube::addBands(), calculate(), ImageArithmaticCube::calculateLayer(), ImageShapeFinder::getSelections(), ImageArithmaticCube::setEquation(), and ImageShapeFinder::setSelectedValues().

Here is the call graph for this function:


Member Data Documentation

Todo:
get rid of the poly drawing algorithm chooser

Definition at line 42 of file ImageCalculator.h.

Referenced by calculate(), and setAlgorithm().

Definition at line 72 of file ImageCalculator.h.

Referenced by calculate(), and ImageCalculator().

Definition at line 73 of file ImageCalculator.h.

Referenced by calculate(), ImageCalculator(), and ~ImageCalculator().


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

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