MCPcopy Create free account
hub / github.com/CloudCompare/CloudCompare / LoadProjectUUID

Function LoadProjectUUID

plugins/core/IO/qLASIO/src/LasMetadata.cpp:102–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 bool LoadProjectUUID(const ccPointCloud& pointCloud, laszip_header& header)
103 {
104 if (pointCloud.hasMetaData(LasMetadata::PROJECT_UUID))
105 {
106 QVariant value = pointCloud.getMetaData(LasMetadata::PROJECT_UUID);
107 QByteArray byteArray = value.toByteArray();
108 if (byteArray.size() != 16)
109 {
110 ccLog::Warning("[LAS] Invalid project UUID meta data");
111 return false;
112 }
113
114 const char* bufferData = byteArray.data();
115
116 // 1st block (32 bits)
117 header.project_ID_GUID_data_1 = *(const laszip_U32*)bufferData;
118 bufferData += 4;
119 // 2nd block (16 bits)
120 header.project_ID_GUID_data_2 = *(const laszip_U16*)bufferData;
121 bufferData += 2;
122 // 3rd block (16 bits)
123 header.project_ID_GUID_data_3 = *(const laszip_U16*)bufferData;
124 bufferData += 2;
125 // 4th block (8 * 8 bits)
126 memcpy(header.project_ID_GUID_data_4, bufferData, 8);
127
128 return true;
129 }
130
131 return false;
132 }
133
134 bool LoadVlrs(const ccPointCloud& pointCloud, LasVlr& vlr)
135 {

Callers 1

LasSaverMethod · 0.85

Calls 5

hasMetaDataMethod · 0.80
getMetaDataMethod · 0.80
toByteArrayMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected