Inherits from NSObject
Conforms to GridCellViewDataProvider
NSCoding
Declared in ARAugmentedPhoto.h
ARAugmentedPhoto.m

Tasks

  • – initWithImage:

    Initializes a new ARAugmentedPhoto ready for processing.

  • – initWithImageFile:andPMFile:

    Initializes a new ARAugmentedPhoto that has already been processed and saved to disk elsewhere as two separate files.

  • – process

    Begins the processing procedue by uploading the photo to the server, creating a new work task, and setting up a timer to periodically check for results. This method returns immediately but the process of augmenting an image is asynchrnous. To listen for results, implement an NSNotificationCenter observer for the NOTIF_AUGMENTED_PHOTO_UPDATED notification with the ARAugmentedPhoto instance as the notification object.

  • – processJSONData:

    Processes the JSON response from the server into overlays.

  • – processPMData:

    Processes the .pm data received from the server or loaded from a file into overlays.

Instance Methods

initWithImage:

Initializes a new ARAugmentedPhoto ready for processing.

- (id)initWithImage:(UIImage *)i

Parameters

i
  • The UIImage that should be augmented.

Return Value

A newly initialized ARAugmentedPhoto instance

Discussion

Initializes a new ARAugmentedPhoto ready for processing.

This method should not be called directly. Use methods in the ARManager or ARSite classes to create new ARAugmentedPhotos.

Declared In

ARAugmentedPhoto.h

initWithImageFile:andPMFile:

Initializes a new ARAugmentedPhoto that has already been processed and saved to disk elsewhere as two separate files.

- (id)initWithImageFile:(NSString *)iPath andPMFile:(NSString *)pmPath

Parameters

iPath

The path to the image file

pmPath

The path to the file containing information about overlays and camera perspective written in the .pm file format.

Return Value

A newly initialized ARAugmentedPhoto instance

Discussion

Initializes a new ARAugmentedPhoto that has already been processed and saved to disk elsewhere as two separate files.

Declared In

ARAugmentedPhoto.h

process

Begins the processing procedue by uploading the photo to the server, creating a new work task, and setting up a timer to periodically check for results. This method returns immediately but the process of augmenting an image is asynchrnous. To listen for results, implement an NSNotificationCenter observer for the NOTIF_AUGMENTED_PHOTO_UPDATED notification with the ARAugmentedPhoto instance as the notification object.

- (void)process

Discussion

Begins the processing procedue by uploading the photo to the server, creating a new work task, and setting up a timer to periodically check for results. This method returns immediately but the process of augmenting an image is asynchrnous. To listen for results, implement an NSNotificationCenter observer for the NOTIF_AUGMENTED_PHOTO_UPDATED notification with the ARAugmentedPhoto instance as the notification object.

Declared In

ARAugmentedPhoto.h

processJSONData:

Processes the JSON response from the server into overlays.

- (void)processJSONData:(NSDictionary *)data

Parameters

data

The JSON dictionary that you would like to process to populate the overlays array.

Discussion

Processes the JSON response from the server into overlays.

Declared In

ARAugmentedPhoto.h

processPMData:

Processes the .pm data received from the server or loaded from a file into overlays.

- (void)processPMData:(NSString *)data

Parameters

data

The string data that you would like to process to populate the overlays array.

Discussion

Processes the .pm data received from the server or loaded from a file into overlays.

This format is deprecated.

This function may be called directly if you are loading .pm files from disk, but you should consider using the initWithImageFile:andPMFile: method instead.

Declared In

ARAugmentedPhoto.h