#include "main.h"
#include "support.h"
LT_USE_NAMESPACE(LizardTech);
{
const LTFileSpec fileSpec(INPUT_PATH(
"meg_cr20.sid"));
TEST_BOOL(reader != nullptr);
const double pixelWidth = reader->
getWidth();
const double pixelHeight = reader->
getHeight();
const double halfPixelWidth = pixelWidth / 2.0;
const double halfPixelHeight = pixelHeight / 2.0;
const double quarterPixelWidth = pixelWidth / 4.0;
const double quarterPixelHeight = pixelHeight / 4.0;
double geoCenterX = geo.
getX() + (geo.
getXRes() * halfPixelWidth);
double geoCenterY = geo.
getY() + (geo.
getYRes() * halfPixelHeight);
double ulx = geoCenterX - (geo.
getXRes() * quarterPixelWidth);
double uly = geoCenterY - (geo.
getYRes() * quarterPixelHeight);
double lrx = geoCenterX + (geo.
getXRes() * quarterPixelWidth);
double lry = geoCenterY + (geo.
getYRes() * quarterPixelHeight);
TEST_SUCCESS(nav.setSceneAsGeoULLR(ulx, uly, lrx, lry, 2.0));
TEST_SUCCESS(writer.
write(scene));
TEST_BOOL(Compare(OUTPUT_PATH("meg_geo.raw"), INPUT_PATH("meg_geo.raw")));
Remove(OUTPUT_PATH("meg_geo.raw"));
reader = nullptr;
}
lt_uint32 LT_STATUS
An integral status code.
#define LT_STS_Uninit
status code indicating unintialized variable
#define LT_STS_Success
status code indicating success
Represents a file or directory path.
represents a geographic coordinate
double getXRes() const
get the X resolution
double getY() const
get the upper-left Y position
double getX() const
get the upper-left X position
double getYRes() const
get the Y resolution
virtual LT_STATUS setOutputFileSpec(const LTFileSpec &fileSpec)
set output file name
lt_uint32 getHeight() const
get image height
lt_uint32 getWidth() const
get image width
const LTIGeoCoord & getGeoCoord() const
get the geographic coordinates of the image
virtual LT_STATUS write(const LTIScene &scene)
write (encode) a scene to the output format
provides LTIScene movement control
class for writing RAW files
LT_STATUS initialize(LTIImageStage *imageStage)
initialization function
virtual void release(void) const
decrement the reference counter and delete the object when the counter is zero
representation of a scene
reader for MrSID images (MG2, MG3 and MG4)
static MrSIDImageReader * create(void)
LT_STATUS initialize(const LTFileSpec &fileSpec, bool useWorldFile=false, MrSIDMemoryUsage memoryUsage=MRSID_MEMORY_USAGE_DEFAULT, MrSIDStreamUsage streamUsage=MRSID_STREAM_USAGE_DEFAULT)
initializer