Isis 3 Programmer Reference
Isis::Enlarge Class Reference

Enlarge the pixel dimensions of an image. More...

#include <Enlarge.h>

Inheritance diagram for Isis::Enlarge:
Inheritance graph
Collaboration diagram for Isis::Enlarge:
Collaboration graph

Public Member Functions

 Enlarge (Cube *pInCube, const double sampleScale, const double lineScale)
 Constructs an Enlarge object.
 
void SetInputArea (double pdStartSample, double pdEndSample, double pdStartLine, double pdEndLine)
 Sets the sub area dimensions of the input image.
 
 ~Enlarge ()
 Destructoys the Enlarge object.
 
bool Xform (double &inSample, double &inLine, const double outSample, const double outLine)
 Implementations for parent's pure virtual members Convert the requested output samp/line to an input samp/line.
 
PvlGroup UpdateOutputLabel (Cube *pOutCube)
 Update the Mapping, Instrument, and AlphaCube groups in the output cube label.
 
int OutputSamples () const
 Return the output number of samples.
 
int OutputLines () const
 Return the output number of lines.
 

Private Attributes

CubemInCube
 Input image.
 
int miOutputSamples
 Number of samples for output.
 
int miOutputLines
 Number of lines for output.
 
double mdSampleScale
 Sample scale.
 
double mdLineScale
 Line scale.
 
double mdStartSample
 Input start sample.
 
double mdEndSample
 Input end sample.
 
double mdStartLine
 Input start line.
 
double mdEndLine
 Input end line.
 

Detailed Description

Enlarge the pixel dimensions of an image.

Enlarge the pixel dimensions of an image. Has the functionality to enlarge only a sub area in input image to output

Author
2002-12-13 Stuart Sides
History

2011-04-14 Sharmila Prasad - Ported the class from "enlarge" app to base object class with added functionality to enlarge only the sub area within the input image into the output image

2011-08-19 Jeannie Backer - Modified unitTest to use $temporary variable instead of /tmp directory. Added some documentation to methods.

Definition at line 34 of file Enlarge.h.

Constructor & Destructor Documentation

◆ Enlarge()

Isis::Enlarge::Enlarge ( Cube * pInCube,
const double sampleScale,
const double lineScale )

Constructs an Enlarge object.

Parameters
pInCube- Input cube to be enlarged
sampleScale- Sample scale
lineScale- Line scale

Definition at line 27 of file Enlarge.cpp.

References Isis::Cube::lineCount(), mdEndLine, mdEndSample, mdLineScale, mdSampleScale, mdStartLine, mdStartSample, mInCube, miOutputLines, miOutputSamples, and Isis::Cube::sampleCount().

◆ ~Enlarge()

Isis::Enlarge::~Enlarge ( )
inline

Destructoys the Enlarge object.

Definition at line 44 of file Enlarge.h.

Member Function Documentation

◆ OutputLines()

int Isis::Enlarge::OutputLines ( ) const
inlinevirtual

Return the output number of lines.

Returns
int - Number of lines in output

Reimplemented from Isis::Transform.

Definition at line 66 of file Enlarge.h.

References miOutputLines.

◆ OutputSamples()

int Isis::Enlarge::OutputSamples ( ) const
inlinevirtual

Return the output number of samples.

Returns
int - Number of samples in output

Reimplemented from Isis::Transform.

Definition at line 58 of file Enlarge.h.

References miOutputSamples.

◆ SetInputArea()

void Isis::Enlarge::SetInputArea ( double pdStartSample,
double pdEndSample,
double pdStartLine,
double pdEndLine )

Sets the sub area dimensions of the input image.

Default is the entire image

Author
Sharmila Prasad (4/14/2011)
Parameters
pdStartSample- Input start sample
pdEndSample- Input end sample
pdStartLine- Input start line
pdEndLine- Input end line

Definition at line 76 of file Enlarge.cpp.

References mdEndLine, mdEndSample, mdLineScale, mdSampleScale, mdStartLine, mdStartSample, miOutputLines, miOutputSamples, and Isis::IException::Programmer.

◆ UpdateOutputLabel()

PvlGroup Isis::Enlarge::UpdateOutputLabel ( Cube * pOutCube)

Update the Mapping, Instrument, and AlphaCube groups in the output cube label.

Parameters
pOutCube- Resulting enlarged output cube
Returns
PvlGroup - This is the Results group that will go into the application log file. This group must be created by the calling application. Information will be added to it if the Mapping or Instrument groups are deleted from the output image label

Definition at line 114 of file Enlarge.cpp.

References Isis::Cube::lineCount(), mdEndLine, mdEndSample, mdLineScale, mdSampleScale, mdStartLine, mdStartSample, mInCube, miOutputLines, miOutputSamples, Isis::Cube::sampleCount(), Isis::SubArea::SetSubArea(), and Isis::toString().

◆ Xform()

bool Isis::Enlarge::Xform ( double & inSample,
double & inLine,
const double outSample,
const double outLine )
virtual

Implementations for parent's pure virtual members Convert the requested output samp/line to an input samp/line.

Parameters
inSample- Calculated input sample corresponding to output sample
inLine- Calculated input line corresponding to output line
outSample- Output sample
outLine- Output line
Returns
bool

Reimplemented from Isis::Transform.

Definition at line 57 of file Enlarge.cpp.

References mdLineScale, mdSampleScale, mdStartLine, and mdStartSample.

Member Data Documentation

◆ mdEndLine

double Isis::Enlarge::mdEndLine
private

Input end line.

Definition at line 79 of file Enlarge.h.

Referenced by Enlarge(), SetInputArea(), and UpdateOutputLabel().

◆ mdEndSample

double Isis::Enlarge::mdEndSample
private

Input end sample.

Definition at line 77 of file Enlarge.h.

Referenced by Enlarge(), SetInputArea(), and UpdateOutputLabel().

◆ mdLineScale

double Isis::Enlarge::mdLineScale
private

Line scale.

Definition at line 75 of file Enlarge.h.

Referenced by Enlarge(), SetInputArea(), UpdateOutputLabel(), and Xform().

◆ mdSampleScale

double Isis::Enlarge::mdSampleScale
private

Sample scale.

Definition at line 74 of file Enlarge.h.

Referenced by Enlarge(), SetInputArea(), UpdateOutputLabel(), and Xform().

◆ mdStartLine

double Isis::Enlarge::mdStartLine
private

Input start line.

Definition at line 78 of file Enlarge.h.

Referenced by Enlarge(), SetInputArea(), UpdateOutputLabel(), and Xform().

◆ mdStartSample

double Isis::Enlarge::mdStartSample
private

Input start sample.

Definition at line 76 of file Enlarge.h.

Referenced by Enlarge(), SetInputArea(), UpdateOutputLabel(), and Xform().

◆ mInCube

Cube* Isis::Enlarge::mInCube
private

Input image.

Definition at line 71 of file Enlarge.h.

Referenced by Enlarge(), and UpdateOutputLabel().

◆ miOutputLines

int Isis::Enlarge::miOutputLines
private

Number of lines for output.

Definition at line 73 of file Enlarge.h.

Referenced by Enlarge(), OutputLines(), SetInputArea(), and UpdateOutputLabel().

◆ miOutputSamples

int Isis::Enlarge::miOutputSamples
private

Number of samples for output.

Definition at line 72 of file Enlarge.h.

Referenced by Enlarge(), OutputSamples(), SetInputArea(), and UpdateOutputLabel().


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