USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::CameraFactory Class Reference

#include <CameraFactory.h>

List of all members.


Detailed Description

Initializes a Camera Model.

This factory class is used to obtain a Camera Model object given a PVL which contains a valid Instrument group. The Instrument group can come from an image/cube or a hand-created PVL file. The camera is loaded based on information using the SpacecraftName and IntrumentID contained in the Instrument group. It is plugin oriented. That is, this class looks in $ISISROOT/lib/Camera.plugin to convert the SpacecraftName and IntrumentID string into a pointer to the appropriate camera class (e.g., Viking, HiRISE, etc.). This allows programmers who develop new camera models to create a plugin without the need for recompiling all the Isis applications that use camera models.

Author:
2005-05-10 Elizabeth Ribelin

For internal use only.

History:
2005-10-06 Elizabeth Miller - added unitTest.exclude file
History:
2006-05-17 Elizabeth Miller - changed CameraManager.plugin to Camera.plugin
History:
2009-05-12 Steven Lambright - Added CameraVersion(...) and version checking.

Definition at line 56 of file CameraFactory.h.

Static Public Member Functions

static CameraCreate (Pvl &pvl)
 Creates a Camera object using Pvl Specifications.
static int CameraVersion (Pvl &pvl)
 This looks up the current camera model version from the cube labels.

Private Member Functions

 CameraFactory ()
 Constructor (Its private, so you cannot use it.
 ~CameraFactory ()
 Destroys the CameraFactory object.


Constructor & Destructor Documentation

Isis::CameraFactory::CameraFactory (  )  [inline, private]

Constructor (Its private, so you cannot use it.

Use the Create method instead

Definition at line 66 of file CameraFactory.h.

Isis::CameraFactory::~CameraFactory (  )  [inline, private]

Destroys the CameraFactory object.

Definition at line 69 of file CameraFactory.h.


Member Function Documentation

int Isis::CameraFactory::CameraVersion ( Pvl lab  )  [static]

This looks up the current camera model version from the cube labels.

Parameters:
lab Input Cube Labels
Returns:
int Latest Camera Version

Definition at line 109 of file CameraFactory.cpp.

References _FILEINFO_, e, Isis::Filename::Exists(), Isis::Filename::Expanded(), Isis::PvlObject::FindGroup(), Isis::PvlContainer::HasKeyword(), Isis::iException::Message(), Isis::Pvl::Read(), Isis::iString::Remove(), Isis::PvlObject::Traverse, and Isis::iString::UpCase().

Referenced by Create().

Camera * Isis::CameraFactory::Create ( Isis::Pvl lab  )  [static]

Creates a Camera object using Pvl Specifications.

Parameters:
lab Pvl label containing specifications for the Camera object
Returns:
Camera* The Camera object created
Exceptions:
Isis::iException::System - Unsupported camera model, unable to find the plugin
Isis::iException::Camera - Unable to initialize camera model

Definition at line 42 of file CameraFactory.cpp.

References _FILEINFO_, Isis::PvlContainer::AddKeyword(), CameraVersion(), e, Isis::PvlObject::FindGroup(), Isis::Plugin::GetPlugin(), Isis::PvlContainer::HasKeyword(), Isis::iException::Message(), Isis::Pvl::Read(), Isis::iString::Remove(), Isis::PvlObject::Traverse, and Isis::iString::UpCase().

Referenced by Isis::UniversalGroundMap::Init(), and Isis::ControlNet::SetImages().


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