8#include "PhotoModelFactory.h"
11#include "IException.h"
37 PvlGroup &algo = pvl.findObject(
"PhotometricModel")
38 .findGroup(
"Algorithm", Pvl::Traverse);
40 QString algorithm =
"";
41 if (algo.hasKeyword(
"PhtName")) {
42 algorithm = algo[
"PhtName"][0];
44 else if (algo.hasKeyword(
"Name")) {
45 algorithm = algo[
"Name"][0];
48 QString msg =
"Keyword [Name] or keyword [PhtName] must ";
49 msg +=
"exist in [Group = Algorithm]";
50 throw IException(IException::User, msg, _FILEINFO_);
55 FileName f(
"PhotoModel.plugin");
57 p->read(
"PhotoModel.plugin");
60 p->read(
"$ISISROOT/lib/PhotoModel.plugin");
66 return (*plugin)(pvl);
static PhotoModel * Create(Pvl &pvl)
Create a PhotoModel object using a PVL specification.
Loads plugins from a shared library.
QFunctionPointer GetPlugin(const QString &group)
This method returns a void pointer to a C function (i.e., the plugin) It does this by looking in itse...
This is free and unencumbered software released into the public domain.