Initializes a Camera Model. More...
#include <CameraFactory.h>

Static Public Member Functions | |
| static Camera * | Create (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. | |
| static csm::Model * | constructModelFromIsd (QString isdFilePath, QString pluginName="", QString modelName="", QString isdFormat="") |
| Constructs CSM Model from ISD. | |
| static QStringList | getModelSpecFromIsd (QString isdFilePath, QString pluginName="", QString modelName="") |
| Generate CSM Model specs from ISD. | |
Private Member Functions | |
| CameraFactory () | |
| Constructor (Its private, so you cannot use it. | |
| ~CameraFactory () | |
| Destroys the CameraFactory object. | |
Static Private Attributes | |
| static Plugin | m_cameraPlugin |
| The plugin file for the camera. | |
| static bool | m_initialized = false |
| Has the plugin list been initialized. | |
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.
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.
2017-7-11 Summer Stapleton - Added functionality to find the most recent (last) version of the camera model
2017-08-30 Summer Stapleton - Updated documentation. References #4807.
2021-02-17 Kristin Berry and Stuart Sides - added static plugins initialized variable and made initPlugin plublic.
Definition at line 53 of file CameraFactory.h.
|
inlineprivate |
Constructor (Its private, so you cannot use it.
Use the Create method instead
Definition at line 67 of file CameraFactory.h.
|
inlineprivate |
Destroys the CameraFactory object.
Definition at line 70 of file CameraFactory.h.
|
static |
This looks up the current camera model version from the cube.
| cube | Input cube |
Definition at line 164 of file CameraFactory.cpp.
References CameraVersion(), and Isis::Cube::label().
Referenced by CameraVersion(), Create(), and Isis::KernelDb::findAll().
|
static |
Looks up the current camera model version in the pvl labels.
| lab | The pvl labels |
Definition at line 176 of file CameraFactory.cpp.
References initPlugin(), and m_cameraPlugin.
|
static |
Constructs CSM Model from ISD.
| isdFilePath | Path to ISD file |
| pluginName | Plugin name |
| modelName | Model name |
| isdFormat | ISD format type (e.g., NITF) |
Definition at line 236 of file CameraFactory.cpp.
References getModelSpecFromIsd().
Creates a Camera object using Pvl Specifications.
| cube | The original cube with the current version camera model |
| Isis::iException::System | - Unsupported camera model, unable to find the plugin |
| Isis::iException::Camera | - Unable to initialize camera model |
Definition at line 48 of file CameraFactory.cpp.
References CameraVersion(), Isis::Cube::hasBlob(), initPlugin(), Isis::Cube::label(), and m_cameraPlugin.
Referenced by Isis::Cube::camera(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::QnetTool::openGround(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNet::SetImages(), Isis::LidarData::SetImages(), and Isis::UniversalGroundMap::UniversalGroundMap().
|
static |
Generate CSM Model specs from ISD.
| isdFilePath | Path to ISD file |
| pluginName | Plugin name |
| modelName | Model name |
Definition at line 277 of file CameraFactory.cpp.
Referenced by constructModelFromIsd().
|
static |
Reads the appropriate plugin file for the ISIS cameras, and scans the directories specified in IsisPreferences for CSM cameras.
Definition at line 124 of file CameraFactory.cpp.
References m_cameraPlugin, and m_initialized.
Referenced by CameraVersion(), and Create().
|
staticprivate |
The plugin file for the camera.
Definition at line 72 of file CameraFactory.h.
Referenced by CameraVersion(), Create(), and initPlugin().
|
staticprivate |
Has the plugin list been initialized.
Definition at line 73 of file CameraFactory.h.
Referenced by initPlugin().