18 Image::Image(
const std::string& imageId,
19 const std::string& filename,
20 const std::string& modelName,
21 unsigned int entryIndex,
23 : m_imageId (imageId),
24 m_filename (filename),
25 m_entryIndex (entryIndex),
27 m_modelName (modelName)
50 availableModels.push_back(pair<string, string>(
"OSSIM", proj->
getLongName().
string()));
58 xmsg<<__FILE__<<
": loadJSON(JSON) -- ";
61 if (json_node.isMember(
"filename"))
68 xmsg<<
"JSON node missing required field: \"filename\".";
73 if (json_node[
"entryIndex"].isUInt())
77 if (json_node[
"band"].isUInt())
81 if (json_node.isMember(
"sensorModel"))
85 if (json_node.isMember(
"imageId"))
86 m_imageId = json_node[
"imageId"].asString();
90 string modelState = json_node[
"modelState"].asString();
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
virtual void loadJSON(const Json::Value &json)
Refer to 3DISA API document for JSON format used.
Represents serializable keyword/value map.
ossimFilename expand() const
Method to do file name expansion.
virtual void saveJSON(Json::Value &json) const
Refer to 3DISA API document for JSON format used.
This code was derived from https://gist.github.com/mshockwave.
ossimRefPtr< ossimSensorModel > m_sensorModel
unsigned int m_activeBand
unsigned int m_entryIndex
ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
virtual ossimString getLongName() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual bool parseString(const std::string &inString)
static ossimProjectionFactoryRegistry * instance()
virtual ossimString toString() const
Image(const std::string &imageId, const std::string &filename, const std::string &modelName="", unsigned int entryIndex=0, unsigned int band=1)
virtual void getAvailableModels(std::vector< pair< std::string, std::string > > &availableModels) const
Returns all available sensor model plugins and model names for this image:
const std::string & string() const