USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::CameraFactory Class Reference

Initializes a Camera Model. More...

#include <CameraFactory.h>

Collaboration diagram for Isis::CameraFactory:
Collaboration graph

Static Public Member Functions

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

Private Member Functions

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

Static Private Member Functions

static void initPlugin ()
 

Static Private Attributes

static Plugin m_cameraPlugin
 

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
History:

2005-10-06 Elizabeth Miller - added unitTest.exclude file

2006-05-17 Elizabeth Miller - changed CameraManager.plugin to Camera.plugin

2009-05-12 Steven Lambright - Added CameraVersion(...) and version checking.

2011-05-23 Jannet Barrett and Steven Lambright - Added m_cameraPlugin to reduce cost of instantiating Cameras.

2012-09-06 Steven Lambright - Changed Create() to take Cube instead of Pvl because cameras now require cubes to construct. Please see Camera for more information.

Definition at line 62 of file CameraFactory.h.

Constructor & Destructor Documentation

Isis::CameraFactory::CameraFactory ( )
inlineprivate

Constructor (Its private, so you cannot use it.

Use the Create method instead

Definition at line 75 of file CameraFactory.h.

Isis::CameraFactory::~CameraFactory ( )
inlineprivate

Destroys the CameraFactory object.

Definition at line 78 of file CameraFactory.h.

Member Function Documentation

int Isis::CameraFactory::CameraVersion ( Cube cube)
static

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

Parameters
labInput Cube Labels
Returns
int Latest Camera Version

Definition at line 125 of file CameraFactory.cpp.

References Isis::Cube::label().

Referenced by Isis::KernelDb::findAll().

Camera * Isis::CameraFactory::Create ( Cube cube)
static

Creates a Camera object using Pvl Specifications.

Parameters
labPvl 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 46 of file CameraFactory.cpp.

References _FILEINFO_, Isis::PvlContainer::addKeyword(), Isis::PvlObject::findGroup(), Isis::PvlContainer::hasKeyword(), Isis::Cube::label(), and Isis::PvlObject::Traverse.

Referenced by Isis::ControlNetFilter::CubeDistanceFilter(), Isis::QnetTool::openGround(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), and Isis::UniversalGroundMap::UniversalGroundMap().


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