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 Camera * | CreateFromIsd (const QString &isdFile, Cube &cube) |
| Create a CSMCamera from an external ISD file and attach it to a cube. | |
| static void | updateLabelForCsm (Cube &cube, csm::Model *model) |
| Update the cube label in memory to support CSM cameras. | |
| static void | writeAdjustedCsmState (const QString &cubeFile, const QString &state, const QString &prefix="") |
| Write adjusted CSM model state to a JSON file. | |
| static csm::Model * | constructModelFromIsdOrState (const QString &filePath) |
| Construct a CSM model from either an ISD or a model state file. | |
| 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. | |
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.
|
static |
This looks up the current camera model version from the cube.
| cube | Input cube |
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 |
References initPlugin().
|
static |
Constructs CSM Model from ISD.
| isdFilePath | Path to ISD file |
| pluginName | Plugin name |
| modelName | Model name |
| isdFormat | ISD format type (e.g., NITF) |
References getModelSpecFromIsd().
|
static |
Construct a CSM model from either an ISD or a model state file.
Tries the ISD path first (canModelBeConstructedFromISD), then falls back to the state path (canModelBeConstructedFromState). Follows the same plugin iteration logic as csminit.
| filePath | Path to the ISD or model state file. |
References initPlugin().
Referenced by CreateFromIsd().
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 |
References CameraVersion(), Isis::Cube::hasBlob(), initPlugin(), and Isis::Cube::label().
Referenced by Isis::Cube::camera(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNet::SetImages(), Isis::LidarData::SetImages(), and Isis::UniversalGroundMap::UniversalGroundMap().
Create a CSMCamera from an external ISD file and attach it to a cube.
| isdFile | Path to the external ISD file. |
| cube | The cube to attach the camera to. |
References constructModelFromIsdOrState(), and updateLabelForCsm().
Referenced by Isis::CameraPointInfo::SetCube(), and Isis::ControlNet::SetImages().
|
static |
Generate CSM Model specs from ISD.
| isdFilePath | Path to ISD file |
| pluginName | Plugin name |
| modelName | Model name |
Referenced by constructModelFromIsd().
|
static |
Reads the appropriate plugin file for the ISIS cameras, and scans the directories specified in IsisPreferences for CSM cameras.
Referenced by CameraVersion(), constructModelFromIsdOrState(), and Create().
|
static |
Update the cube label in memory to support CSM cameras.
Follows the same logic as csminit: sets ShapeModel=Null in the Kernels group and injects a CsmInfo group with platform/instrument identifiers derived from the CSM model. This allows serial number derivation and camera creation to work as if csminit had been run, but without modifying the cube on disk.
| cube | The cube whose label will be modified. |
| model | The CSM sensor model. |
References Isis::Cube::label().
Referenced by CreateFromIsd().
|
static |
Write adjusted CSM model state to a JSON file.
The output file is named <prefix><cube_basename>.adjusted_state.json, following the same convention as ASP bundle_adjust.
| cubeFile | Path to the input cube (basename used for output name). |
| state | The adjusted CSM model state string. |
| prefix | Optional file prefix (e.g., "run/run_"). |