![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Noah Snavely's Bundler output file filter. More...
#include <BundlerFilter.h>


Public Member Functions | |
| BundlerFilter () | |
| virtual CC_FILE_ERROR | loadFile (const QString &filename, ccHObject &container, LoadParameters ¶meters) override |
| Loads one or more entities from a file. More... | |
| CC_FILE_ERROR | loadFileExtended (const QString &filename, ccHObject &container, LoadParameters ¶meters, const QString &altKeypointsFilename=QString(), bool undistortImages=false, bool generateColoredDTM=false, unsigned coloredDTMVerticesCount=1000000, float scaleFactor=1.0f) |
| Specific load method. More... | |
Public Member Functions inherited from FileIOFilter | |
| virtual | ~FileIOFilter ()=default |
| bool | importSupported () const |
| Returns whether this I/O filter can import files. More... | |
| bool | exportSupported () const |
| Returns whether this I/O filter can export files. More... | |
| const QStringList & | getFileFilters (bool onImport) const |
| Returns the file filter(s) for this I/O filter. More... | |
| QString | getDefaultExtension () const |
| Returns the default file extension. More... | |
| virtual CC_FILE_ERROR | saveToFile (ccHObject *entity, const QString &filename, const SaveParameters ¶meters) |
| Saves an entity (or a group of) to a file. More... | |
| virtual bool | canSave (CV_CLASS_ENUM type, bool &multiple, bool &exclusive) const |
| Returns whether this I/O filter can save the specified type of entity. More... | |
| virtual void | unregister () |
| Called when the filter is unregistered. More... | |
Additional Inherited Members | |
Public Types inherited from FileIOFilter | |
| enum | FilterFeature { NoFeatures = 0x0000 , Import = 0x00001 , Export = 0x0002 , BuiltIn = 0x0004 , DynamicInfo = 0x0008 } |
| using | Shared = QSharedPointer< FileIOFilter > |
| Shared type. More... | |
| using | FilterContainer = std::vector< FileIOFilter::Shared > |
| Type of a I/O filters container. More... | |
Static Public Member Functions inherited from FileIOFilter | |
| static QStringList | ImportFilterList () |
| static ccHObject * | LoadFromFile (const QString &filename, LoadParameters ¶meters, Shared filter, CC_FILE_ERROR &result) |
| Loads one or more entities from a file with a known filter. More... | |
| static ccHObject * | LoadFromFile (const QString &filename, LoadParameters ¶meters, CC_FILE_ERROR &result, const QString &fileFilter=QString()) |
| Loads one or more entities from a file with known type. More... | |
| static CC_FILE_ERROR | SaveToFile (ccHObject *entities, const QString &filename, const SaveParameters ¶meters, Shared filter) |
| static CC_FILE_ERROR | SaveToFile (ccHObject *entities, const QString &filename, const SaveParameters ¶meters, const QString &fileFilter) |
| static bool | HandleGlobalShift (const CCVector3d &P, CCVector3d &Pshift, bool &preserveCoordinateShift, LoadParameters &loadParameters, bool useInputCoordinatesShiftIfPossible=false) |
| Shortcut to the ecvGlobalShiftManager mechanism specific for files. More... | |
| static void | DisplayErrorMessage (CC_FILE_ERROR err, const QString &action, const QString &filename) |
| Displays (to console) the message corresponding to a given error code. More... | |
| static bool | CheckForSpecialChars (const QString &filename) |
| Returns whether special characters are present in the input string. More... | |
| static void | ResetSesionCounter () |
| static unsigned | IncreaseSesionCounter () |
| static void | Register (Shared filter) |
| Registers a new filter. More... | |
| static Shared | GetFilter (const QString &fileFilter, bool onImport) |
| Returns the filter corresponding to the given 'file filter'. More... | |
| static Shared | FindBestFilterForExtension (const QString &ext) |
| Returns the best filter (presumably) to open a given file extension. More... | |
| static const FilterContainer & | GetFilters () |
| Returns the set of all registered filters. More... | |
| static void | UnregisterAll () |
| Unregisters all filters. More... | |
Protected Member Functions inherited from FileIOFilter | |
| FileIOFilter (const FilterInfo &info) | |
| void | setImportExtensions (const QStringList &extensions) |
| void | setImportFileFilterStrings (const QStringList &filterStrings) |
| void | setExportFileFilterStrings (const QStringList &filterStrings) |
Static Protected Attributes inherited from FileIOFilter | |
| static constexpr float | DEFAULT_PRIORITY = 25.0f |
Noah Snavely's Bundler output file filter.
See http://phototour.cs.washington.edu/
Definition at line 15 of file BundlerFilter.h.
| BundlerFilter::BundlerFilter | ( | ) |
Definition at line 60 of file BundlerFilter.cpp.
References FileIOFilter::DEFAULT_PRIORITY, and FileIOFilter::Import.
|
overridevirtual |
Loads one or more entities from a file.
This method must be implemented by children classes.
| filename | file to load |
| container | container to store loaded entities |
| parameters | generic loading parameters |
Reimplemented from FileIOFilter.
Definition at line 67 of file BundlerFilter.cpp.
References filename, and loadFileExtended().
| CC_FILE_ERROR BundlerFilter::loadFileExtended | ( | const QString & | filename, |
| ccHObject & | container, | ||
| LoadParameters & | parameters, | ||
| const QString & | altKeypointsFilename = QString(), |
||
| bool | undistortImages = false, |
||
| bool | generateColoredDTM = false, |
||
| unsigned | coloredDTMVerticesCount = 1000000, |
||
| float | scaleFactor = 1.0f |
||
| ) |
Specific load method.
Definition at line 80 of file BundlerFilter.cpp.
References FileIOFilter::LoadParameters::alwaysDisplayLoadDialog, QtCompatRegExpOption::CaseInsensitive, CC_FERR_CANCELED_BY_USER, CC_FERR_MALFORMED_FILE, CC_FERR_NO_LOAD, CC_FERR_READING, CC_FERR_WRONG_FILE_TYPE, CVLog::Error(), filename, BundlerImportDlg::generateColoredDTM(), BundlerImportDlg::getAltKeypointsFilename(), BundlerImportDlg::getDTMVerticesCount(), BundlerImportDlg::getImageListFilename(), BundlerImportDlg::getOptionalTransfoMatrix(), BundlerImportDlg::getOrthorectificationMethod(), BundlerImportDlg::getScaleFactor(), BundlerImportDlg::importImages(), BundlerImportDlg::importKeypoints(), BundlerImportDlg::keepImagesInMemory(), BundlerImportDlg::OPTIMIZED, BundlerImportDlg::orthoRectifyImagesAsClouds(), BundlerImportDlg::orthoRectifyImagesAsImages(), FileIOFilter::LoadParameters::parentWidget, qtCompatSplitRegex(), BundlerImportDlg::setAltKeypointsFilename(), BundlerImportDlg::setCamerasCount(), BundlerImportDlg::setImageListFilename(), BundlerImportDlg::setKeypointsCount(), BundlerImportDlg::setVer(), QtCompat::SkipEmptyParts, ccGLMatrixTpl< T >::toIdentity(), BundlerImportDlg::undistortImages(), BundlerImportDlg::useAlternativeKeypoints(), and CVLog::Warning().
Referenced by loadFile(), and BundlerCommand::process().