Shared Samples

Try out source code samples stored in Bitbucket repositories.
Showing results for 
Search instead for 
Do you mean 

Application Function DLL imageSetMapExtent

by Technical Evangelist on ‎09-10-2015 09:29 AM - edited on ‎03-29-2016 11:23 AM by Anonymous (697 Views)

Example Type

Application Function DLL

 

 

Purpose

This example adjusts the bounding box of an image while retaining the relative geometric relationship of the pixels.  For an image with standard Map Information, this is identical to the “Change Map Model” command within the Image Command Tool.

The difference between this utility and the Image Command Tool occurs when the input image has a non-regular Geometric Model.  Consider for instance an image which contains an affine polynomial transform that rotates the image by 40-degrees.  After applying this function, the resulting image will still have a 40-degree rotation, but Image Information will now report the bounding box specified by the user.

 

Files

 

imageSetMapExtent.c

 (C source code)

 

imageSetMapExtent.eml

(EML source code)

 

imageSetMapExtent.dsp

 (Visual C++ Project)(Windows Only)

 

Description

 

This example computes the transformation for every layer independently.  This rigorously ensures that the resulting bounding box is the same for every layer.  The overwhelming majority of images have the same map model in each layer, and so it would be safe to compute the transform once and apply it to all layers.

 

 

Application Function Arguments

 

imageSetMapExtent($infile, $ulxtn, $ulytn, $lrxtn, $lrytn)

 

 

Interface

 demo.jpg

                          

 

Output

The input image is modified in place, with additional scaling information applied to its geometric model.

 

 

Source Code

https://bitbucket.org/HGDN/hgdn_erdas_imagine/src/e1ade3b7d148b0f2f1aa6427044dfa4bce6226ee/Af_imageS...

 

 

Overview
Contributors