visageSDK
Instance Methods | Class Methods | List of all members
FDP Class Reference

Objective-C wrapper of the VisageSDK::FDP class. More...

#import <objc_FDP.h>

Inherits NSObject, and <NSCopying>.

Instance Methods

(FDP *) - initWithNativeFDP:
 Copy constructor. More...
 
(FDP *) - initWithFilename:
 Constructor. More...
 
(id) - copyWithZone:
 Copy operator. More...
 
(int) - readFromFile:
 Read from an FDP file. More...
 
(void) - createNewFile:
 Create a new (empty) FDP file. More...
 
(void) - saveToFile:
 Write feature point definitions to the FDP file, changing the FDP file name. More...
 
(void) - saveToFile
 Write feature point definitions to the current FDP file. More...
 
(FeaturePoint *) - getFP:withIndex:
 Get a feature point by its group and index. More...
 
(FeaturePoint *) - getFP:
 Get a feature point by its name. More...
 
(void) - setFP:withIndex:withFeaturePoint:
 Set a feature specified by its group and index. More...
 
(void) - setFP:withFeaturePoint:
 Set a feature specified by its name. More...
 
(const float *) - getFPPos:withIndex:
 Get the position of a feature point specified by its group and index. More...
 
(const float *) - getFPPos:
 Get the position of a feature point specified by its name. More...
 
(float) - getFPQuality:withIndex:
 Get the quality of a feature point specified by its group and index. More...
 
(float) - getFPQuality:
 Get the quality of a feature point specified by its name. More...
 
(void) - setFPQuality:withIndex:withQuality:
 Set the quality of a feature point specified by its group and index. More...
 
(void) - setFPQuality:withQuality:
 Set the position of a feature point specified by its name. More...
 
(void) - setFPPos:withIndex:withPos:
 Set the position of a feature point specified by its group and index. More...
 
(void) - setFPPos:withPos:
 Set the position of a feature point specified by its name. More...
 
(void) - setFPPos:withIndex:withX:withY:withZ:
 Set the position of a feature point specified by its group and index. More...
 
(void) - setFPPos:withX:withY:withZ:
 Set the position of a feature point specified by its name. More...
 
(bool) - getFPSurfVert:withIndex:withSurface:withVertex:
 Get the mesh and vertex mapping for a feature point specified by its group and index. More...
 
(bool) - getFPSurfVert:withSurface:withVertex:
 Get the mesh and vertex mapping for a feature point specified by its name. More...
 
(void) - setFPSurfVert:withIndex:withSurface:withVertex:
 Assign a feature point, specified by its group and index, to a specific vertex. More...
 
(void) - setFPSurfVert:withSurface:withVertex:
 Assign a feature point, specified by its name, to a specific vertex. More...
 
(void) - reset
 Resets all feature points. More...
 
(bool) - FPIsDefined:withIndex:
 Returns true if the feature point is defined. More...
 
(bool) - FPIsDefined:
 Returns true if the feature point is defined. More...
 
(bool) - FPIsDetected:withIndex:
 Returns true if the feature point is detected. More...
 
(bool) - FPIsDetected:
 Returns true if the feature point is detected. More...
 

Class Methods

(void) + parseFPName:withGroup:withIndex:
 Get feature point group and index from its name. More...
 
(NSString *) + getFPName:withIndex:
 Get feature point name from group and index. More...
 
(bool) + FPIsValid:withIndex:
 Returns true if specified feature point identifier is valid. More...
 
(bool) + FPIsValid:
 Returns true if specified feature point identifier is valid. More...
 
(int) + groupSize:
 Get the size of the specified feature point group. More...
 
(int) + getMirrorPointIndex:withIndex:
 Get the mirror point index for the point defined by given group and index. More...
 

Detailed Description

Objective-C wrapper of the VisageSDK::FDP class.

Definition at line 21 of file objc_FDP.h.

Method Documentation

◆ copyWithZone:()

- (id) copyWithZone: (NSZone *)  zone

Copy operator.

Parameters
zoneZone.

◆ createNewFile:()

- (void) createNewFile: (NSString *)  name

Create a new (empty) FDP file.

Parameters
nameFilename.

◆ FPIsDefined:()

- (bool) FPIsDefined: (NSString *)  name

Returns true if the feature point is defined.

For more information see FeaturePoint::defined.

Parameters
nameFeature point name (e.g. "7.1").
Returns
True if the feature point is defined, false otherwise.

◆ FPIsDefined:withIndex:()

- (bool) FPIsDefined: (int)  group
withIndex: (int)  n 

Returns true if the feature point is defined.

For more information see FeaturePoint::defined.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
True if the feature point is defined, false otherwise.

◆ FPIsDetected:()

- (bool) FPIsDetected: (NSString *)  name

Returns true if the feature point is detected.

For more information see FeaturePoint::detected.

Parameters
nameFeature point name (e.g. "7.1").
Returns
True if the feature point is detected, false otherwise.

◆ FPIsDetected:withIndex:()

- (bool) FPIsDetected: (int)  group
withIndex: (int)  n 

Returns true if the feature point is detected.

For more information see FeaturePoint::detected.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
True if the feature point is detected, false otherwise.

◆ FPIsValid:()

+ (bool) FPIsValid: (NSString *)  name

Returns true if specified feature point identifier is valid.

Identifier i.e. feature point name is valid if it consists of feature point group and feature point index within valid ranges and is of the correct format. Valid range for feature point group is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX. Valid range for feature point index is from 1 to the size of particular group.

Parameters
nameFeature point name (e.g. "7.1").
Returns
True if specified feature point identifier is valid, false otherwise.

◆ FPIsValid:withIndex:()

+ (bool) FPIsValid: (int)  group
withIndex: (int)  n 

Returns true if specified feature point identifier is valid.

Identifier is valid if it consists of feature point group and feature point index within valid ranges.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
True if specified feature point identifier is valid, false otherwise.

◆ getFP:()

- (FeaturePoint *) getFP: (NSString *)  name

Get a feature point by its name.

Parameters
nameFeature point name (e.g. "7.1").
Returns
Feature point.

◆ getFP:withIndex:()

- (FeaturePoint *) getFP: (int)  group
withIndex: (int)  n 

Get a feature point by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
Feature point.

◆ getFPName:withIndex:()

+ (NSString *) getFPName: (int)  group
withIndex: (int)  n 

Get feature point name from group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
Feature point name.

◆ getFPPos:()

- (const float *) getFPPos: (NSString *)  name

Get the position of a feature point specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
Returns
Vertex position (array of 3 floating point numbers).

◆ getFPPos:withIndex:()

- (const float *) getFPPos: (int)  group
withIndex: (int)  n 

Get the position of a feature point specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
Vertex position (array of 3 floating point numbers).

◆ getFPQuality:()

- (float) getFPQuality: (NSString *)  name

Get the quality of a feature point specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
Returns
quality value.

◆ getFPQuality:withIndex:()

- (float) getFPQuality: (int)  group
withIndex: (int)  n 

Get the quality of a feature point specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
quality value.

◆ getFPSurfVert:withIndex:withSurface:withVertex:()

- (bool) getFPSurfVert: (int)  group
withIndex: (int)  n
withSurface: (NSString *)  surf
withVertex: (int)  vert 

Get the mesh and vertex mapping for a feature point specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
surfReturned mesh identifier.
vertReturned vertex index.
Returns
True if feature point is defined, false if not.

◆ getFPSurfVert:withSurface:withVertex:()

- (bool) getFPSurfVert: (NSString *)  name
withSurface: (NSString *)  surf
withVertex: (int)  vert 

Get the mesh and vertex mapping for a feature point specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
surfReturned mesh identifier.
vertReturned vertex index.
Returns
True if feature point is defined, false if not.

◆ getMirrorPointIndex:withIndex:()

+ (int) getMirrorPointIndex: (int)  group
withIndex: (int)  n 

Get the mirror point index for the point defined by given group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
Returns
Index of the mirror point (group is the same).

◆ groupSize:()

+ (int) groupSize: (int)  group

Get the size of the specified feature point group.

Valid range for group is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
Returns
Size of the specified feature point group.

◆ initWithFilename:()

- (FDP *) initWithFilename: (NSString *)  name

Constructor.

Parameters
nameFDP file.

◆ initWithNativeFDP:()

- (FDP *) initWithNativeFDP: (void *)  nativeFDP

Copy constructor.

Makes a copy of native FDP object.

◆ parseFPName:withGroup:withIndex:()

+ (void) parseFPName: (NSString *)  name
withGroup: (int)  group
withIndex: (int)  n 

Get feature point group and index from its name.

Parameters
nameFeature point name (e.g. "7.1").
groupReturned feature point group.
nReturned feature point index.

◆ readFromFile:()

- (int) readFromFile: (NSString *)  name

Read from an FDP file.

The FDP file format consists of one line of text for each feature point, in the following format: (group).(index) (x) (y) (z) (mesh_index).(vertex_index)

Parameters
nameFilename.
Returns
0 - failure, 1 - success, -1 - old version, needs reindexing.

◆ reset()

- (void) reset

Resets all feature points.

The value of all feature points is set to "undefined".

◆ saveToFile()

- (void) saveToFile

Write feature point definitions to the current FDP file.

File name is the one currently used.

◆ saveToFile:()

- (void) saveToFile: (NSString *)  name

Write feature point definitions to the FDP file, changing the FDP file name.

Parameters
nameFilename.

◆ setFP:withFeaturePoint:()

- (void) setFP: (NSString *)  name
withFeaturePoint: (FeaturePoint *)  f 

Set a feature specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
fThe feature point to set.

◆ setFP:withIndex:withFeaturePoint:()

- (void) setFP: (int)  group
withIndex: (int)  n
withFeaturePoint: (FeaturePoint *)  f 

Set a feature specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
fThe feature point to set.

◆ setFPPos:withIndex:withPos:()

- (void) setFPPos: (int)  group
withIndex: (int)  n
withPos: (NSArray *)  pos 

Set the position of a feature point specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
posVertex position (array of 3 floating point values).

◆ setFPPos:withIndex:withX:withY:withZ:()

- (void) setFPPos: (int)  group
withIndex: (int)  n
withX: (float)  x
withY: (float)  y
withZ: (float)  z 

Set the position of a feature point specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
xVertex x position.
yVertex y position.
zVertex z position.

◆ setFPPos:withPos:()

- (void) setFPPos: (NSString *)  name
withPos: (NSArray *)  pos 

Set the position of a feature point specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
posVertex position (array of 3 floating point values).

◆ setFPPos:withX:withY:withZ:()

- (void) setFPPos: (NSString *)  name
withX: (float)  x
withY: (float)  y
withZ: (float)  z 

Set the position of a feature point specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
xVertex x position.
yVertex y position.
zVertex z position.

◆ setFPQuality:withIndex:withQuality:()

- (void) setFPQuality: (int)  group
withIndex: (int)  n
withQuality: (float)  quality 

Set the quality of a feature point specified by its group and index.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
qualityquality value.

◆ setFPQuality:withQuality:()

- (void) setFPQuality: (NSString *)  name
withQuality: (float)  quality 

Set the position of a feature point specified by its name.

Parameters
nameFeature point name (e.g. "7.1").
qualityquality value.

◆ setFPSurfVert:withIndex:withSurface:withVertex:()

- (void) setFPSurfVert: (int)  group
withIndex: (int)  n
withSurface: (NSString *)  surf
withVertex: (int)  vert 

Assign a feature point, specified by its group and index, to a specific vertex.

Parameters
groupFeature point group. Valid range is from FDP_FP_START_GROUP_INDEX to FDP_FP_END_GROUP_INDEX.
nFeature point index. Valid range is from 1 to the size of particular group. Group sizes can be obtained using groupSize().
surfMesh id.
vertVertex index.

◆ setFPSurfVert:withSurface:withVertex:()

- (void) setFPSurfVert: (NSString *)  name
withSurface: (NSString *)  surf
withVertex: (int)  vert 

Assign a feature point, specified by its name, to a specific vertex.

Parameters
nameFeature point name (e.g. "7.1").
surfMesh id.
vertVertex index.

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