USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::Chip Class Reference
[Pattern Matching]

#include <Chip.h>

Collaboration diagram for Isis::Chip:

Collaboration graph
[legend]
List of all members.

Detailed Description

A small chip of data used for pattern matching.

A chip is a small rectangular area that can be used for pattern matching. Data can be loaded into the chip manually or by reading directly from a cube.

Author:
2005-05-05 Jeff Anderson

For internal use only.

History:
2006-07-11 Tracie Sucharski, Added reLoad method to use p_cube instead of cube passed in.
History:
2006-08-03 Tracie Sucharski, Added Load and ReLoad method to apply scale factor to chip.
History:
2006-08-04 Stuart Sides, Added SetClipPolygon method. If the clip polygon is set all pixel values outside the polygon will be set to NULL.
History:
2007-10-01 Steven Koechle, Fixed inc in LoadChip to fix an infinite loop problem when x.size() never grew to be more than 3.
History:
2009-01-19 Steven Koechle, Fixed memory leak
History:
2009-06-02 Stacy Alley, Added a check in the SetSize() method to make sure the given samples and lines are not equal to or less than zero.
History:
2009-08-19 Kris Becker Added new Extract method that applies an Affine transform to the extract a portion of the chip; added an assigment operator that sets the entire chip to a single value for convenience; added a getter that returns a const reference to the internal Affine transform of this chip.
History:
2009-08-20 Steven Lambright, Removed local cube pointer and parenthesis operator
History:
2009-08-20 Travis Addair, Added Statistics method
History:
2009-08-28 Kris Becker - Added new Affine setter method to establish a new Affine transform to the chip; added another Load method that uses a new Affine transform to load a chip from a cube.
History:
2009-09-01 Travis Addair, Added valid Min/Max pixel value functionality for Statistics method
See also:
AutoReg

AutoRegFactory

Definition at line 82 of file Chip.h.

Public Member Functions

 Chip ()
 Constructs a Chip.
 Chip (const int samples, const int lines)
 Construct a Chip with specified dimensions.
virtual ~Chip ()
 Destroys the Chip object.
void SetSize (const int samples, const int lines)
 Change the size of the Chip.
bool IsInsideChip (double sample, double line)
int Samples () const
 Return the number of samples in the chip.
int Lines () const
 Return the number of lines in the chip.
std::string Filename () const
 which this chip was chipped.
void SetAllValues (const double &d)
 Single value assignment operator.
void SetValue (int sample, int line, const double &value)
 This sets a value in the chip.
double GetValue (int sample, int line)
 Loads a Chip with a value.
const double GetValue (int sample, int line) const
 Get a value from a Chip.
void TackCube (const double cubeSample, const double cubeLine)
 This sets which cube position will be located at the chip tack position.
int TackSample () const
 Return the fixed tack sample of the chip.
int TackLine () const
 Return the fixed tack line of the chip.
void Load (Cube &cube, const double rotation=0.0, const double scale=1.0, const int band=1)
 Load cube data into the Chip.
void Load (Cube &cube, Chip &match, Cube &matchChipCube, const double scale=1.0, const int band=1)
 Loads cube data into the Chip.
void Load (Cube &cube, const Affine &affine, const bool &keepPoly=true, const int band=1)
 Load a chip using an Affine transform as provided by caller.
void SetChipPosition (const double sample, const double line)
 Compute the position of the cube given a chip coordinate.
double CubeSample () const
 Returns cube sample after invoking SetChipPosition.
double CubeLine () const
 Returns cube line after invoking SetChipPosition.
void SetCubePosition (const double sample, const double line)
 Compute the position of the chip given a cube coordinate.
double ChipSample () const
 Returns chip sample after invoking SetCubePosition.
double ChipLine () const
 Returns chip line after invoking SetCubePosition.
void SetValidRange (const double minimum=Isis::ValidMinimum, const double maximum=Isis::ValidMaximum)
 Set the valid range of data in the chip.
bool IsValid (double percentage)
 Return if the total number of valid pixels in the chip meets a specified percentage of the entire chip.
bool IsValid (int sample, int line)
Chip Extract (int samples, int lines, int samp, int line)
 Extract a sub-chip from a chip.
void Extract (int samp, int line, Chip &output)
 Extract a subchip centered at the designated coordinate.
Isis::StatisticsStatistics ()
 Returns a statistics object of the current data in the chip.
void Extract (Chip &output, Affine &affine)
 Extract a subchip of this chip using an Affine transform.
void Write (const std::string &filename)
 Writes the contents of the Chip to a cube.
void SetClipPolygon (const geos::geom::MultiPolygon &clipPolygon)
 Sets the clipping polygon for this chip.
const AffinegetTransform () const
 Returns the Affine transformation of chip-to-cube indices.
void setTransform (const Affine &affine, const bool &keepPoly=true)
 Sets the internal Affine transform to new translation.

Private Member Functions

void Init (const int samples, const int lines)
 Common initialization used by constructors.
void Read (Cube &cube, const int band)
 This method will read data from a cube and put it into the chip.

Private Attributes

int p_chipSamples
 Number of samples in the chip.
int p_chipLines
 Number of lines in the chip.
std::vector< std::vector<
double > > 
p_buf
 Chip buffer.
int p_tackSample
 Middle sample of the chip.
int p_tackLine
 Middle line of the chip.
double p_cubeTackSample
 cube sample at the chip tack
double p_cubeTackLine
 cube line at the chip tack
double p_validMinimum
 valid minimum chip pixel value
double p_validMaximum
 valid maximum chip pixel value
double p_chipSample
 chip sample set by SetChip/CubePosition
double p_chipLine
 chip line set by SetChip/CubePosition
double p_cubeSample
 cube sample set by SetCubePosition
double p_cubeLine
 cube line set by SetCubePosition
geos::geom::MultiPolygon * p_clipPolygon
 clipping polygon set by SetClipPolygon (line,samp)
Affine p_affine
 Transform used to load cubes into chip.
std::string p_filename


Constructor & Destructor Documentation

Isis::Chip::Chip (  ) 

Constructs a Chip.

The default size is 3x3

Definition at line 45 of file Chip.cpp.

References Init().

Isis::Chip::Chip ( const int  samples,
const int  lines 
)

Construct a Chip with specified dimensions.

Parameters:
samples number of samples in the chip
lines number of lines in the chip

Definition at line 71 of file Chip.cpp.

References Init().

Isis::Chip::~Chip (  )  [virtual]

Destroys the Chip object.

Definition at line 77 of file Chip.cpp.

References p_clipPolygon.


Member Function Documentation

double Isis::Chip::ChipLine (  )  const [inline]

Returns chip line after invoking SetCubePosition.

Definition at line 182 of file Chip.h.

References p_chipLine.

Referenced by Isis::Gruen::AdaptiveRegistration().

double Isis::Chip::ChipSample (  )  const [inline]

Returns chip sample after invoking SetCubePosition.

Definition at line 179 of file Chip.h.

References p_chipSample.

Referenced by Isis::Gruen::AdaptiveRegistration().

double Isis::Chip::CubeLine (  )  const [inline]

Returns cube line after invoking SetChipPosition.

Definition at line 174 of file Chip.h.

References p_cubeLine.

Referenced by Isis::Gruen::AdaptiveRegistration(), Qisis::ChipViewport::keyPressEvent(), Load(), Qisis::ChipViewport::mousePressEvent(), Isis::InterestOperator::Operate(), Qisis::ChipViewport::panDown(), Qisis::ChipViewport::panLeft(), Qisis::ChipViewport::panRight(), Qisis::ChipViewport::panUp(), Read(), Isis::AutoReg::Register(), and Qisis::ChipViewport::tackLine().

double Isis::Chip::CubeSample (  )  const [inline]

Returns cube sample after invoking SetChipPosition.

Definition at line 171 of file Chip.h.

References p_cubeSample.

Referenced by Isis::Gruen::AdaptiveRegistration(), Qisis::ChipViewport::keyPressEvent(), Load(), Qisis::ChipViewport::mousePressEvent(), Isis::InterestOperator::Operate(), Qisis::ChipViewport::panDown(), Qisis::ChipViewport::panLeft(), Qisis::ChipViewport::panRight(), Qisis::ChipViewport::panUp(), Read(), Isis::AutoReg::Register(), and Qisis::ChipViewport::tackSample().

void Isis::Chip::Extract ( Chip chipped,
Affine affine 
)

Extract a subchip of this chip using an Affine transform.

This method will translate the data in this chip using an Affine transform to the output chip as provided. Note that the Affine transformation is only applied within the confines of this chip. No file I/O is performed.

A proper Affine transform should not deviate too much from the identity as the mapping operation may result in a NULL filled chip. The operation of this affine is added to the existing affine so that proper relationship to the input cube (and any affine operations applied at load time) is preserved. This implies that the resulting affine should yield nearly identical results when read directly from the cube.

Bilinear interpolation is applied to surrounding transformed pixels to provide each new output pixel.

The chipped parameter will be updated to fully reflect the state of this original chip. The state of the chipped parameter dictates the size and the tack sample and line coordinates. Upon return, the corresponding cube sample and line coordinate is updated to the tack sample and line chip coordinate.

As such, note that an identity affine transform will yield identical results to the Chip::Extract method specifying the tack sample and line as the location to extract.

The following example demonstrates how to linearly shift a chip one pixel right and one down.

   Chip mychip(35,35);
   Cube cube("mycube.cub");
   mychip.TackCube(200.0,200.0);
   mychip.Load(cube);
  
   Affine shift;
   shift.Translate(-1.0,-1.0);
  
   Chip ochip(15,15);
   mychip.Extract(ochip, shift);

Parameters:
chipped Input/output chip containing the transformed subchip
affine Affine transform to apply to extract subchip

Definition at line 598 of file Chip.cpp.

References cline, Isis::Affine::Compute(), csamp, Isis::Affine::Forward(), Isis::Affine::getIdentity(), GetValue(), Isis::Interpolator::HotLine(), Isis::Interpolator::HotSample(), interp, Isis::Interpolator::Interpolate(), Lines(), Isis::Interpolator::Lines(), Isis::Null, p_affine, p_filename, p_validMaximum, p_validMinimum, Samples(), Isis::Interpolator::Samples(), SetChipPosition(), SetValue(), TackLine(), TackSample(), Isis::Affine::xp(), and Isis::Affine::yp().

void Isis::Chip::Extract ( int  samp,
int  line,
Chip chipped 
)

Extract a subchip centered at the designated coordinate.

This method extracts a subchip that is centered at the given sample and line coordinate. All appropriate variables in the given chipped parameter are set appropriately prior to return.

Parameters:
samp Center (tack) sample chip coordinate to extract subchip
line Center (tack) line chip coordinate to extract subchip
chipped Chip to load the subchip in and return to caller

Definition at line 522 of file Chip.cpp.

References GetValue(), Lines(), Isis::Null, p_affine, p_tackLine, p_tackSample, p_validMaximum, p_validMinimum, Samples(), SetValue(), TackLine(), and TackSample().

Chip Isis::Chip::Extract ( int  samples,
int  lines,
int  samp,
int  line 
)

Extract a sub-chip from a chip.

Parameters:
samples Number of samples in the extracted chip (must be less than or equal to "this" chip)
lines Number of lines in the extracted chip (must be less than or equal to "this" chip)
samp Input chip sample to be placed at output chip tack
line Input chip line to be placed at output chip tack
Exceptions:
Isis::iException::Programmer - Chip extraction invalid

Definition at line 481 of file Chip.cpp.

References _FILEINFO_, GetValue(), Lines(), Isis::iException::Message(), Isis::Null, p_affine, p_tackLine, p_tackSample, p_validMaximum, p_validMinimum, Samples(), SetValue(), TackLine(), and TackSample().

Referenced by Isis::Gruen::AdaptiveRegistration(), Isis::AutoReg::Match(), and Isis::InterestOperator::Operate().

std::string Isis::Chip::Filename (  )  const [inline]

which this chip was chipped.

Definition at line 100 of file Chip.h.

References p_filename.

const Affine& Isis::Chip::getTransform (  )  const [inline]

Returns the Affine transformation of chip-to-cube indices.

This method returns the affine transform used to load a chip from the same area as a match cube. It also is used to track the tack point line and sample translations from the chip indices to the absolute cube coordiates.

Returns:
const Affine& Transform map from chip coordinates to cube coordinates

Definition at line 215 of file Chip.h.

References p_affine.

Referenced by Isis::Gruen::AdaptiveRegistration(), and Isis::Gruen::UpdateChip().

const double Isis::Chip::GetValue ( int  sample,
int  line 
) const [inline]

Get a value from a Chip.

For example,

 Chip c(10,5);
 cout << c[3,3] << endl;

Parameters:
sample Sample position to get (1-based)
line Line position to get (1-based)

Definition at line 139 of file Chip.h.

References p_buf.

double Isis::Chip::GetValue ( int  sample,
int  line 
) [inline]

Loads a Chip with a value.

For example,

 Chip c(10,5);
 c(1,1) = 1.1;
 c(10,5) = 1.2;

Parameters:
sample Sample position to load (1-based)
line Line position to load (1-based)

Definition at line 126 of file Chip.h.

References p_buf.

Referenced by Isis::Gruen::algorithm(), Isis::AutoReg::ComputeChipZScore(), Qisis::ChipViewport::computeStretch(), Extract(), Isis::StandardDeviationOperator::Interest(), Isis::MoravecOperator::Interest(), Isis::GradientOperator::Interest(), Isis::ForstnerOperator::Interest(), IsValid(), Isis::MinimumDifference::MatchAlgorithm(), Isis::MaximumCorrelation::MatchAlgorithm(), Qisis::ChipViewport::paintImage(), Isis::AutoReg::Reduce(), Isis::AutoReg::Register(), and Write().

void Isis::Chip::Init ( const int  samples,
const int  lines 
) [private]

Common initialization used by constructors.

Definition at line 83 of file Chip.cpp.

References p_clipPolygon, SetSize(), and SetValidRange().

Referenced by Chip().

bool Isis::Chip::IsValid ( double  percentage  ) 

Return if the total number of valid pixels in the chip meets a specified percentage of the entire chip.

Parameters:
percentage The percentage that the valid pixels percentage must exceed
Returns:
bool Returns true if the percentage of valid pixels is greater than the specified percentage, and false if it is not

Definition at line 455 of file Chip.cpp.

References line, Lines(), Samples(), and validCount.

Referenced by Isis::Gruen::algorithm(), and Isis::AutoReg::Register().

int Isis::Chip::Lines (  )  const [inline]

Return the number of lines in the chip.

Definition at line 96 of file Chip.h.

References p_chipLines.

Referenced by Isis::Gruen::AdaptiveRegistration(), Isis::Gruen::algorithm(), Qisis::ChipViewport::chipLines(), Isis::AutoReg::ComputeChipZScore(), Qisis::ChipViewport::computeStretch(), Extract(), Isis::Gruen::getThreshHold(), Isis::AutoReg::Init(), Isis::StandardDeviationOperator::Interest(), Isis::MoravecOperator::Interest(), Isis::GradientOperator::Interest(), Isis::ForstnerOperator::Interest(), IsValid(), Load(), Isis::AutoReg::Match(), Isis::MinimumDifference::MatchAlgorithm(), Isis::MaximumCorrelation::MatchAlgorithm(), Qisis::ChipViewport::paintImage(), Read(), Isis::AutoReg::Reduce(), Isis::AutoReg::Register(), Qisis::ChipViewport::setChip(), and Write().

void Isis::Chip::Load ( Cube cube,
const Affine affine,
const bool &  keepPoly = true,
const int  band = 1 
)

Load a chip using an Affine transform as provided by caller.

This method will load data from a cube using an established Affine transform as provided by the caller. It is up to the caller to set up the affine appropriately.

For example, the first thing this method will do is set the chip tack point to the transformed cube location by replacing the existing affine transform with the one passed in and then calling SetChipPosition providing the chip tack point as the argument. This establishes which cube pixel is located at the chip tack point.

Parameters:
cube Cube to load the data from
affine Affine transform to set for chip load/operations
band Band number to read data from

Definition at line 190 of file Chip.cpp.

References cube, Isis::Cube::Filename(), p_clipPolygon, p_filename, Read(), SetChipPosition(), setTransform(), TackLine(), and TackSample().

void Isis::Chip::Load ( Cube cube,
Chip match,
Cube matchChipCube,
const double  scale = 1.0,
const int  band = 1 
)

Loads cube data into the Chip.

The data will be loaded such that the position set using TackCube method will be put at the center of the chip. The data will be loaded to sub-pixel accuracy using a cubic convolution interpolator. Additionally, the data will be loaded such that it matches the camera and/or projective geometry of a given Chip.

Parameters:
cube The cube used to put data into the chip
match Match the geometry of this chip
scale scale factor
band Band number to use when loading
Exceptions:
Isis::iException::Programmer - Match chip does not have an associated cube
Isis::iException::Programmer - Match chip cube is not a camera or map projection

Definition at line 230 of file Chip.cpp.

References _FILEINFO_, cam, Isis::Cube::Camera(), Isis::iException::Clear(), Isis::Affine::Compute(), cube, CubeLine(), CubeSample(), Isis::Cube::Filename(), Isis::Sensor::HasSurfaceIntersection(), Isis::Projection::IsGood(), Isis::Camera::Line(), line, Lines(), Isis::iException::Message(), p_affine, p_cubeTackLine, p_cubeTackSample, p_filename, proj, Isis::Cube::Projection(), Read(), Isis::Camera::Sample(), Samples(), Isis::Affine::Scale(), SetChipPosition(), Isis::Camera::SetImage(), Isis::Projection::SetUniversalGround(), Isis::Camera::SetUniversalGround(), Isis::Projection::SetWorld(), Isis::Affine::Solve(), TackLine(), TackSample(), Isis::Affine::Translate(), Isis::Projection::UniversalLatitude(), Isis::Sensor::UniversalLatitude(), Isis::Projection::UniversalLongitude(), Isis::Sensor::UniversalLongitude(), Isis::Projection::WorldX(), Isis::Projection::WorldY(), x, Isis::Affine::xp(), y, and Isis::Affine::yp().

void Isis::Chip::Load ( Cube cube,
const double  rotation = 0.0,
const double  scale = 1.0,
const int  band = 1 
)

Load cube data into the Chip.

The data will be loaded such that the position set using TackCube method will be put at the center of the chip. The data will be loaded to sub-pixel accuracy using a cubic convolution interpolator.

Parameters:
cube The cube used to put data into the chip
rotation rotation in degrees of data about the cube tack point (default of 0)
scale scale factor
band Band number to use when loading

Definition at line 153 of file Chip.cpp.

References cube, Isis::Cube::Filename(), Isis::Affine::Identity(), p_affine, p_cubeTackLine, p_cubeTackSample, p_filename, Read(), Isis::Affine::Rotate(), Isis::Affine::Scale(), and Isis::Affine::Translate().

Referenced by Qisis::ChipViewport::geomChip(), Qisis::ChipViewport::nogeomChip(), Isis::InterestOperator::Operate(), Qisis::ChipViewport::reloadChip(), Qisis::ChipViewport::rotateChip(), Qisis::ControlPointEdit::setLeftMeasure(), and Qisis::ControlPointEdit::setRightMeasure().

void Isis::Chip::Read ( Cube cube,
const int  band 
) [private]

This method will read data from a cube and put it into the chip.

The affine transform is used in the SetChipPosition routine and therefore the geom of the chip is automatic

Parameters:
cube Cube to read data from
band Band number to read data from
Todo:
We could modify the affine class to return the coefficients and then compute the derivative of the change in cube sample and line with respect to chip sample or line. The change might make the geom run a bit faster.

Definition at line 677 of file Chip.cpp.

References cube, CubeLine(), CubeSample(), Isis::globalFactory, Isis::Interpolator::HotLine(), Isis::Interpolator::HotSample(), interp, Isis::Interpolator::Interpolate(), line, Isis::Cube::Lines(), Lines(), Isis::Interpolator::Lines(), Isis::NULL8, p_buf, p_clipPolygon, Isis::Cube::PixelType(), Isis::Cube::Read(), Isis::Cube::Samples(), Samples(), Isis::Interpolator::Samples(), and SetChipPosition().

Referenced by Load().

int Isis::Chip::Samples (  )  const [inline]

Return the number of samples in the chip.

Definition at line 93 of file Chip.h.

References p_chipSamples.

Referenced by Isis::Gruen::AdaptiveRegistration(), Isis::Gruen::algorithm(), Qisis::ChipViewport::chipSamples(), Isis::AutoReg::ComputeChipZScore(), Qisis::ChipViewport::computeStretch(), Extract(), Isis::Gruen::getThreshHold(), Isis::AutoReg::Init(), Isis::StandardDeviationOperator::Interest(), Isis::MoravecOperator::Interest(), Isis::GradientOperator::Interest(), Isis::ForstnerOperator::Interest(), IsValid(), Load(), Isis::AutoReg::Match(), Isis::MinimumDifference::MatchAlgorithm(), Isis::MaximumCorrelation::MatchAlgorithm(), Qisis::ChipViewport::paintImage(), Read(), Isis::AutoReg::Reduce(), Isis::AutoReg::Register(), Qisis::ChipViewport::setChip(), and Write().

void Isis::Chip::SetAllValues ( const double &  d  ) 

Single value assignment operator.

Sets the entire chip to a constant

Parameters:
d Value to set the chip to
Returns:
Chip& Reference to this chip

Definition at line 59 of file Chip.cpp.

References fill(), and p_buf.

Referenced by Isis::Gruen::AdaptiveRegistration().

void Isis::Chip::SetChipPosition ( const double  sample,
const double  line 
)

Compute the position of the cube given a chip coordinate.

Any rotation or geometric matching done during the Load process will be taken into account. Use the CubeSample and CubeLine methods to obtain results. Note the results could be outside of the cube

Parameters:
sample chip sample coordinate
line chip line coordinate

Definition at line 381 of file Chip.cpp.

References Isis::Affine::Compute(), p_affine, p_chipLine, p_chipSample, p_cubeLine, p_cubeSample, TackLine(), TackSample(), Isis::Affine::xp(), and Isis::Affine::yp().

Referenced by Isis::Gruen::AdaptiveRegistration(), Extract(), Qisis::ChipViewport::keyPressEvent(), Load(), Qisis::ChipViewport::mousePressEvent(), Isis::InterestOperator::Operate(), Qisis::ChipViewport::panDown(), Qisis::ChipViewport::panLeft(), Qisis::ChipViewport::panRight(), Qisis::ChipViewport::panUp(), Read(), Isis::AutoReg::Register(), Qisis::ChipViewport::tackLine(), and Qisis::ChipViewport::tackSample().

void Isis::Chip::SetClipPolygon ( const geos::geom::MultiPolygon &  clipPolygon  ) 

Sets the clipping polygon for this chip.

The coordinates must be in (sample,line) order. All Pixel values outside this polygon will be set to Null8. The cubic convolution interpolation is allowed to uses valid pixels outside the clipping area.

Parameters:
clipPolygon The polygons used to clip the chip

Definition at line 745 of file Chip.cpp.

References Isis::PolygonTools::CopyMultiPolygon(), and p_clipPolygon.

Referenced by Isis::InterestOperator::Operate().

void Isis::Chip::SetCubePosition ( const double  sample,
const double  line 
)

Compute the position of the chip given a cube coordinate.

Any rotation or geometric matching done during the Load process will be taken into account. Use the ChipSample and ChipLine methods to obtain results. Note that the results could be outside of the chip.

Parameters:
sample chip sample coordinate
line chip line coordinate

Definition at line 400 of file Chip.cpp.

References Isis::Affine::ComputeInverse(), p_affine, p_chipLine, p_chipSample, p_cubeLine, p_cubeSample, TackLine(), TackSample(), Isis::Affine::x(), and Isis::Affine::y().

Referenced by Isis::Gruen::AdaptiveRegistration().

void Isis::Chip::SetSize ( const int  samples,
const int  lines 
)

Change the size of the Chip.

Parameters:
samples number of samples in the chip
lines number of lines in the chip

Definition at line 96 of file Chip.cpp.

References _FILEINFO_, Isis::Affine::Identity(), Isis::iException::Message(), p_affine, p_buf, p_chipLines, p_chipSamples, p_tackLine, and p_tackSample.

Referenced by Isis::Gruen::AdaptiveRegistration(), Isis::AutoReg::AutoReg(), Init(), Isis::AutoReg::Match(), Isis::AutoReg::Parse(), and Isis::AutoReg::Register().

void Isis::Chip::setTransform ( const Affine affine,
const bool &  keepPoly = true 
) [inline]

Sets the internal Affine transform to new translation.

Provides the ability to establish a new affine transformation without overhead of, say, loading the chip with a new translation.

The caller also has the option to specify the disposition of an established polygon.

Parameters:
affine New affine tranform to set for this chip
keepPoly Should an existing polygon clipper be kept?

Definition at line 229 of file Chip.h.

References p_affine, and p_clipPolygon.

Referenced by Isis::Gruen::AdaptiveRegistration(), Load(), and Isis::Gruen::UpdateChip().

void Isis::Chip::SetValidRange ( const double  minimum = Isis::ValidMinimum,
const double  maximum = Isis::ValidMaximum 
)

Set the valid range of data in the chip.

If never called all data in the chip is consider valid (other than special pixels).

Parameters:
minimum minimum valid pixel value
maximum maximum valid pixel value
Exceptions:
Isis::iException::Programmer - Invalid order of parameters, min>max

Definition at line 418 of file Chip.cpp.

References _FILEINFO_, Isis::iException::Message(), p_validMaximum, and p_validMinimum.

Referenced by Init(), and Isis::AutoReg::Parse().

void Isis::Chip::SetValue ( int  sample,
int  line,
const double &  value 
) [inline]

This sets a value in the chip.

Parameters:
sample Sample position to load (1-based)
line Line position to load (1-based)
value Value to set

Definition at line 111 of file Chip.h.

References p_buf.

Referenced by Isis::Gruen::AdaptiveRegistration(), Extract(), Isis::AutoReg::Init(), Isis::AutoReg::Match(), Isis::AutoReg::Reduce(), and Isis::AutoReg::Register().

Isis::Statistics * Isis::Chip::Statistics (  ) 

Returns a statistics object of the current data in the chip.

The caller takes ownership of the returned instance.

Returns:
Isis::Statistics* Statistics of the data in the chip

Definition at line 651 of file Chip.cpp.

References Isis::Statistics::AddData(), p_buf, p_chipLines, p_chipSamples, p_validMaximum, p_validMinimum, Isis::Statistics::SetValidRange(), and stats.

void Isis::Chip::TackCube ( const double  cubeSample,
const double  cubeLine 
)

This sets which cube position will be located at the chip tack position.

Parameters:
cubeSample the cube sample value to tack
cubeLine the cube line value to tack

Definition at line 133 of file Chip.cpp.

References Isis::Affine::Identity(), p_affine, p_cubeTackLine, p_cubeTackSample, and Isis::Affine::Translate().

Referenced by Isis::InterestOperator::Operate(), Qisis::ChipViewport::reloadChip(), Qisis::ControlPointEdit::setLeftMeasure(), and Qisis::ControlPointEdit::setRightMeasure().

int Isis::Chip::TackLine (  )  const [inline]

Return the fixed tack line of the chip.

That is, the middle of the chip. It is a chip coordinate not a cube coordinate. For a chip with 5 lines, this will return 3, the middle pixel. For a chip with 4 lines it will return 2

Definition at line 159 of file Chip.h.

References p_tackLine.

Referenced by Isis::Gruen::AdaptiveRegistration(), Isis::Gruen::algorithm(), Extract(), Qisis::ChipViewport::keyPressEvent(), Load(), Qisis::ChipViewport::panDown(), Qisis::ChipViewport::panLeft(), Qisis::ChipViewport::panRight(), Qisis::ChipViewport::panUp(), Isis::AutoReg::Register(), SetChipPosition(), SetCubePosition(), Qisis::ChipViewport::tackLine(), and Qisis::ChipViewport::tackSample().

int Isis::Chip::TackSample (  )  const [inline]

Return the fixed tack sample of the chip.

That is, the middle of the chip. It is a chip coordinate not a cube coordinate. For a chip with 5 samples, this will return 3, the middle pixel. For a chip with 4 samples it will return 2

Definition at line 151 of file Chip.h.

References p_tackSample.

Referenced by Isis::Gruen::AdaptiveRegistration(), Isis::Gruen::algorithm(), Extract(), Qisis::ChipViewport::keyPressEvent(), Load(), Qisis::ChipViewport::panDown(), Qisis::ChipViewport::panLeft(), Qisis::ChipViewport::panRight(), Qisis::ChipViewport::panUp(), Isis::AutoReg::Register(), SetChipPosition(), SetCubePosition(), Qisis::ChipViewport::tackLine(), and Qisis::ChipViewport::tackSample().

void Isis::Chip::Write ( const std::string &  filename  ) 

Writes the contents of the Chip to a cube.

Parameters:
filename Name of the cube to create

Definition at line 721 of file Chip.cpp.

References c, GetValue(), line, Lines(), and Samples().

Referenced by Isis::Gruen::AdaptiveRegistration().


Member Data Documentation

Affine Isis::Chip::p_affine [private]

Transform used to load cubes into chip.

Definition at line 260 of file Chip.h.

Referenced by Extract(), getTransform(), Load(), SetChipPosition(), SetCubePosition(), SetSize(), setTransform(), and TackCube().

std::vector<std::vector <double> > Isis::Chip::p_buf [private]

Chip buffer.

Definition at line 244 of file Chip.h.

Referenced by GetValue(), Read(), SetAllValues(), SetSize(), SetValue(), and Statistics().

double Isis::Chip::p_chipLine [private]

chip line set by SetChip/CubePosition

Definition at line 255 of file Chip.h.

Referenced by ChipLine(), SetChipPosition(), and SetCubePosition().

int Isis::Chip::p_chipLines [private]

Number of lines in the chip.

Definition at line 243 of file Chip.h.

Referenced by IsInsideChip(), Lines(), SetSize(), and Statistics().

double Isis::Chip::p_chipSample [private]

chip sample set by SetChip/CubePosition

Definition at line 254 of file Chip.h.

Referenced by ChipSample(), SetChipPosition(), and SetCubePosition().

int Isis::Chip::p_chipSamples [private]

Number of samples in the chip.

Definition at line 242 of file Chip.h.

Referenced by IsInsideChip(), Samples(), SetSize(), and Statistics().

geos::geom::MultiPolygon* Isis::Chip::p_clipPolygon [private]

clipping polygon set by SetClipPolygon (line,samp)

Definition at line 258 of file Chip.h.

Referenced by Init(), Load(), Read(), SetClipPolygon(), setTransform(), and ~Chip().

double Isis::Chip::p_cubeLine [private]

cube line set by SetCubePosition

Definition at line 257 of file Chip.h.

Referenced by CubeLine(), SetChipPosition(), and SetCubePosition().

double Isis::Chip::p_cubeSample [private]

cube sample set by SetCubePosition

Definition at line 256 of file Chip.h.

Referenced by CubeSample(), SetChipPosition(), and SetCubePosition().

double Isis::Chip::p_cubeTackLine [private]

cube line at the chip tack

Definition at line 249 of file Chip.h.

Referenced by IsInsideChip(), Load(), and TackCube().

double Isis::Chip::p_cubeTackSample [private]

cube sample at the chip tack

Definition at line 248 of file Chip.h.

Referenced by IsInsideChip(), Load(), and TackCube().

int Isis::Chip::p_tackLine [private]

Middle line of the chip.

Definition at line 246 of file Chip.h.

Referenced by Extract(), SetSize(), and TackLine().

int Isis::Chip::p_tackSample [private]

Middle sample of the chip.

Definition at line 245 of file Chip.h.

Referenced by Extract(), SetSize(), and TackSample().

double Isis::Chip::p_validMaximum [private]

valid maximum chip pixel value

Definition at line 252 of file Chip.h.

Referenced by Extract(), IsValid(), SetValidRange(), and Statistics().

double Isis::Chip::p_validMinimum [private]

valid minimum chip pixel value

Definition at line 251 of file Chip.h.

Referenced by Extract(), IsValid(), SetValidRange(), and Statistics().


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