Function prototypes
// =================================================================
// Return number of currently attached raster references.
// =================================================================
int FnPhotoCount( void)
// =================================================================
// Return information about reference raster with index Ind.
// Valid indexes are 0,1,2,...FnPhotoRefCnt()-1.
//
// P Pointer to structure to fill.
// Ind Index of raster reference to query.
//
// Return 1 on success.
// Return 0 if invalid index.
// =================================================================
int FnPhotoGet( PhoRef *P, int Ind) ;
// =================================================================
// Find reference raster which has file name Name.
//
// Name Full path of raster file to search.
//
// Return index (0,1,2,...) on success.
// Return -1 if not found.
// =================================================================
int FnPhotoFindName( char *Name) ;
// =================================================================
// Find first reference raster which covers point X,Y.
// If (View >= 0) and (View <= 7), search only rasters which
// are on for that view. If View is outside those limits,
// search all attached raster references.
//
// X X position
// Y Y position
// View Search view or -1 for any view.
//
// Return index (0,1,2,...) on success.
// Return -1 if not found.
// =================================================================
int FnPhotoFindPos( double X, double Y, int View) ;
// =================================================================
// Attach raster file Name as reference. Raster file must be
// contain georeferencing (ECW, GeoTIFF, TIFF+TFW, ...).
//
// Name Full path of raster file to attach.
// Update If non zero, update affected views.
//
// Return index (0,1,2,...) of attached file on success.
// Return -1 if failed.
// =================================================================
int FnPhotoAttach( char *Name, int Update) ;
// =================================================================
// Attach raster file Name as reference setting position explicitly.
// Any georeferencing in raster file is ignored.
//
// Name Full path of raster file to attach.
// OrgX Lower left corner X coordinate.
// OrgY Lower left corner Y coordinate.
// PixW Width of each pixel.
// PixH Height of each pixel.
// Update If non zero, update affected views.
//
// Return index (0,1,2,...) of attached file on success.
// Return -1 if failed.
// =================================================================
int FnPhotoAttachPos( char *Name, double OrgX, double OrgY,
double PixW, double PixH, int Update) ;
// =================================================================
// Detach raster reference with index Ind.
//
// Ind Index of raster. If Ind == -1, detach all.
// Update If non zero, update affected views.
//
// Return 1 on success.
// Return 0 if Ind is invalid or nothing to detach.
// =================================================================
int FnPhotoDetach( int Ind, int Update) ;
// =================================================================
// Set view visibility of raster reference with index Ind.
//
// Ind Index of raster.
// View View (0-7, -1=all views) to switch on or off.
// On If non zero, set on. If zero, set off.
// Update If non zero, update affected views.
//
// Return 1 on success.
// Return 0 if invalid parameters.
// =================================================================
int FnPhotoSetView( int Ind, int View, int On, int Update) ;
// =================================================================
// Open mission file Name.
//
// If Action is true, read mission always.
// If Action == 0, read mission if it is not active already.
//
// Return 2 if mission was opened.
// Return 1 if mission was already active (Action == 0).
// Return 0 if could not read mission.
// =================================================================
int FnPhotoOpenMission( char *Name, int Action) ;
// =================================================================
// Reference points of class Class from TerraScan as ground model.
//
// Return number of points referenced.
// =================================================================
int FnPhotoReferClass( int Class) ;
// =================================================================
// Open image list file Name.
//
// If Action is true, read list always.
// If Action == 0, read list if it is not active already.
//
// Return 2 if list was opened.
// Return 1 if list was already active (Action == 0).
// Return 0 if could not read list.
// =================================================================
int FnPhotoOpenList( char *Name, int Action) ;
// =================================================================
// How many images are in the image list?
//
// Return number of images.
// Return 0 if no images or no mission.
// =================================================================
int FnPhotoListSize( void) ;
// =================================================================
// Fill table Tbl[] of camera definitions for active mission.
// MaxCnt is the number of definitions calling application has
// allocated Tbl to hold.
//
// Return number of cameras in mission.
// Return 0 if no mission or no cameras.
// =================================================================
int FnPhotoCameraList( PhoCam *Tbl, int MaxCnt) ;
// =================================================================
// Find image which best sees points Vrt[].
//
// Cam camera index 0,1,2,... (-1 for any)
//
// Return image number on success.
// Return 0 if no image sees the location.
// =================================================================
int FnPhotoCamBest( Dp3d *Vrt, int Vct, int Cam) ;
// =================================================================
// Create camera view View using image which best sees points Vrt[].
// Open view if it is not open already.
// Zoom window to show area Vrt[].
//
// Return image number on success.
// Return 0 if no image sees the location.
// =================================================================
int FnPhotoCamView( int View, Dp3d *Vrt, int Vct) ;
// =================================================================
// Create camera view View using image number Nbr.
// Open view if it is not open already.
// Zoom window to show area Vrt[].
//
// Return 1 on success.
// Return 0 if no image with number Nbr or failed.
// =================================================================
int FnPhotoCamViewNbr( int View, int Nbr, Dp3d *Vrt, int Vct) ;
// =================================================================
// Create camera view View using image number Nbr using rotation
// so that Dir vector is y axis on screen.
//
// Open view if it is not open already.
// Zoom window to show area Vrt[].
//
// Return 1 on success.
// Return 0 if no image with number Nbr or failed.
// =================================================================
int FnPhotoCamViewDir( int View, int Nbr, Dp3d *Vrt, int Vct, Dp3d *Dir) ;
// =================================================================
// Create a sorted list of images which see vertices Vrt[].
//
// If CamInd < 0, use any camera.
// If CamInd >= 0, use only images from that camera.
//
// Return number of images in Tbl[].
// =================================================================
int FnPhotoCamImages( PhoCim *Tbl, int Max, Dp3d *Vrt, int Vct, int CamInd) ;
// =================================================================
// Create camera view View using image which gives the best
// oblique view to points Vrt[].
//
// Dir specifies an xy direction vector.
// If Side < 0, find image looking in direction of vector.
// If Side > 0, find image looking opposite to vector direction.
//
// If CamInd < 0, use any camera.
// If CamInd >= 0, use only images from that camera.
//
// Return image number.
// Return 0 if no image found.
// =================================================================
int FnPhotoObliqueView( int View, Dp3d *Vrt, int Vct, Dp3d *Dir, int Side, int Cam) ;
// =================================================================
// Compute average color for planar shape Vrt[]. Use image which
// sees the shape best.
//
// Return number of pixels used on success.
// Return 0 if no image sees the location.
// =================================================================
int FnPhotoShapeClr( RgbClr *Clr, Dp3d *Vrt, int Vct) ;
// =================================================================
// Retrieve color values for marked laser points Tbl[] from open
// ortho images.
//
// Note that this routine changes Flag values of laser points.
//
// Return number of colors retrieved.
// =================================================================
int FnPhotoColorOrtho( RgbClr *Clr, BYTE *Flg, Point3d *Pnt, BYTE *Mrk, int Cnt,
int Mark, double Foot) ;
// =================================================================
// Retrieve color values for marked laser points Tbl[] from raw
// images of the active image list.
//
// Return number of colors retrieved.
// Return -1 if failed (out of memory).
// Return -2 if no mission.
// Return -3 if no image list.
// =================================================================
int FnPhotoColorRaw( RgbClr *Clr, Point3d *Pnt, BYTE *Mrk, double *Dbl, int Cnt,
int Mark, int Use, double Foot) ;