ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
E57Filter.cpp File Reference
#include "E57Filter.h"
#include "FileIO.h"
#include "E57Header.h"
#include <E57Format.h>
#include <ecvCameraSensor.h>
#include <ecvColorScalesManager.h>
#include <ecvGBLSensor.h>
#include <ecvImage.h>
#include <ecvPointCloud.h>
#include <ecvProgressDialog.h>
#include <ecvScalarField.h>
#include <QApplication>
#include <QBuffer>
#include <QUuid>
#include <cassert>
#include <string>
Include dependency graph for E57Filter.cpp:

Go to the source code of this file.

Typedefs

using colorFieldType = double
 

Functions

static void SavePoseInformation (e57::StructureNode &parentNode, const e57::ImageFile &imf, const ccGLMatrixd &poseMat)
 
static bool SaveScan (ccPointCloud *cloud, e57::StructureNode &scanNode, e57::ImageFile &imf, e57::VectorNode &data3D, QString &guidStr, ecvProgressDialog *progressDlg=nullptr)
 
void SaveImage (const ccImage *image, const QString &scanGUID, e57::ImageFile &imf, e57::VectorNode &images2D)
 
static bool NodeStructureToTree (ccHObject *currentTreeNode, const e57::Node &currentE57Node)
 
static void NodeToConsole (const e57::Node &node)
 
static bool ChildNodeToConsole (const e57::Node &node, const char *childName)
 
static void DecodePrototype (const e57::StructureNode &scan, const e57::StructureNode &proto, E57ScanHeader &header)
 
static bool GetPoseInformation (const e57::StructureNode &node, ccGLMatrixd &poseMat)
 
static ccHObjectLoadScan (const e57::Node &node, QString &guidStr, ecvProgressDialog *progressDlg=nullptr)
 
static ccHObjectLoadImage (const e57::Node &node, QString &associatedData3DGuid)
 

Typedef Documentation

◆ colorFieldType

using colorFieldType = double

Definition at line 36 of file E57Filter.cpp.

Function Documentation

◆ ChildNodeToConsole()

◆ DecodePrototype()

static void DecodePrototype ( const e57::StructureNode scan,
const e57::StructureNode proto,
E57ScanHeader header 
)
static

Definition at line 1057 of file E57Filter.cpp.

References PointStandardizedFieldsAvailable::angleMaximum, PointStandardizedFieldsAvailable::angleMinimum, PointStandardizedFieldsAvailable::angleScaledInteger, PointStandardizedFieldsAvailable::cartesianInvalidStateField, PointStandardizedFieldsAvailable::cartesianXField, PointStandardizedFieldsAvailable::cartesianYField, PointStandardizedFieldsAvailable::cartesianZField, PointStandardizedFieldsAvailable::colorBlueField, ColorLimits::colorBlueMaximum, ColorLimits::colorBlueMinimum, PointStandardizedFieldsAvailable::colorGreenField, ColorLimits::colorGreenMaximum, ColorLimits::colorGreenMinimum, E57ScanHeader::colorLimits, PointStandardizedFieldsAvailable::colorRedField, ColorLimits::colorRedMaximum, ColorLimits::colorRedMinimum, PointStandardizedFieldsAvailable::columnIndexField, PointStandardizedFieldsAvailable::columnIndexMaximum, e57::E57_FLOAT, e57::E57_INTEGER, e57::E57_SCALED_INTEGER, e57::StructureNode::get(), PointStandardizedFieldsAvailable::intensityField, E57ScanHeader::intensityLimits, IntensityLimits::intensityMaximum, IntensityLimits::intensityMinimum, PointStandardizedFieldsAvailable::intensityScaledInteger, PointStandardizedFieldsAvailable::isColorInvalidField, e57::StructureNode::isDefined(), PointStandardizedFieldsAvailable::isIntensityInvalidField, PointStandardizedFieldsAvailable::isTimeStampInvalidField, e57::IntegerNode::maximum(), e57::ScaledIntegerNode::maximum(), e57::FloatNode::maximum(), e57::IntegerNode::minimum(), e57::ScaledIntegerNode::minimum(), e57::FloatNode::minimum(), PointStandardizedFieldsAvailable::normRangeMaximum, PointStandardizedFieldsAvailable::normRangeMinimum, PointStandardizedFieldsAvailable::normRangeScaledInteger, PointStandardizedFieldsAvailable::normXField, PointStandardizedFieldsAvailable::normYField, PointStandardizedFieldsAvailable::normZField, offset, e57::ScaledIntegerNode::offset(), E57ScanHeader::pointFields, PointStandardizedFieldsAvailable::pointRangeMaximum, PointStandardizedFieldsAvailable::pointRangeMinimum, PointStandardizedFieldsAvailable::pointRangeScaledInteger, PointStandardizedFieldsAvailable::returnCountField, PointStandardizedFieldsAvailable::returnIndexField, PointStandardizedFieldsAvailable::returnMaximum, PointStandardizedFieldsAvailable::rowIndexField, PointStandardizedFieldsAvailable::rowIndexMaximum, e57::ScaledIntegerNode::scale(), e57::ScaledIntegerNode::scaledValue(), PointStandardizedFieldsAvailable::sphericalAzimuthField, PointStandardizedFieldsAvailable::sphericalElevationField, PointStandardizedFieldsAvailable::sphericalInvalidStateField, PointStandardizedFieldsAvailable::sphericalRangeField, PointStandardizedFieldsAvailable::timeMaximum, PointStandardizedFieldsAvailable::timeStampField, e57::Node::type(), e57::IntegerNode::value(), and e57::FloatNode::value().

Referenced by LoadScan().

◆ GetPoseInformation()

◆ LoadImage()

static ccHObject* LoadImage ( const e57::Node node,
QString &  associatedData3DGuid 
)
static

◆ LoadScan()

static ccHObject* LoadScan ( const e57::Node node,
QString &  guidStr,
ecvProgressDialog progressDlg = nullptr 
)
static

Definition at line 1460 of file E57Filter.cpp.

References ccColorScalesManager::ABS_NORM_GREY, ccHObject::addChild(), ccPointCloud::addNorm(), cloudViewer::PointCloudTpl< T >::addPoint(), ccPointCloud::addRGBColor(), ccPointCloud::addScalarField(), ccHObject::applyGLTransformation_recursive(), ecvColor::RgbTpl< Type >::b, PointStandardizedFieldsAvailable::cartesianInvalidStateField, PointStandardizedFieldsAvailable::cartesianXField, PointStandardizedFieldsAvailable::cartesianYField, PointStandardizedFieldsAvailable::cartesianZField, e57::CompressedVectorReader::close(), PointStandardizedFieldsAvailable::colorBlueField, ColorLimits::colorBlueMaximum, ColorLimits::colorBlueMinimum, PointStandardizedFieldsAvailable::colorGreenField, ColorLimits::colorGreenMaximum, ColorLimits::colorGreenMinimum, E57ScanHeader::colorLimits, PointStandardizedFieldsAvailable::colorRedField, ColorLimits::colorRedMaximum, ColorLimits::colorRedMinimum, ccScalarField::computeMinAndMax(), ccGLMatrixTpl< T >::data(), DecodePrototype(), e57::Node::destImageFile(), e57::E57_SCALED_INTEGER, e57::E57_STRING, e57::E57_STRUCTURE, e57::StructureNode::elementName(), CVLog::Error(), cloudViewer::ScalarField::flagValueAsInvalid(), Vector3Tpl< PointCoordinateType >::fromArray(), ecvColor::RgbTpl< Type >::g, e57::StructureNode::get(), ccColorScalesManager::GetDefaultScale(), cloudViewer::BoundingBoxTpl< T >::getDiagNorm(), cloudViewer::ScalarField::getMax(), cloudViewer::ScalarField::getMin(), cloudViewer::ScalarField::getName(), ccGenericPointCloud::getOwnBB(), GetPoseInformation(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), ccGLMatrixTpl< T >::getTranslationAsVec3D(), ccColorScalesManager::GREY, FileIOFilter::HandleGlobalShift(), PointStandardizedFieldsAvailable::intensityField, e57::StructureNode::isDefined(), PointStandardizedFieldsAvailable::isIntensityInvalidField, Vector3Tpl< Type >::normalize(), PointStandardizedFieldsAvailable::normXField, PointStandardizedFieldsAvailable::normYField, PointStandardizedFieldsAvailable::normZField, cloudViewer::NormalizedProgress::oneStep(), E57ScanHeader::pointFields, points, CVLog::Print(), ecvColor::RgbTpl< Type >::r, e57::CompressedVectorReader::read(), CCShareable::release(), ccPointCloud::reserve(), ccPointCloud::reserveTheNormsTable(), ccPointCloud::reserveTheRGBTable(), ccHObject::resetGLTransformationHistory_recursive(), ccPointCloud::resize(), cloudViewer::ScalarField::resizeSafe(), PointStandardizedFieldsAvailable::returnIndexField, PointStandardizedFieldsAvailable::returnMaximum, ccScalarField::setColorScale(), ccPointCloud::setCurrentDisplayedScalarField(), ccObject::setEnabled(), ccShiftedObject::setGlobalShift(), ccSensor::setGraphicScale(), ccObject::setMetaData(), ccObject::setName(), ccSensor::setRigidTransformation(), ccGLMatrixTpl< T >::setTranslation(), cloudViewer::ScalarField::setValue(), ccDrawableObject::setVisible(), ccDrawableObject::showColors(), ccDrawableObject::showNormals(), ccDrawableObject::showSF(), size, PointStandardizedFieldsAvailable::sphericalAzimuthField, PointStandardizedFieldsAvailable::sphericalElevationField, PointStandardizedFieldsAvailable::sphericalInvalidStateField, PointStandardizedFieldsAvailable::sphericalRangeField, ccGLMatrixTpl< T >::toString(), e57::Node::type(), e57::StringNode::value(), CVLog::Warning(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by E57Filter::loadFile().

◆ NodeStructureToTree()

◆ NodeToConsole()

◆ SaveImage()

◆ SavePoseInformation()

static void SavePoseInformation ( e57::StructureNode parentNode,
const e57::ImageFile imf,
const ccGLMatrixd poseMat 
)
static

◆ SaveScan()

static bool SaveScan ( ccPointCloud cloud,
e57::StructureNode scanNode,
e57::ImageFile imf,
e57::VectorNode data3D,
QString &  guidStr,
ecvProgressDialog progressDlg = nullptr 
)
static

This prototype will be used in creating the points CompressedVector.

If this vector is empty, it is assumed that all fields will use the BitPack codec.

We use the prototype and empty codecs tree from above.

Definition at line 128 of file E57Filter.cpp.

References e57::VectorNode::append(), ecvColor::RgbTpl< Type >::b, e57::CompressedVectorWriter::close(), FileIO::createdBy(), cloudViewer::ScalarField::currentSize(), ccGLMatrixTpl< T >::data(), e57::E57_DOUBLE, e57::E57_SINGLE, CVLog::Error(), Vector3Tpl< double >::fromArray(), ccGLMatrixTpl< double >::FromString(), ecvColor::RgbTpl< Type >::g, ccPointCloud::getCurrentDisplayedScalarFieldIndex(), ccShiftedObject::getGlobalScale(), ccShiftedObject::getGlobalShift(), ccHObject::getGLTransformationHistory(), cloudViewer::ScalarField::getMax(), ccObject::getMetaData(), cloudViewer::ScalarField::getMin(), ccObject::getName(), ccShiftedObject::getOwnGlobalBB(), ccPointCloud::getPointColor(), ccPointCloud::getPointNormal(), cloudViewer::PointCloudTpl< T >::getPointPersistentPtr(), cloudViewer::PointCloudTpl< T >::getScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), cloudViewer::PointCloudTpl< T >::getScalarFieldName(), ccGLMatrixTpl< T >::getTranslationAsVec3D(), cloudViewer::ScalarField::getValue(), ccPointCloud::hasColors(), ccPointCloud::hasNormals(), ccGLMatrixTpl< T >::inverse(), max(), min(), Vector3Tpl< Type >::norm2d(), cloudViewer::NormalizedProgress::oneStep(), points, CVLog::Print(), ecvColor::RgbTpl< Type >::r, SavePoseInformation(), e57::StructureNode::set(), ccGLMatrixTpl< T >::setTranslation(), cloudViewer::PointCloudTpl< T >::size(), Tuple3Tpl< Type >::u, cloudViewer::ScalarField::ValidValue(), CVLog::Warning(), e57::CompressedVectorWriter::write(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by E57Filter::saveToFile().