OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
ossimChipperUtil class. More...
#include <ossimChipperUtil.h>
Public Types | |
enum | ossimChipperOperation { OSSIM_CHIPPER_OP_UNKNOWN = 0, OSSIM_CHIPPER_OP_HILL_SHADE = 1, OSSIM_CHIPPER_OP_COLOR_RELIEF = 2, OSSIM_CHIPPER_OP_ORTHO = 3, OSSIM_CHIPPER_OP_2CMV = 4, OSSIM_CHIPPER_OP_CHIP = 5, OSSIM_CHIPPER_OP_PSM = 6 } |
emumerated operations More... | |
enum | ossimChipperOutputProjection { OSSIM_CHIPPER_PROJ_UNKNOWN = 0, OSSIM_CHIPPER_PROJ_GEO = 1, OSSIM_CHIPPER_PROJ_GEO_SCALED = 2, OSSIM_CHIPPER_PROJ_INPUT = 3, OSSIM_CHIPPER_PROJ_UTM = 4 } |
emumerated output projections More... | |
Public Member Functions | |
ossimChipperUtil () | |
default constructor More... | |
virtual | ~ossimChipperUtil () |
virtual destructor More... | |
void | clear () |
Disconnects and clears the dem and image layers. More... | |
bool | initialize (ossimArgumentParser &ap) |
Initial method to be ran prior to execute. More... | |
void | initialize (const ossimKeywordlist &kwl) |
Initialize method to be ran prior to execute. More... | |
void | execute () |
execute method. More... | |
void | abort () |
ossimRefPtr< ossimImageData > | getChip (const ossimKeywordlist &optionsKwl=ossimKeywordlist()) |
Gets initialized area of interest(aoi) from chain. More... | |
void | getOutputFilename (ossimFilename &f) const |
Gets the output file name. More... | |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Private Member Functions | |
void | initialize () |
Initial method to be ran prior to execute. More... | |
ossimRefPtr< ossimImageSource > | initializeChain (ossimIrect &aoi) |
Builds image chains returns ref pointer to image source and initializes area of interest(aoi). More... | |
void | setOptionsToChain (ossimIrect &aoi, const ossimKeywordlist &kwl) |
ossimRefPtr< ossimImageSource > | initializeColorReliefChain () |
Initializes a color relief chain. More... | |
ossimRefPtr< ossimImageSource > | initializeBumpShadeChain () |
Initializes a bump shade chain. More... | |
ossimRefPtr< ossimImageSource > | initialize2CmvChain () |
Combines two images into a two color multi view chain. More... | |
ossimRefPtr< ossimImageSource > | initializePsmChain () |
Initializes a psm (pan sharpening multispectra) chain. More... | |
void | initializeOutputProjection () |
Initializes the output projection and propagates to image chains. More... | |
void | addDemSources () |
Create chains for all dems. More... | |
void | addDemSource (const ossimFilename &file, ossim_uint32 entryIndex) |
Method to create a chain and add to dem layers from file. More... | |
void | addDemSource (const ossimSrcRecord &rec) |
Method to create a chain and add to dem layers from a ossimSrcRecord. More... | |
void | addImgSources () |
Creates chains for all images. More... | |
void | addImgSource (const ossimFilename &file, ossim_uint32 entryIndex) |
Method to create a chain and add to img layers from file. More... | |
void | addImgSource (const ossimSrcRecord &rec) |
Method to create a chain and add to img layers from a ossimSrcRecord. More... | |
ossimRefPtr< ossimSingleImageChain > | createChain (const ossimFilename &file, ossim_uint32 entryIndex, bool isDemSource) const |
Creates a ossimSingleImageChain from file. More... | |
ossimRefPtr< ossimSingleImageChain > | createChain (const ossimSrcRecord &rec, bool isDemSource) const |
Creates a ossimSingleImageChain from ossimSrcRecord. More... | |
void | createOutputProjection () |
Creates the output or view projection. More... | |
void | createIdentityProjection () |
Sets the single image chain for identity operations view to a ossimImageViewAffineTransform. More... | |
ossimRefPtr< ossimMapProjection > | getFirstInputProjection () |
Gets the first input projection. More... | |
ossimRefPtr< ossimMapProjection > | getNewGeoProjection () |
Convenience method to get geographic projection. More... | |
ossimRefPtr< ossimMapProjection > | getNewGeoScaledProjection () |
Convenience method to get geographic projection. More... | |
ossimRefPtr< ossimMapProjection > | getNewProjectionFromSrsCode (const std::string &code) |
Convenience method to get a projection from an srs code. More... | |
ossimRefPtr< ossimMapProjection > | getNewUtmProjection () |
Convenience method to get a utm projection. More... | |
ossimRefPtr< ossimMapProjection > | getMapProjection () |
Convenience method to get a pointer to the output map projection. More... | |
void | intiailizeProjectionTiePoint () |
Sets the projection tie point to the scene bounding rect corner. More... | |
void | initializeProjectionGsd () |
Initializes the projection gsd. More... | |
void | initializeIvtScale () |
Initializes the image view transform(IVT) scale. More... | |
void | getTiePoint (ossimGpt &tie) |
Loops through all layers to get the upper left tie point. More... | |
void | getTiePoint (ossimSingleImageChain *chain, ossimGpt &tie) |
Gets the upper left tie point from a chain. More... | |
void | getTiePoint (ossimDpt &tie) |
Loops through all layers to get the upper left tie point. More... | |
void | getTiePoint (ossimSingleImageChain *chain, ossimDpt &tie) |
Gets the upper left tie point from a chain. More... | |
void | getMetersPerPixel (ossimDpt &gsd) |
Loops through all layers to get the best gsd. More... | |
void | getMetersPerPixel (ossimSingleImageChain *chain, ossimDpt &gsd) |
Gets the gsd from a chain. More... | |
ossim_float64 | getCentralMeridian () const |
Gets value of key "central_meridan" if set, nan if not. More... | |
ossim_float64 | getOriginLatitude () const |
Gets value of key "origin_latitude" if set, nan if not. More... | |
void | getSceneCenter (ossimGpt &gpt) |
Loops through all layers to get the scene center ground point. More... | |
void | getSceneCenter (ossimSingleImageChain *chain, ossimGpt &gpt) |
Gets the scene center from a chain. More... | |
ossimRefPtr< ossimImageFileWriter > | createNewWriter () const |
Creates a new writer. More... | |
void | propagateOutputProjectionToChains () |
loops through all chains and sets the output projection. More... | |
ossimRefPtr< ossimImageSource > | combineLayers (std::vector< ossimRefPtr< ossimSingleImageChain > > &layers) const |
Combines all layers into an ossimImageMosaic. More... | |
ossimRefPtr< ossimImageSource > | combineLayers () |
Combines dems(m_demLayer) and images(m_imgLayer). More... | |
ossimRefPtr< ossimImageSource > | addIndexToRgbLutFilter (ossimRefPtr< ossimImageSource > &source) const |
Creates ossimIndexToRgbLutFilter and connects to source. More... | |
ossimRefPtr< ossimImageSource > | addScalarRemapper (ossimRefPtr< ossimImageSource > &source, ossimScalarType scalar) const |
Creates ossimScalarRemapper and connects to source. More... | |
ossimRefPtr< ossimImageSource > | addAnnotations (ossimRefPtr< ossimImageSource > &source) const |
Add annotation source to chain. More... | |
void | addCrossHairAnnotation (ossimRefPtr< ossimAnnotationSource > annotator, const std::string &prefix) const |
Adds cross hair graphic to annotation source. More... | |
bool | setupChainHistogram (ossimRefPtr< ossimSingleImageChain > &chain, std::shared_ptr< ossimSrcRecord > srcRecordPtr=0) const |
Set up ossimHistogramRemapper for a chain. More... | |
bool | setChainEntry (ossimRefPtr< ossimSingleImageChain > &chain, ossim_uint32 entryIndex) const |
Sets entry for a chain. More... | |
void | getAreaOfInterest (ossimImageSource *source, ossimIrect &rect) const |
Initializes "rect" with the output area of interest. More... | |
bool | getIrect (const std::string &s, ossimIrect &rect) const |
Gets rect from string in the form of <x>,<y>,<w>,<h>. More... | |
bool | getIrect (ossimRefPtr< ossimSingleImageChain > &chain, const std::string &s, ossimIrect &rect) const |
Gets image rect from string in the form of <lat>,<lon>,<w>,<h>. More... | |
bool | getIrect (ossimRefPtr< ossimSingleImageChain > &chain, ossimIrect &rect) const |
Gets 256 x 256 image rect from center of the image. More... | |
void | initializeThumbnailProjection (const ossimIrect &originalRect, ossimIrect &adjustedRect) |
Method to calculate and initialize scale and area of interest for making a thumbnail. More... | |
bool | hasBandSelection () const |
void | getBandList (std::vector< ossim_uint32 > &bandList) const |
Gets the band list if BANDS keyword is set. More... | |
bool | hasAnnotations () const |
bool | hasLutFile () const |
bool | hasBrightnesContrastOperation () const |
bool | hasGeoPolyCutterOption () const |
bool | hasBumpShadeArg () const |
bool | hasThumbnailResolution () const |
bool | hasHistogramOperation () const |
bool | isDemFile (const ossimFilename &file) const |
bool | isSrcFile (const ossimFilename &file) const |
void | initializeSrcKwl () |
Initializes m_srcKwl if option was set. More... | |
ossim_uint32 | getNumberOfInputs () const |
ossimChipperOutputProjection | getOutputProjectionType () const |
Gets the emumerated output projection type. More... | |
ossimScalarType | getOutputScalarType () const |
Returns the scalar type from OUTPUT_RADIOMETRY_KW keyword if present. More... | |
bool | scaleToEightBit () const |
bool | snapTieToOrigin () const |
void | getImageSpaceScale (ossimDpt &imageSpaceScale) const |
Gets the image space scale. More... | |
void | getImageSpacePivot (ossimDpt &imageSpacePivot) const |
Gets the image space pivot. More... | |
ossim_float64 | getRotation () const |
Gets rotation. More... | |
bool | hasRotation () const |
bool | upIsUp () const |
bool | northUp () const |
bool | isChipMode () const |
bool | keyIsTrue (const std::string &key) const |
ossim_uint32 | getEntryNumber () const |
ossim_int32 | getZone () const |
std::string | getHemisphere () const |
bool | hasSensorModelInput () |
bool | hasCutBoxWidthHeight () const |
bool | hasWmsBboxCutWidthHeight () const |
bool | hasScaleOption () const |
bool | isThreeBandOut () const |
bool | padThumbnail () const |
void | setReaderProps (ossimImageHandler *ih) const |
Passes reader properties to single image handler if any. More... | |
void | addArguments (ossimArgumentParser &ap) |
Adds application arguments to the argument parser. More... | |
void | getClipPolygon (ossimGeoPolygon &polygon) const |
ossim_float64 | getBrightness () const |
Gets the brightness level. More... | |
ossim_float64 | getContrast () const |
Gets the contrast level. More... | |
std::string | getSharpenMode () const |
Gets the sharpen mode. More... | |
int | getHistoMode () const |
void | usage (ossimArgumentParser &ap) |
Initializes arg parser and outputs usage. More... | |
ossimChipperUtil (const ossimChipperUtil &obj) | |
Hidden from use copy constructor. More... | |
const ossimChipperUtil & | operator= (const ossimChipperUtil &rhs) |
Hidden from use assignment operator. More... | |
ossimRefPtr< ossimImageSource > | createCombiner () const |
Private Attributes | |
ossimChipperOperation | m_operation |
Enumerated operation to perform. More... | |
ossimRefPtr< ossimKeywordlist > | m_kwl |
Hold all options passed into intialize. More... | |
ossimRefPtr< ossimKeywordlist > | m_srcKwl |
Hold contents of src file if –src is used. More... | |
ossimRefPtr< ossimImageGeometry > | m_geom |
The image geometry. More... | |
ossimRefPtr< ossimImageViewAffineTransform > | m_ivt |
Image view transform(IVT). More... | |
std::vector< ossimRefPtr< ossimSingleImageChain > > | m_demLayer |
Array of dem chains. More... | |
std::vector< ossimRefPtr< ossimSingleImageChain > > | m_imgLayer |
Array of image source chains. More... | |
ossimRefPtr< ossimImageFileWriter > | m_writer |
We need access to the writer so we can support aborting. More... | |
ossimRefPtr< ossimImageSource > | m_source |
We need to support changing clips without doing a full initilization. More... | |
Additional Inherited Members | |
![]() | |
virtual | ~ossimReferenced () |
ossimChipperUtil class.
This is a utility class to orthorectify imagery with an added slant toward doing digital elevation model(DEM) operations.
See the ossim-dem application for a code usage example.
Definition at line 61 of file ossimChipperUtil.h.
emumerated operations
Enumerator | |
---|---|
OSSIM_CHIPPER_OP_UNKNOWN | |
OSSIM_CHIPPER_OP_HILL_SHADE | |
OSSIM_CHIPPER_OP_COLOR_RELIEF | |
OSSIM_CHIPPER_OP_ORTHO | |
OSSIM_CHIPPER_OP_2CMV | |
OSSIM_CHIPPER_OP_CHIP | |
OSSIM_CHIPPER_OP_PSM |
Definition at line 66 of file ossimChipperUtil.h.
emumerated output projections
Enumerator | |
---|---|
OSSIM_CHIPPER_PROJ_UNKNOWN | |
OSSIM_CHIPPER_PROJ_GEO | |
OSSIM_CHIPPER_PROJ_GEO_SCALED | |
OSSIM_CHIPPER_PROJ_INPUT | |
OSSIM_CHIPPER_PROJ_UTM |
Definition at line 78 of file ossimChipperUtil.h.
ossimChipperUtil::ossimChipperUtil | ( | ) |
default constructor
Definition at line 142 of file ossimChipperUtil.cpp.
References m_kwl, and ossimKeywordlist::setExpandEnvVarsFlag().
|
virtual |
virtual destructor
Definition at line 187 of file ossimChipperUtil.cpp.
References clear().
|
private |
Hidden from use copy constructor.
Definition at line 158 of file ossimChipperUtil.cpp.
void ossimChipperUtil::abort | ( | ) |
Definition at line 1500 of file ossimChipperUtil.cpp.
References ossimProcessInterface::abort(), m_writer, and ossimRefPtr< T >::valid().
|
private |
Add annotation source to chain.
Source | to connect to. |
Definition at line 3999 of file ossimChipperUtil.cpp.
|
private |
Adds application arguments to the argument parser.
ap | Parser to add to. |
Definition at line 192 of file ossimChipperUtil.cpp.
References ossimApplicationUsage::addCommandLineOption(), ossimArgumentParser::getApplicationName(), ossimArgumentParser::getApplicationUsage(), ossimApplicationUsage::setCommandLineUsage(), and ossimApplicationUsage::setDescription().
Referenced by usage().
|
private |
Adds cross hair graphic to annotation source.
Annotator | to add objects to. |
prefix | e.g. annotation0. |
Definition at line 4067 of file ossimChipperUtil.cpp.
References ossimAnnotationSource::addObject(), ossimKeywordlist::findKey(), ossimRefPtr< T >::get(), ossimAnnotationFontObject::getBoundingRect(), ossimAnnotationSource::getBoundingRect(), ossimDpt::hasNans(), ossimGpt::hasNans(), ossimImageViewAffineTransform::imageToView(), ossimAnnotationObject::loadState(), m_geom, m_ivt, m_kwl, ossimDpt::makeNan(), ossimIrect::midPoint(), ossimAnnotationLineObject::setLine(), ossimAnnotationFontObject::setPointSize(), ossimAnnotationFontObject::setScale(), ossimAnnotationFontObject::setString(), ossimAnnotationFontObject::setUpperLeftPosition(), ossimString::toInt32(), ossimIpt::toPoint(), ossimDpt::toPoint(), ossimGpt::toPoint(), ossimRefPtr< T >::valid(), ossimDrect::width(), ossimImageGeometry::worldToLocal(), ossimIpt::x, ossimDpt::x, ossimIpt::y, and ossimDpt::y.
|
private |
Method to create a chain and add to dem layers from file.
file | Image to open. entryIndex Entry to open. |
Definition at line 1613 of file ossimChipperUtil.cpp.
|
private |
Method to create a chain and add to dem layers from a ossimSrcRecord.
Definition at line 1634 of file ossimChipperUtil.cpp.
|
private |
Create chains for all dems.
Definition at line 1553 of file ossimChipperUtil.cpp.
|
private |
Method to create a chain and add to img layers from file.
file | Image to open. entryIndex Entry to open. |
Definition at line 1700 of file ossimChipperUtil.cpp.
|
private |
Method to create a chain and add to img layers from a ossimSrcRecord.
Definition at line 1722 of file ossimChipperUtil.cpp.
|
private |
Creates chains for all images.
Definition at line 1655 of file ossimChipperUtil.cpp.
|
private |
Creates ossimIndexToRgbLutFilter and connects to source.
Source | to connect to. |
Definition at line 3895 of file ossimChipperUtil.cpp.
Referenced by initializeColorReliefChain().
|
private |
Creates ossimScalarRemapper and connects to source.
Source | to connect to. |
scalar | Scalar type. |
Definition at line 3951 of file ossimChipperUtil.cpp.
Referenced by initializeColorReliefChain().
void ossimChipperUtil::clear | ( | ) |
Disconnects and clears the dem and image layers.
Definition at line 329 of file ossimChipperUtil.cpp.
References ossimConnectableObject::disconnect(), m_demLayer, m_imgLayer, m_writer, and ossimRefPtr< T >::valid().
Referenced by initialize(), and ~ossimChipperUtil().
|
private |
Combines all layers into an ossimImageMosaic.
Definition at line 3645 of file ossimChipperUtil.cpp.
|
private |
Combines dems(m_demLayer) and images(m_imgLayer).
Definition at line 3681 of file ossimChipperUtil.cpp.
Referenced by initializeColorReliefChain().
|
private |
Creates a ossimSingleImageChain from file.
file | File to open. |
entryIndex | Entry to open. |
isDemSource | True if dem source, false if not. This controls chain options like histogram stretches. |
Definition at line 1743 of file ossimChipperUtil.cpp.
|
private |
Creates a ossimSingleImageChain from ossimSrcRecord.
src | Record. |
isDemSource | True if dem source, false if not. This controls chain options like histogram stretches. |
Definition at line 1945 of file ossimChipperUtil.cpp.
|
private |
Definition at line 169 of file ossimChipperUtil.cpp.
References ossimKeywordlist::find(), and m_kwl.
|
private |
Sets the single image chain for identity operations view to a ossimImageViewAffineTransform.
This will have a rotation if up is up is selected. Also set m_outputProjection to the input's for area of interest.
Definition at line 2274 of file ossimChipperUtil.cpp.
Referenced by initializeOutputProjection().
|
private |
Creates a new writer.
This will use the writer option (-w or –writer), if present; else, it will be derived from the output file extension.
This will also set any writer properties passed in.
Definition at line 3470 of file ossimChipperUtil.cpp.
|
private |
Creates the output or view projection.
Definition at line 2123 of file ossimChipperUtil.cpp.
Referenced by initializeOutputProjection().
void ossimChipperUtil::execute | ( | ) |
execute method.
Performs the actual product write.
Definition at line 1433 of file ossimChipperUtil.cpp.
|
private |
Initializes "rect" with the output area of interest.
Initialization will either come from user defined cut options or the source bounding rect with user options taking precidence.
source | Should be the end of the processing chain. |
rect | Rectangle to initialize. This is in output (view) space. |
Definition at line 4377 of file ossimChipperUtil.cpp.
Referenced by getChip(), and setOptionsToChain().
|
private |
Gets the band list if BANDS keyword is set.
NOTE: BANDS keyword values are ONE based. bandList values are ZERO based.
bandList | List initialized by this. |
Definition at line 5052 of file ossimChipperUtil.cpp.
References ossimKeywordNames::BANDS_KW, ossimKeywordlist::findKey(), m_kwl, ossimString::size(), ossimString::split(), ossimString::string(), and ossimRefPtr< T >::valid().
|
private |
Gets the brightness level.
This will return 0.0 if the keyword is not found or if the range check is not between -1.0 and 1.0.
Definition at line 5593 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), and m_kwl.
|
private |
Gets value of key "central_meridan" if set, nan if not.
Definition at line 3094 of file ossimChipperUtil.cpp.
References ossimKeywordNames::CENTRAL_MERIDIAN_KW, ossimKeywordlist::findKey(), m_kwl, ossim::nan(), ossimString::size(), and ossimString::toFloat64().
Referenced by getNewGeoScaledProjection(), and getNewUtmProjection().
ossimRefPtr< ossimImageData > ossimChipperUtil::getChip | ( | const ossimKeywordlist & | optionsKwl = ossimKeywordlist() | ) |
Gets initialized area of interest(aoi) from chain.
cut_wms_bbox: .......... cut_width: cut_height:
Definition at line 1508 of file ossimChipperUtil.cpp.
References ossimKeywordlist::addList(), ossimRefPtr< T >::get(), getAreaOfInterest(), ossimKeywordlist::getSize(), ossimImageSource::getTile(), initializeChain(), initializeOutputProjection(), m_geom, m_kwl, m_source, ossimImageGeometry::setImageSize(), ossimIrect::size(), and ossimRefPtr< T >::valid().
|
private |
Definition at line 5568 of file ossimChipperUtil.cpp.
References ossimKeywordlist::find(), and m_kwl.
|
private |
Gets the contrast level.
This will return 1.0 if the keyword is not found or if the range check is not between 0.0 and 20.0.
Definition at line 5618 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), and m_kwl.
|
private |
Definition at line 5369 of file ossimChipperUtil.cpp.
References ossimKeywordNames::ENTRY_KW, ossimKeywordlist::findKey(), m_kwl, ossimString::toUInt32(), and ossimRefPtr< T >::valid().
|
private |
Gets the first input projection.
This gets the output projection of the first dem layer if present; if not, the first image layer.
Definition at line 3254 of file ossimChipperUtil.cpp.
|
private |
Definition at line 5398 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), ossimKeywordNames::HEMISPHERE_KW, m_kwl, and ossimRefPtr< T >::valid().
Referenced by getNewUtmProjection().
|
private |
Definition at line 5663 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), m_kwl, and ossimHistogramRemapper::STRETCH_UNKNOWN.
|
private |
Gets the image space pivot.
This is a "chip" operation only. Will extract the center from the FULLRES keyword
Keys: FULLRES_XYS
This will return NaN if not set
Definition at line 5274 of file ossimChipperUtil.cpp.
References ossimKeywordlist::hasKey(), m_kwl, and ossimDpt::makeNan().
|
private |
Gets the image space scale.
This is a "chip" operation only.
Keys: IMAGE_SPACE_SCALE_X_KW IMAGE_SPACE_SCALE_Y_KW FULLRES_XYS
Scale will be 1.0, 1.0 if keys not found.
Definition at line 5230 of file ossimChipperUtil.cpp.
References ossimKeywordlist::hasKey(), m_kwl, ossimDpt::x, and ossimDpt::y.
|
private |
Gets rect from string in the form of <x>,<y>,<w>,<h>.
s | String to parse. Initialized by this. |
Definition at line 4723 of file ossimChipperUtil.cpp.
References ossimString::split(), ossimIpt::x, and ossimIpt::y.
|
private |
Gets image rect from string in the form of <lat>,<lon>,<w>,<h>.
Computes image rect from world point assumed to be center of aoi.
chain | |
s | String to parse. Initialized by this. |
Definition at line 4747 of file ossimChipperUtil.cpp.
References ossimImageHandler::getImageGeometry(), ossimSingleImageChain::getImageHandler(), ossimGpt::lat, ossimGpt::lon, ossimString::split(), ossimRefPtr< T >::valid(), ossimImageGeometry::worldToLocal(), ossimIpt::x, and ossimIpt::y.
|
private |
Gets 256 x 256 image rect from center of the image.
Computes image rect from world point assumed to be center of aoi.
chain | Initialized by this. |
Definition at line 4789 of file ossimChipperUtil.cpp.
References ossimSingleImageChain::getImageHandler(), ossimImageHandler::getImageRectangle(), MAX, ossimIrect::midPoint(), ossim::min(), ossimIrect::size(), size, ossimRefPtr< T >::valid(), ossimIpt::x, and ossimIpt::y.
|
private |
Convenience method to get a pointer to the output map projection.
Callers should check for valid() as the pointer could be 0 if not initialized.
Definition at line 3460 of file ossimChipperUtil.cpp.
References ossimImageGeometry::getProjection(), m_geom, and ossimRefPtr< T >::valid().
|
private |
Loops through all layers to get the best gsd.
gsd | Point to initialize. |
Definition at line 3004 of file ossimChipperUtil.cpp.
|
private |
Gets the gsd from a chain.
chain | The chain to get gsd from. |
gsd | Point to initialize. |
Definition at line 3048 of file ossimChipperUtil.cpp.
|
private |
Convenience method to get geographic projection.
Definition at line 3320 of file ossimChipperUtil.cpp.
Referenced by getNewGeoScaledProjection().
|
private |
Convenience method to get geographic projection.
This method sets the origin to the center of the scene bounding rect of all layers.
Definition at line 3325 of file ossimChipperUtil.cpp.
References getCentralMeridian(), getNewGeoProjection(), getOriginLatitude(), getSceneCenter(), ossimGpt::hasNans(), ossimGpt::hgt, ossimGpt::lat, ossimGpt::lon, and ossimMapProjection::setOrigin().
|
private |
Convenience method to get a projection from an srs code.
Definition at line 3364 of file ossimChipperUtil.cpp.
References ossimString::downcase(), ossimRefPtr< T >::get(), ossimProjectionFactoryRegistry::instance(), PTR_CAST, and ossimRefPtr< T >::valid().
|
private |
Convenience method to get a utm projection.
Definition at line 3389 of file ossimChipperUtil.cpp.
References ossimRefPtr< T >::get(), getCentralMeridian(), getHemisphere(), getOriginLatitude(), getSceneCenter(), getZone(), ossimGpt::hasNans(), ossimGpt::hgt, ossimGpt::lat, ossimGpt::lon, ossimUtmProjection::setHemisphere(), ossimUtmProjection::setZone(), and ossimString::upcase().
|
private |
Definition at line 5512 of file ossimChipperUtil.cpp.
References ossimKeywordlist::getNumberOfKeysThatMatch(), m_kwl, m_srcKwl, and ossimRefPtr< T >::valid().
|
private |
Gets value of key "origin_latitude" if set, nan if not.
Definition at line 3111 of file ossimChipperUtil.cpp.
References ossimKeywordlist::find(), m_kwl, ossim::nan(), ossimKeywordNames::ORIGIN_LATITUDE_KW, ossimString::size(), and ossimString::toFloat64().
Referenced by getNewGeoScaledProjection(), and getNewUtmProjection().
void ossimChipperUtil::getOutputFilename | ( | ossimFilename & | f | ) | const |
Gets the output file name.
f | Initialized by this with the filename. |
Definition at line 4372 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), m_kwl, ossimKeywordNames::OUTPUT_FILE_KW, and ossimString::string().
|
private |
Gets the emumerated output projection type.
This looks in m_kwl for ossimKeywordNames::PROJECTION_KW.
Definition at line 5540 of file ossimChipperUtil.cpp.
References ossimString::downcase(), ossimKeywordlist::find(), m_kwl, OSSIM_CHIPPER_PROJ_GEO, OSSIM_CHIPPER_PROJ_GEO_SCALED, OSSIM_CHIPPER_PROJ_INPUT, OSSIM_CHIPPER_PROJ_UNKNOWN, OSSIM_CHIPPER_PROJ_UTM, and ossimKeywordNames::PROJECTION_KW.
|
private |
Returns the scalar type from OUTPUT_RADIOMETRY_KW keyword if present.
Deprecated SCALE_2_8_BIT_KW is also checked.
Definition at line 5196 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), m_kwl, and OSSIM_SCALAR_UNKNOWN.
Referenced by scaleToEightBit().
|
private |
Gets rotation.
Definition at line 5301 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), m_kwl, ossim::nan(), and ossimRefPtr< T >::valid().
|
private |
Loops through all layers to get the scene center ground point.
gpt | Point to initialize. |
Definition at line 3128 of file ossimChipperUtil.cpp.
Referenced by getNewGeoScaledProjection(), and getNewUtmProjection().
|
private |
Gets the scene center from a chain.
chain | The chain to get scene center from. |
gpt | Point to initialize. |
Definition at line 3201 of file ossimChipperUtil.cpp.
|
private |
Gets the sharpen mode.
Valid modes: light, heavy
Definition at line 5643 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), and m_kwl.
|
private |
Loops through all layers to get the upper left tie point.
tie | Point to initialize. |
Definition at line 2752 of file ossimChipperUtil.cpp.
|
private |
Gets the upper left tie point from a chain.
chain | The chain to get tie point from. |
tie | Point to initialize. |
Definition at line 2820 of file ossimChipperUtil.cpp.
|
private |
Loops through all layers to get the upper left tie point.
tie | Point to initialize. |
Definition at line 2881 of file ossimChipperUtil.cpp.
|
private |
Gets the upper left tie point from a chain.
chain | The chain to get tie point from. |
tie | Point to initialize. |
Definition at line 2947 of file ossimChipperUtil.cpp.
|
private |
Definition at line 5383 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), m_kwl, ossimString::toUInt32(), ossimRefPtr< T >::valid(), and ossimKeywordNames::ZONE_KW.
Referenced by getNewUtmProjection().
|
private |
Definition at line 5081 of file ossimChipperUtil.cpp.
References ossimKeywordlist::getNumberOfKeysThatMatch(), m_kwl, and ossimRefPtr< T >::valid().
|
private |
Definition at line 4943 of file ossimChipperUtil.cpp.
References ossimKeywordNames::BANDS_KW, ossimKeywordlist::hasKey(), m_kwl, and ossimRefPtr< T >::valid().
|
private |
Definition at line 5106 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), and m_kwl.
|
private |
Definition at line 5133 of file ossimChipperUtil.cpp.
References ossimKeywordNames::AZIMUTH_ANGLE_KW, ossimKeywordlist::find(), m_kwl, m_operation, OSSIM_CHIPPER_OP_HILL_SHADE, and ossimRefPtr< T >::valid().
|
private |
Definition at line 4968 of file ossimChipperUtil.cpp.
References ossimKeywordlist::hasKey(), m_kwl, and ossimRefPtr< T >::valid().
|
private |
Definition at line 5125 of file ossimChipperUtil.cpp.
References ossimKeywordlist::find(), and m_kwl.
|
private |
Definition at line 5158 of file ossimChipperUtil.cpp.
References ossimKeywordlist::hasKey(), m_kwl, and ossimRefPtr< T >::valid().
|
private |
Definition at line 5096 of file ossimChipperUtil.cpp.
References ossimKeywordlist::find(), m_kwl, and ossimRefPtr< T >::valid().
Referenced by initializeColorReliefChain().
|
private |
Definition at line 5334 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), and m_kwl.
|
private |
Definition at line 5000 of file ossimChipperUtil.cpp.
References ossimKeywordlist::hasKey(), m_kwl, and ossimRefPtr< T >::valid().
|
private |
Definition at line 5408 of file ossimChipperUtil.cpp.
References ossimRefPtr< T >::get(), ossimImageHandler::getImageGeometry(), ossimImageGeometry::getProjection(), m_demLayer, m_imgLayer, PTR_CAST, and ossimRefPtr< T >::valid().
|
private |
Definition at line 5148 of file ossimChipperUtil.cpp.
References ossimKeywordlist::find(), m_kwl, and ossimRefPtr< T >::valid().
|
private |
Definition at line 4953 of file ossimChipperUtil.cpp.
References ossimKeywordlist::hasKey(), m_kwl, and ossimRefPtr< T >::valid().
bool ossimChipperUtil::initialize | ( | ossimArgumentParser & | ap | ) |
Initial method to be ran prior to execute.
ap | Arg parser to initialize from. |
Definition at line 357 of file ossimChipperUtil.cpp.
void ossimChipperUtil::initialize | ( | const ossimKeywordlist & | kwl | ) |
Initialize method to be ran prior to execute.
Definition at line 871 of file ossimChipperUtil.cpp.
References ossimKeywordlist::addList(), clear(), ossimKeywordlist::clear(), initialize(), and m_kwl.
|
private |
Initial method to be ran prior to execute.
Definition at line 883 of file ossimChipperUtil.cpp.
Referenced by initialize().
|
private |
Combines two images into a two color multi view chain.
Definition at line 3743 of file ossimChipperUtil.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimRefPtr< T >::get(), m_demLayer, m_imgLayer, ossimTwoColorView::NEW, ossimTwoColorView::OLD, and ossimRefPtr< T >::valid().
|
private |
Initializes a bump shade chain.
Definition at line 1184 of file ossimChipperUtil.cpp.
|
private |
Builds image chains returns ref pointer to image source and initializes area of interest(aoi).
Definition at line 1060 of file ossimChipperUtil.cpp.
Referenced by getChip().
|
private |
Initializes a color relief chain.
Definition at line 1318 of file ossimChipperUtil.cpp.
References addIndexToRgbLutFilter(), addScalarRemapper(), combineLayers(), ossimImageSource::getOutputScalarType(), hasLutFile(), and OSSIM_UINT8.
|
private |
Initializes the image view transform(IVT) scale.
Chip mode only. Sets IVT scale to output / input.
Definition at line 2396 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), isChipMode(), m_geom, m_ivt, m_kwl, ossimDpt::makeNan(), ossimString::string(), and ossimRefPtr< T >::valid().
|
private |
Initializes the output projection and propagates to image chains.
Definition at line 1417 of file ossimChipperUtil.cpp.
References createIdentityProjection(), createOutputProjection(), isChipMode(), and propagateOutputProjectionToChains().
Referenced by getChip().
|
private |
Initializes the projection gsd.
This loops through all chains to find the best resolution gsd.
Definition at line 2583 of file ossimChipperUtil.cpp.
|
private |
Initializes a psm (pan sharpening multispectra) chain.
Definition at line 1336 of file ossimChipperUtil.cpp.
References ossimConnectableObject::connectMyInputTo(), ossimRefPtr< T >::get(), ossimImageSource::getNumberOfOutputBands(), ossimFusionCombiner::initialize(), m_demLayer, m_imgLayer, ossimSingleImageChain::setBandSelection(), and ossimRefPtr< T >::valid().
|
private |
Initializes m_srcKwl if option was set.
Definition at line 5476 of file ossimChipperUtil.cpp.
|
private |
Method to calculate and initialize scale and area of interest for making a thumbnail.
Sets the scale of the output projection so that the adjusted rectangle meets the cut rect and demension requirements set in options.
originalRect | Original scene area of interest. |
adjustedRect | New rect for thumbnail. |
Definition at line 4814 of file ossimChipperUtil.cpp.
|
private |
Sets the projection tie point to the scene bounding rect corner.
Definition at line 2490 of file ossimChipperUtil.cpp.
|
private |
Definition at line 5350 of file ossimChipperUtil.cpp.
References m_operation, and OSSIM_CHIPPER_OP_CHIP.
Referenced by initializeIvtScale(), and initializeOutputProjection().
|
private |
Definition at line 5168 of file ossimChipperUtil.cpp.
References ossimString::begin(), ossimString::downcase(), ossimFilename::ext(), and ossimString::size().
|
private |
Definition at line 5184 of file ossimChipperUtil.cpp.
References ossimString::downcase(), and ossimFilename::ext().
|
private |
Definition at line 5016 of file ossimChipperUtil.cpp.
References keyIsTrue().
|
private |
Definition at line 5355 of file ossimChipperUtil.cpp.
References ossimKeywordlist::findKey(), m_kwl, ossimString::toBool(), and ossimRefPtr< T >::valid().
Referenced by isThreeBandOut(), northUp(), padThumbnail(), snapTieToOrigin(), and upIsUp().
|
private |
Definition at line 5345 of file ossimChipperUtil.cpp.
References keyIsTrue().
|
private |
Hidden from use assignment operator.
Definition at line 164 of file ossimChipperUtil.cpp.
|
private |
Definition at line 5021 of file ossimChipperUtil.cpp.
References keyIsTrue().
|
private |
loops through all chains and sets the output projection.
Definition at line 3576 of file ossimChipperUtil.cpp.
Referenced by initializeOutputProjection().
|
private |
Definition at line 5215 of file ossimChipperUtil.cpp.
References getOutputScalarType(), and OSSIM_UINT8.
|
private |
Sets entry for a chain.
chain | Chain to set up. |
entryIndex | Zero based index. |
Definition at line 4357 of file ossimChipperUtil.cpp.
References ossimSingleImageChain::getImageHandler(), ossimImageHandler::setCurrentEntry(), and ossimRefPtr< T >::valid().
|
private |
Definition at line 1178 of file ossimChipperUtil.cpp.
References ossimRefPtr< T >::get(), getAreaOfInterest(), and m_source.
|
private |
Passes reader properties to single image handler if any.
ih | Image handler to set properties on. |
Definition at line 5026 of file ossimChipperUtil.cpp.
References m_kwl, ossimKeywordlist::numberOf(), and ossimRefPtr< T >::valid().
|
private |
Set up ossimHistogramRemapper for a chain.
chain | Chain to set up. |
Definition at line 4214 of file ossimChipperUtil.cpp.
|
private |
Definition at line 5225 of file ossimChipperUtil.cpp.
References keyIsTrue().
|
private |
Definition at line 5329 of file ossimChipperUtil.cpp.
References keyIsTrue().
|
private |
Initializes arg parser and outputs usage.
Definition at line 5699 of file ossimChipperUtil.cpp.
References addArguments(), ossimInit::addOptions(), ossimArgumentParser::getApplicationName(), ossimArgumentParser::getApplicationUsage(), ossimInit::instance(), ossimNotify(), ossimNotifyLevel_INFO, ossimApplicationUsage::setApplicationName(), and ossimApplicationUsage::write().
|
private |
Array of dem chains.
Definition at line 820 of file ossimChipperUtil.h.
Referenced by clear(), hasSensorModelInput(), initialize2CmvChain(), and initializePsmChain().
|
private |
The image geometry.
In chip mode this will be from the input image. So this may or may not have a map projection. In any other mode it will the view or output geometry which will be a map projection.
Definition at line 811 of file ossimChipperUtil.h.
Referenced by addCrossHairAnnotation(), getChip(), getMapProjection(), and initializeIvtScale().
|
private |
Array of image source chains.
Definition at line 823 of file ossimChipperUtil.h.
Referenced by clear(), hasSensorModelInput(), initialize2CmvChain(), and initializePsmChain().
|
private |
Image view transform(IVT).
Only set/used in "chip"(identity) operation as the IVT for the resampler(ossimImageRenderer).
Definition at line 817 of file ossimChipperUtil.h.
Referenced by addCrossHairAnnotation(), and initializeIvtScale().
|
private |
Hold all options passed into intialize.
Definition at line 801 of file ossimChipperUtil.h.
Referenced by addCrossHairAnnotation(), createCombiner(), getBandList(), getBrightness(), getCentralMeridian(), getChip(), getClipPolygon(), getContrast(), getEntryNumber(), getHemisphere(), getHistoMode(), getImageSpacePivot(), getImageSpaceScale(), getNumberOfInputs(), getOriginLatitude(), getOutputFilename(), getOutputProjectionType(), getOutputScalarType(), getRotation(), getSharpenMode(), getZone(), hasAnnotations(), hasBandSelection(), hasBrightnesContrastOperation(), hasBumpShadeArg(), hasCutBoxWidthHeight(), hasGeoPolyCutterOption(), hasHistogramOperation(), hasLutFile(), hasRotation(), hasScaleOption(), hasThumbnailResolution(), hasWmsBboxCutWidthHeight(), initialize(), initializeIvtScale(), keyIsTrue(), ossimChipperUtil(), and setReaderProps().
|
private |
Enumerated operation to perform.
Definition at line 798 of file ossimChipperUtil.h.
Referenced by hasBumpShadeArg(), and isChipMode().
|
private |
We need to support changing clips without doing a full initilization.
we will save the ImageSource pointer on first initialization
Definition at line 834 of file ossimChipperUtil.h.
Referenced by getChip(), and setOptionsToChain().
|
private |
Hold contents of src file if –src is used.
Definition at line 804 of file ossimChipperUtil.h.
Referenced by getNumberOfInputs().
|
mutableprivate |
We need access to the writer so we can support aborting.
Definition at line 828 of file ossimChipperUtil.h.