23 : m_imageList (copyThis.m_imageList),
24 m_tiePointList (copyThis.m_tiePointList)
68 for (
size_t i=0; i<tiepointList.size(); ++i)
76 std::shared_ptr<Image> result;
90 std::shared_ptr<GroundControlPoint> result;
104 std::shared_ptr<TiePoint> result;
119 if (pb_json_node.isMember(
"images"))
121 const Json::Value& listJson = pb_json_node[
"images"];
122 unsigned int count = listJson.size();
123 for (
unsigned int i=0; i<count; ++i)
125 const Json::Value& jsonItem = listJson[i];
126 shared_ptr<Image> item (
new Image(jsonItem));
131 if (pb_json_node.isMember(
"groundPoints"))
133 const Json::Value& listJson = pb_json_node[
"groundPoints"];
134 unsigned int count = listJson.size();
135 for (
unsigned int i=0; i<count; ++i)
137 const Json::Value& jsonItem = listJson[i];
143 if (pb_json_node.isMember(
"tiePoints"))
145 const Json::Value& listJson = pb_json_node[
"tiePoints"];
146 unsigned int count = listJson.size();
147 for (
unsigned int i=0; i<count; ++i)
149 const Json::Value& jsonItem = listJson[i];
150 shared_ptr<TiePoint> item (
new TiePoint(jsonItem));
158 Json::Value imageListJson (Json::arrayValue);
160 for (
unsigned int i=0; i<count; ++i)
164 pbJSON[
"images"] = imageListJson;
166 Json::Value gcpListJson (Json::arrayValue);
168 for (
unsigned int i=0; i<count; ++i)
172 pbJSON[
"groundPoints"] = gcpListJson;
174 Json::Value tpListJson (Json::arrayValue);
176 for (
unsigned int i=0; i<count; ++i)
180 pbJSON[
"tiePoints"] = tpListJson;
std::vector< std::shared_ptr< TiePoint > > m_tiePointList
std::vector< std::shared_ptr< Image > > m_imageList
This code was derived from https://gist.github.com/mshockwave.
PhotoBlock()
Initialize the photoblock from a prior saved session.
PhotoBlock & operator=(const PhotoBlock ©this)
Class for representing MSP PhotoBlock.
void addTiePoints(TiePointList &tiepointList)
Adds the list of tiepoints to the PB.
Class for representing a ground control point.
std::vector< std::shared_ptr< TiePoint > > TiePointList
Class representing an Image as used by ossim-msp services.
unsigned int addTiePoint(std::shared_ptr< TiePoint > tiepoint)
Adds the tiepoint to the PB.
virtual void loadJSON(const Json::Value &json)
std::shared_ptr< TiePoint > getTiePoint(unsigned int tpId)
unsigned int addGroundPoint(std::shared_ptr< GroundControlPoint > groundPoint)
Adds the image to the photoblock at last position.
virtual void saveJSON(Json::Value &json) const
unsigned int addImage(std::shared_ptr< Image > image)
Adds the image to the photoblock at last position.
Class for representing a single tiepoint on two or more images.
std::vector< std::shared_ptr< GroundControlPoint > > m_gcpList
std::shared_ptr< GroundControlPoint > getGroundPoint(const std::string &gpId)
std::shared_ptr< Image > getImage(const std::string &imageId)