Isis Developer Reference
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.
 
static int CameraVersion (Pvl &lab)
 Looks up the current camera model version in the pvl labels.
 
static void initPlugin ()
 Reads the appropriate plugin file for the ISIS cameras, and scans the directories specified in IsisPreferences for CSM cameras.
 

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

Member Function Documentation

◆ CameraVersion() [1/2]

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

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

Parameters
cubeInput cube
Returns
int Latest Camera Version

References CameraVersion(), and Isis::Cube::label().

Referenced by CameraVersion(), Create(), and Isis::KernelDb::findAll().

◆ CameraVersion() [2/2]

int Isis::CameraFactory::CameraVersion ( Pvl & lab)
static

Looks up the current camera model version in the pvl labels.

Parameters
labThe pvl labels
Returns
The current camera model version

References _FILEINFO_, initPlugin(), Isis::IException::Programmer, Isis::PvlObject::Traverse, and Isis::IException::Unknown.

◆ Create()

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

Creates a Camera object using Pvl Specifications.

Parameters
cubeThe original cube with the current version camera model
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

References _FILEINFO_, Isis::PvlContainer::addKeyword(), CameraVersion(), Isis::Cube::hasBlob(), initPlugin(), Isis::Cube::label(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.

Referenced by Isis::Cube::camera(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::LidarData::SetImages(), Isis::ControlNet::SetImages(), and Isis::UniversalGroundMap::UniversalGroundMap().

◆ initPlugin()

void Isis::CameraFactory::initPlugin ( )
static

Reads the appropriate plugin file for the ISIS cameras, and scans the directories specified in IsisPreferences for CSM cameras.

References Isis::Preference::Preferences(), and Isis::PvlObject::Traverse.

Referenced by CameraVersion(), and Create().


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