MIE::JOB_IMAGE Class Reference

#include <mie/image.h>

Inheritance diagram for MIE::JOB_IMAGE:
Inheritance graph
[legend]

List of all members.

Public Types

enum  FLIP { FLIP_None = 0, FLIP_Vert = 1, FLIP_Horz = 2, FLIP_Both = 3 }
enum  MIEINTERLEAVE { MIEINTERLEAVE_Line = 0, MIEINTERLEAVE_Band = 1, MIEINTERLEAVE_Pixel = 2 }

Public Member Functions

 JOB_IMAGE (const FORMAT &format, const SETTINGS &settings)
virtual ~JOB_IMAGE ()
INT32 GetBandHdrBytes () const
INT32 GetBandNum () const
void GetBandPIL (UINT8 *dbuf, const UINT8 *sbuf, int band, int outcols)
INT32 GetBandTrailBytes () const
BYTEORDER GetByteOrder () const
RVC::IMAGE::CELLTYPE GetCellType () const
double GetColScale () const
double GetDataOffset () const
double GetDataScale () const
RVC::IMAGE::DATATYPE GetDataType () const
bool GetDoLink () const
FLIP GetFlip () const
INT32 GetHeaderBytes () const
INT32 GetInitCol () const
INT32 GetInitLin () const
INT32 GetInterleaveFactor () const
INT32 GetInterleaveHdrBytes () const
INT32 GetInterleaveTrailBytes () const
MIEINTERLEAVE GetInterleaveType () const
INT32 GetLastCol () const
INT32 GetLastLin () const
INT32 GetLineHdrBytes () const
INT32 GetLinePad () const
INT32 GetLineTrailBytes () const
double GetLinScale () const
bool GetNoCheckSpace () const
double GetNullValue () const
INT32 GetNumBands () const
INT32 GetNumBits () const
INT32 GetNumCols () const
INT32 GetNumLins () const
double GetScale () const
bool HasNull () const
ERRVALUE ImportGeneric (const FILEPATH &filepath)
void ScaleBuffer (void *buf)
void SetBandHdrBytes (INT32 value)
void SetBandNum (INT32 bandnum)
void SetBandTrailBytes (INT32 value)
void SetByteOrder (BYTEORDER value)
void SetCellType (RVC::IMAGE::CELLTYPE value)
void SetColScale (double value)
void SetDataOffset (double value)
void SetDataScale (double value)
void SetDataType (RVC::IMAGE::DATATYPE value)
void SetDoLink (bool value)
void SetFlip (FLIP value)
void SetHasNull (bool value)
void SetHeaderBytes (INT32 value)
void SetInitCol (INT32 value)
void SetInitLin (INT32 value)
void SetInterleaveFactor (INT32 value)
void SetInterleaveHdrBytes (INT32 value)
void SetInterleaveTrailerBytes (INT32 value)
void SetInterleaveType (MIEINTERLEAVE value)
void SetLastCol (INT32 value)
void SetLastLin (INT32 value)
void SetLineHdrBytes (INT32 value)
void SetLinePad (INT32 value)
void SetLineTrailBytes (INT32 value)
void SetLinScale (double value)
void SetNoCheckSpace (bool value)
void SetNullValue (double value)
void SetNumBands (INT32 value)
void SetNumBits (INT32 value)
void SetNumCols (INT32 value)
void SetNumLins (INT32 value)
void SetScale (double value)

Static Public Member Functions

static void CopyBits (const UINT8 *sbuf, int soff, UINT8 *dbuf, int doff, int len)
static void GetBandPIL (UINT8 *dbuf, const UINT8 *sbuf, int band, int outcols, int numbands, int InterleaveFactor, int numbits)
static ERRVALUE ImportGeorefArcWorld (SIMPLE_ARRAY< CTRLPOINT3 > &CtrlPoints, const FILEPATH &filepath, int rastlins, int rastcols)
static ERRVALUE ImportGeorefMapInfoTAB (SIMPLE_ARRAY< CTRLPOINT3 > &points, SPATREF::COORDREFSYS &crs, const FILEPATH &filepath)
static void SwapBytes (UINT8 *buf, int len, int numbits)

Protected Member Functions

virtual ERRVALUE v_ImportBegin (const RVC::OBJITEM &DestObj)
virtual ERRVALUE v_ImportEnd (RVC::OBJITEM &DestObj)

Private Member Functions

virtual ERRVALUE v_ImportGeneric (const FILEPATH &filepath)=0

Private Attributes

INT32 m_BandHdrBytes
INT32 m_BandNum
INT32 m_BandTrailBytes
bool m_bDoLink
bool m_bHasNullValue
bool m_bNoCheckSpace
BYTEORDER m_ByteOrder
RVC::IMAGE::CELLTYPE m_CellType
double m_ColScale
double m_DataOffset
double m_DataScale
RVC::IMAGE::DATATYPE m_DataType
FLIP m_flip
INT32 m_HeaderBytes
INT32 m_InitCol
INT32 m_InitLin
INT32 m_InterleaveFactor
INT32 m_InterleaveHdrBytes
INT32 m_InterleaveTrailBytes
MIEINTERLEAVE m_InterleaveType
INT32 m_LastCol
INT32 m_LastLin
INT32 m_LineHdrBytes
INT32 m_LinePad
INT32 m_LineTrailBytes
double m_LinScale
double m_NullValue
INT32 m_NumBands
INT32 m_NumBits
INT32 m_NumCols
INT32 m_NumLins
double m_scale

Member Enumeration Documentation

Enumerator:
FLIP_None 
FLIP_Vert 
FLIP_Horz 
FLIP_Both 

Interleave parameters.

Enumerator:
MIEINTERLEAVE_Line 
MIEINTERLEAVE_Band 
MIEINTERLEAVE_Pixel 

Constructor & Destructor Documentation

MIE::JOB_IMAGE::JOB_IMAGE ( const FORMAT format,
const SETTINGS settings 
)
virtual MIE::JOB_IMAGE::~JOB_IMAGE (  )  [virtual]

Member Function Documentation

static void MIE::JOB_IMAGE::CopyBits ( const UINT8 sbuf,
int  soff,
UINT8 dbuf,
int  doff,
int  len 
) [static]

Copy bits from one buffer to another.

Parameters:
sbuf Source buffer
soff Source offset (0-7)
dbuf Destination buffer
doff Destination offset (0-7)
len Number of bits to copy
INT32 MIE::JOB_IMAGE::GetBandHdrBytes (  )  const [inline]

Length of band header in bytes.

INT32 MIE::JOB_IMAGE::GetBandNum (  )  const [inline]

Get the number of the band number to which this job refers.

static void MIE::JOB_IMAGE::GetBandPIL ( UINT8 dbuf,
const UINT8 sbuf,
int  band,
int  outcols,
int  numbands,
int  InterleaveFactor,
int  numbits 
) [static]

Get a single band from a pixel-interleaved buffer.

Caller must allocate destination buffer.

Parameters:
numbands Number of interleaved bands
InterleaveFactor Interleave factor (often 1)
numbits Number of bits per band
void MIE::JOB_IMAGE::GetBandPIL ( UINT8 dbuf,
const UINT8 sbuf,
int  band,
int  outcols 
)

Get a single band from a pixel-interleaved buffer.

Caller must allocate destination buffer. Important: assumes *this contains correct interleave factor, number of bands, and bits per cell. If you are importing a PIL buffer containing a celltype not listed among the RVC::IMAGE::CELLTYPEs, chances are that you should use the static variant of this method instead.

INT32 MIE::JOB_IMAGE::GetBandTrailBytes (  )  const [inline]

Length of band trailer in bytes.

BYTEORDER MIE::JOB_IMAGE::GetByteOrder (  )  const [inline]

Byte/bit order (MIE::BYTEORDER_LowFirst or _HighFirst).

RVC::IMAGE::CELLTYPE MIE::JOB_IMAGE::GetCellType (  )  const [inline]
double MIE::JOB_IMAGE::GetColScale (  )  const [inline]
double MIE::JOB_IMAGE::GetDataOffset (  )  const [inline]

Value to set rastinfo.dataoffset to.

double MIE::JOB_IMAGE::GetDataScale (  )  const [inline]

Value to set rastinfo.datascale to.

RVC::IMAGE::DATATYPE MIE::JOB_IMAGE::GetDataType (  )  const [inline]

Data type.

bool MIE::JOB_IMAGE::GetDoLink (  )  const [inline]

Create links to rasters instead of importing.

FLIP MIE::JOB_IMAGE::GetFlip (  )  const [inline]
INT32 MIE::JOB_IMAGE::GetHeaderBytes (  )  const [inline]

Length of file header in bytes.

INT32 MIE::JOB_IMAGE::GetInitCol (  )  const [inline]

Initial column to read.

INT32 MIE::JOB_IMAGE::GetInitLin (  )  const [inline]

Initial line to read.

INT32 MIE::JOB_IMAGE::GetInterleaveFactor (  )  const [inline]

Interleave factor.

INT32 MIE::JOB_IMAGE::GetInterleaveHdrBytes (  )  const [inline]

Length of interleave header in bytes.

INT32 MIE::JOB_IMAGE::GetInterleaveTrailBytes (  )  const [inline]

Length of interleave trailer in bytes.

MIEINTERLEAVE MIE::JOB_IMAGE::GetInterleaveType (  )  const [inline]

Interleave type:.

INT32 MIE::JOB_IMAGE::GetLastCol (  )  const [inline]

Final column to read (assumes numcols-1 if 0).

INT32 MIE::JOB_IMAGE::GetLastLin (  )  const [inline]

Final line to read (assumes numlins-1 if 0).

INT32 MIE::JOB_IMAGE::GetLineHdrBytes (  )  const [inline]

Length of line header in bytes.

INT32 MIE::JOB_IMAGE::GetLinePad (  )  const [inline]

Line padding factor (lines must be multiple of this in length).

INT32 MIE::JOB_IMAGE::GetLineTrailBytes (  )  const [inline]

Length of line trailer in bytes.

double MIE::JOB_IMAGE::GetLinScale (  )  const [inline]
bool MIE::JOB_IMAGE::GetNoCheckSpace (  )  const [inline]

Don't check for sufficient space before import.

double MIE::JOB_IMAGE::GetNullValue (  )  const [inline]

Get the null value.

INT32 MIE::JOB_IMAGE::GetNumBands (  )  const [inline]

Number of bands in file.

INT32 MIE::JOB_IMAGE::GetNumBits (  )  const [inline]

Number of bits per raster cell.

INT32 MIE::JOB_IMAGE::GetNumCols (  )  const [inline]

Number of columns in raster.

INT32 MIE::JOB_IMAGE::GetNumLins (  )  const [inline]

Number of lines in raster.

double MIE::JOB_IMAGE::GetScale (  )  const [inline]

Scale data values by this factor This scale differs from the DataScale in that DataScale is stored in the raster header.

This scale is used to scale input data to

bool MIE::JOB_IMAGE::HasNull (  )  const [inline]

Has "null value" set.

ERRVALUE MIE::JOB_IMAGE::ImportGeneric ( const FILEPATH filepath  )  [inline]
static ERRVALUE MIE::JOB_IMAGE::ImportGeorefArcWorld ( SIMPLE_ARRAY< CTRLPOINT3 > &  CtrlPoints,
const FILEPATH filepath,
int  rastlins,
int  rastcols 
) [static]

Was _mieImportGeorefArcWorld.

Parameters:
CtrlPoints control points returned
filepath filepath to Arc World file
rastlins number of raster lines
rastcols number of raster columns
static ERRVALUE MIE::JOB_IMAGE::ImportGeorefMapInfoTAB ( SIMPLE_ARRAY< CTRLPOINT3 > &  points,
SPATREF::COORDREFSYS crs,
const FILEPATH filepath 
) [static]
Parameters:
points control points returned
crs CRS returned
filepath filepath to TAB file
void MIE::JOB_IMAGE::ScaleBuffer ( void *  buf  ) 

Multiply all values in a buffer by a scale value.

void MIE::JOB_IMAGE::SetBandHdrBytes ( INT32  value  )  [inline]

Length of band header in bytes.

void MIE::JOB_IMAGE::SetBandNum ( INT32  bandnum  )  [inline]

Sets the band number to which this job refers.

void MIE::JOB_IMAGE::SetBandTrailBytes ( INT32  value  )  [inline]

Length of band trailer in bytes.

void MIE::JOB_IMAGE::SetByteOrder ( BYTEORDER  value  )  [inline]

Byte/bit order (MIE::BYTEORDER_LowFirst or _HighFirst).

void MIE::JOB_IMAGE::SetCellType ( RVC::IMAGE::CELLTYPE  value  )  [inline]

Set the cell type.

void MIE::JOB_IMAGE::SetColScale ( double  value  )  [inline]
void MIE::JOB_IMAGE::SetDataOffset ( double  value  )  [inline]

Value to set rastinfo.dataoffset to.

void MIE::JOB_IMAGE::SetDataScale ( double  value  )  [inline]

Value to set rastinfo.datascale to.

void MIE::JOB_IMAGE::SetDataType ( RVC::IMAGE::DATATYPE  value  ) 

Data type.

void MIE::JOB_IMAGE::SetDoLink ( bool  value  )  [inline]

Create links to rasters instead of importing.

void MIE::JOB_IMAGE::SetFlip ( FLIP  value  )  [inline]
void MIE::JOB_IMAGE::SetHasNull ( bool  value  )  [inline]

Has "null value" set.

void MIE::JOB_IMAGE::SetHeaderBytes ( INT32  value  )  [inline]

Length of file header in bytes.

void MIE::JOB_IMAGE::SetInitCol ( INT32  value  )  [inline]

Initial column to read.

void MIE::JOB_IMAGE::SetInitLin ( INT32  value  )  [inline]

Initial line to read.

void MIE::JOB_IMAGE::SetInterleaveFactor ( INT32  value  )  [inline]

Interleave factor.

void MIE::JOB_IMAGE::SetInterleaveHdrBytes ( INT32  value  )  [inline]

Length of interleave header in bytes.

void MIE::JOB_IMAGE::SetInterleaveTrailerBytes ( INT32  value  )  [inline]

Length of interleave trailer in bytes.

void MIE::JOB_IMAGE::SetInterleaveType ( MIEINTERLEAVE  value  )  [inline]

Interleave type:.

void MIE::JOB_IMAGE::SetLastCol ( INT32  value  )  [inline]

Final column to read (assumes numcols-1 if 0).

void MIE::JOB_IMAGE::SetLastLin ( INT32  value  )  [inline]

Final line to read (assumes numlins-1 if 0).

void MIE::JOB_IMAGE::SetLineHdrBytes ( INT32  value  )  [inline]

Length of line header in bytes.

void MIE::JOB_IMAGE::SetLinePad ( INT32  value  )  [inline]

Line padding factor (lines must be multiple of this in length).

void MIE::JOB_IMAGE::SetLineTrailBytes ( INT32  value  )  [inline]

Length of line trailer in bytes.

void MIE::JOB_IMAGE::SetLinScale ( double  value  )  [inline]
void MIE::JOB_IMAGE::SetNoCheckSpace ( bool  value  )  [inline]

Don't check for sufficient space before import.

void MIE::JOB_IMAGE::SetNullValue ( double  value  )  [inline]

Null value.

void MIE::JOB_IMAGE::SetNumBands ( INT32  value  )  [inline]

Number of bands in file.

void MIE::JOB_IMAGE::SetNumBits ( INT32  value  ) 

Number of bits per raster cell.

void MIE::JOB_IMAGE::SetNumCols ( INT32  value  )  [inline]

Number of columns in raster.

void MIE::JOB_IMAGE::SetNumLins ( INT32  value  )  [inline]

Number of lines in raster.

void MIE::JOB_IMAGE::SetScale ( double  value  )  [inline]

Scale data values by this factor This scale differs from the DataScale in that DataScale is stored in the raster header.

This scale is used to scale input data to the data range we wish to write into the output raster.

static void MIE::JOB_IMAGE::SwapBytes ( UINT8 buf,
int  len,
int  numbits 
) [static]

Swap bytes in words or longs in a buffer.

virtual ERRVALUE MIE::JOB_IMAGE::v_ImportBegin ( const RVC::OBJITEM DestObj  )  [protected, virtual]

Begin import.

Note, If v_ImportNeedTempFile returns true, then the OBJITEM passed will point to the temp file. Derived class should call base class implementation before doing any of its own implementation

Reimplemented from MIE::JOB_GEOSPATIAL.

Reimplemented in MIE::JOB_HYPERSPECTRAL, and MIE::JOB_RASTER.

virtual ERRVALUE MIE::JOB_IMAGE::v_ImportEnd ( RVC::OBJITEM DestObj  )  [protected, virtual]

Finish the import.

Note, do not assume that v_ImportBegin was called or that anything else has been done to the job instance. In the case of importing as one object type and then converting to another, the v_ImportEnd will do the copy, then allocate a JOB for the destination and just call its v_ImportEnd. This allows importing to CAD, converting to vector, and then calling vector's v_ImportEnd to optimize or create standard attribute tables. (although CAD's ExtractToVector should optimize for us?) Derived class should call base class implementation after doing its own cleanup

Reimplemented from MIE::JOB_GEOSPATIAL.

Reimplemented in MIE::JOB_HYPERSPECTRAL, and MIE::JOB_RASTER.

virtual ERRVALUE MIE::JOB_IMAGE::v_ImportGeneric ( const FILEPATH filepath  )  [private, pure virtual]

Member Data Documentation

Length of band header in bytes.

Index of band to which this job refers.

Length of band trailer in bytes.

bool MIE::JOB_IMAGE::m_bDoLink [private]

Create links to rasters instead of importing.

Has "null value" set.

Don't check for sufficient space before import.

Byte/bit order (MIE::BYTEORDER_LowFirst or _HighFirst).

double MIE::JOB_IMAGE::m_ColScale [private]
double MIE::JOB_IMAGE::m_DataOffset [private]

Value to set rastinfo.dataoffset to.

double MIE::JOB_IMAGE::m_DataScale [private]

Value to set rastinfo.datascale to.

Data type.

Length of file header in bytes.

Initial column to read.

Initial line to read.

Interleave factor.

Length of interleave header in bytes.

Length of interleave trailer in bytes.

Interleave type:.

Final column to read (assumes numcols-1 if 0).

Final line to read (assumes numlins-1 if 0).

Length of line header in bytes.

Line padding factor (lines must be multiple of this in length).

Length of line trailer in bytes.

double MIE::JOB_IMAGE::m_LinScale [private]
double MIE::JOB_IMAGE::m_NullValue [private]

Null value for raster.

Number of bands in file.

Number of bits per raster cell.

Number of columns in raster.

Number of lines in raster.

double MIE::JOB_IMAGE::m_scale [private]

Scale data values by this factor.


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

Generated on Sun Oct 7 21:36:33 2012 for TNTsdk 2012 by  doxygen 1.6.1