 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
30 QString extension = QString(),
31 QString suffix = QString(),
32 QString* baseOutputFilename =
nullptr,
33 bool forceNoTimestamp =
false)
const override;
35 const QString& suffix = QString(),
36 QString* baseOutputFilename =
nullptr,
37 ccCommandLineInterface::ExportOptions options =
41 QStringList&
arguments()
override {
return m_arguments; }
42 const QStringList&
arguments()
const override {
return m_arguments; }
45 void print(
const QString& message)
const override;
46 void warning(
const QString& message)
const override;
47 bool error(
const QString& message)
50 bool allAtOnce =
false,
51 const QString* allAtOnceFileName =
nullptr)
override;
53 bool allAtOnce =
false,
54 const QString* allAtOnceFileName =
nullptr)
override;
56 const GlobalShiftOptions& globalShiftOptions,
64 return m_hierarchyExportFormat;
68 m_cloudExportFormat =
format;
69 m_cloudExportExt = ext;
72 m_meshExportFormat =
format;
73 m_meshExportExt = ext;
76 m_hierarchyExportFormat =
format;
77 m_hierarchyExportExt = ext;
91 int start(QDialog* parent = 0);
96 QString m_cloudExportFormat;
98 QString m_cloudExportExt;
101 QString m_meshExportFormat;
103 QString m_meshExportExt;
106 QString m_hierarchyExportFormat;
108 QString m_hierarchyExportExt;
111 QString m_meshFilename;
114 QStringList m_arguments;
117 QMap<QString, Command::Shared> m_commands;
126 QDialog* m_parentWidget;
Definition: ecvCommandLineCommands.h:294
static CC_FILE_ERROR SaveToFile(ccHObject *entities, const QString &filename, const SaveParameters ¶meters, Shared filter)
Definition: FileIOFilter.cpp:377
Definition: ecvCommandLineCommands.h:393
unsigned filterChildren(Container &filteredChildren, bool recursive=false, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, bool strict=false) const
Collects the children corresponding to a certain pattern.
Definition: ecvHObject.cpp:611
void detachChild(ccHObject *child)
Detaches a specific child.
Definition: ecvHObject.cpp:988
@ FIRST_GLOBAL_SHIFT
Definition: ecvCommandLineInterface.h:225
std::string filename
Definition: PointCloudIO.cpp:47
bool isKindOf(CV_CLASS_ENUM type) const
Definition: ecvObject.h:128
QString cloudExportFormat() const override
Returns the current cloud(s) export format.
Definition: ecvCommandLineParser.h:59
Definition: ecvCommandLineCommands.h:282
virtual unsigned size() const =0
Returns the number of triangles.
QString hierarchyExportExt() const override
Definition: ecvCommandLineParser.h:66
virtual unsigned size() const =0
Returns the number of points.
CCVector3d customGlobalShift
Definition: ecvCommandLineInterface.h:230
ccHObject * getParent() const
Returns parent object.
Definition: ecvHObject.h:245
Definition: ecvCommandLineCommands.h:76
Definition: ecvCommandLineCommands.h:345
filament::Texture::InternalFormat format
Definition: FilamentResourceManager.cpp:181
virtual std::vector< CLCloudDesc > & clouds()
Currently opened point clouds and their filename.
Definition: ecvCommandLineInterface.cpp:133
bool registerCommand(Command::Shared command) override
Definition: ecvCommandLineParser.cpp:154
CLLoadParameters m_loadingParameters
File loading parameters.
Definition: ecvCommandLineInterface.h:340
void removeMeshes(bool onlyLast=false) override
Removes all meshes (or only the last one ;)
Definition: ecvCommandLineParser.cpp:347
Definition: ecvCommandLineCommands.h:351
@ MESH
Definition: CVTypes.h:105
Definition: ecvCommandLineCommands.h:82
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
Definition: ecvCommandLineCommands.h:166
bool isA(CV_CLASS_ENUM type) const
Definition: ecvObject.h:131
Definition: ecvCommandLineCommands.h:63
bool saveMeshes(QString suffix=QString(), bool allAtOnce=false, const QString *allAtOnceFileName=nullptr) override
Saves all meshes.
Definition: ecvCommandLineParser.cpp:574
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
Definition: ecvCommandLineCommands.h:381
@ POINT_CLOUD
Definition: CVTypes.h:104
Definition: ecvCommandLineCommands.h:300
Definition: ecvCommandLineCommands.h:112
virtual ccGenericPointCloud * getAssociatedCloud() const =0
Returns the vertices cloud.
QDialog * widgetParent() override
Returns a (widget) parent (if any is available)
Definition: ecvCommandLineParser.h:44
static void ReleaseInstance(bool flush=true)
Releases unique instance.
Definition: ecvConsole.cpp:90
Command line parser.
Definition: ecvCommandLineParser.h:20
void setCloudExportFormat(QString format, QString ext) override
Sets the current cloud(s) export format and extension.
Definition: ecvCommandLineParser.h:67
bool importFile(QString filename, const GlobalShiftOptions &globalShiftOptions, FileIOFilter::Shared filter=FileIOFilter::Shared(nullptr)) override
Loads a file with a specific filter.
Definition: ecvCommandLineParser.cpp:356
QString basename
Definition: ecvCommandLineInterface.h:35
unsigned size() const override
Definition: PointCloudTpl.h:38
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
Definition: ecvCommandLineCommands.h:387
CLOUDVIEWER dedicated binary point cloud I/O filter.
Definition: BinFilter.h:15
QString meshExportFormat() const override
Returns the current mesh(es) export format.
Definition: ecvCommandLineParser.h:61
@ NO_DIALOG_AUTO_SHIFT
Definition: ecvGlobalShiftManager.h:31
static void Init(QListWidget *textDisplay=nullptr, QWidget *parentWidget=nullptr, MainWindow *parentWindow=nullptr, bool redirectToStdOut=false)
Inits console (and optionaly associates it with a text output widget)
Definition: ecvConsole.cpp:178
QString hierarchyExportFormat() const override
Returns the current hierarchy(ies) export format.
Definition: ecvCommandLineParser.h:63
Definition: ecvCommandLineCommands.h:318
Definition: ecvCommandLineCommands.h:288
bool silentMode() const
Returns the silent mode.
Definition: ecvCommandLineInterface.cpp:149
int start(QDialog *parent=0)
Parses the command line.
Definition: ecvCommandLineParser.cpp:701
Definition: ecvCommandLineCommands.h:411
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
Definition: ecvHObject.h:337
Global Shift options.
Definition: ecvCommandLineInterface.h:221
Vector3Tpl< double > CCVector3d
Double 3D Vector.
Definition: CVGeom.h:804
Definition: ecvCommandLineCommands.h:210
virtual std::vector< CLMeshDesc > & meshes()
Currently opened meshes and their filename.
Definition: ecvCommandLineInterface.cpp:139
void setMeshExportFormat(QString format, QString ext) override
Sets the current mesh(es) export format and extension.
Definition: ecvCommandLineParser.h:71
core::Tensor result
Definition: VtkUtils.cpp:76
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
Definition: ecvCommandLineCommands.h:375
Definition: ecvCommandLineCommands.h:186
static QString GetFileFilter()
Definition: BinFilter.h:20
Definition: ecvCommandLineCommands.h:45
Definition: ecvCommandLineCommands.h:234
Definition: ecvCommandLineCommands.h:357
bool saveClouds(QString suffix=QString(), bool allAtOnce=false, const QString *allAtOnceFileName=nullptr) override
Saves all clouds.
Definition: ecvCommandLineParser.cpp:519
Definition: ecvCommandLineCommands.h:363
A 3D cloud interface with associated features (color, normals, octree, etc.)
Definition: ecvGenericPointCloud.h:45
bool alwaysDisplaySaveDialog
Definition: FileIOFilter.h:91
Definition: ecvCommandLineCommands.h:228
void setHierarchyExportFormat(QString format, QString ext) override
Sets the current hierarchy(ies) export format and extension.
Definition: ecvCommandLineParser.h:75
Definition: ecvCommandLineCommands.h:39
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.
Definition: FileIOFilter.cpp:253
QSharedPointer< Command > Shared
Shared type.
Definition: ecvCommandLineInterface.h:132
Definition: ecvCommandLineCommands.h:252
QString path
Definition: ecvCommandLineInterface.h:36
Definition: ecvCommandRaster.h:18
bool m_coordinatesShiftEnabled
Definition: ecvCommandLineInterface.h:213
CC_FILE_ERROR
Typical I/O filter errors.
Definition: FileIOFilter.h:20
Definition: ecvCommandLineCommands.h:258
Definition: ecvCommandLineCommands.h:160
Graphical progress indicator (thread-safe)
Definition: ecvProgressDialog.h:27
QString meshExportExt() const override
Returns the current mesh(es) export extension (warning: can be anything)
Definition: ecvCommandLineParser.h:62
Definition: ecvCommandLineCommands.h:124
Loaded entity description.
Definition: ecvCommandLineInterface.h:34
Definition: ecvCommandLineCommands.h:142
bool m_addTimestamp
Whether a timestamp should be automatically added to output files or not.
Definition: ecvCommandLineInterface.h:334
Definition: ecvCommandLineCommands.h:198
Generic mesh interface.
Definition: ecvGenericMesh.h:28
Definition: ecvCommandLineCommands.h:94
void removeClouds(bool onlyLast=false) override
Removes all clouds (or only the last one ;)
Definition: ecvCommandLineParser.cpp:339
Definition: ecvCommandLineCommands.h:312
Definition: ecvCommandLineCommands.h:106
Definition: ecvCommandRaster.h:12
int indexInFile
Definition: ecvCommandLineInterface.h:37
Definition: ecvCommandLineCommands.h:399
@ AUTO_GLOBAL_SHIFT
Definition: ecvCommandLineInterface.h:224
Definition: ecvCommandLineCommands.h:222
Definition: ecvCommandLineCommands.h:148
Definition: ecvCommandLineCommands.h:100
@ NO_GLOBAL_SHIFT
Definition: ecvCommandLineInterface.h:223
Definition: ecvCommandLineCommands.h:204
virtual CL_ENTITY_TYPE getCLEntityType() const =0
constexpr char COMMAND_HELP[]
Definition: ecvCommandLineParser.cpp:37
ecvGlobalShiftManager::Mode shiftHandlingMode
How to handle big coordinates.
Definition: FileIOFilter.h:64
CCVector3d m_coordinatesShift
Definition: ecvCommandLineInterface.h:214
@ NO_DIALOG
Definition: ecvGlobalShiftManager.h:30
Definition: ecvCommandLineCommands.h:306
Definition: ecvCommandLineCommands.h:330
void print(const QString &message) const override
Definition: ecvCommandLineParser.cpp:44
Definition: ecvCommandLineCommands.h:369
Command line interface.
Definition: ecvCommandLineInterface.h:112
Definition: ecvCommandLineCommands.h:57
QString cloudExportExt() const override
Returns the current cloud(s) export extension (warning: can be anything)
Definition: ecvCommandLineParser.h:60
@ CUSTOM_GLOBAL_SHIFT
Definition: ecvCommandLineInterface.h:226
Standard ECV plugin interface.
Definition: ecvPluginInterface.h:33
Loaded cloud description.
Definition: ecvCommandLineInterface.h:68
virtual unsigned getUniqueID() const
Returns object unique ID.
Definition: ecvObject.h:86
Definition: ecvCommandLineCommands.h:178
Definition: ecvCommandLineCommands.h:192
QSharedPointer< FileIOFilter > Shared
Shared type.
Definition: FileIOFilter.h:97
~ccCommandLineParser() override
Destructor.
Definition: ecvCommandLineParser.cpp:147
Definition: ecvCommandLineCommands.h:240
QWidget * parentWidget
Parent widget (if any)
Definition: FileIOFilter.h:93
Mode mode
Definition: ecvCommandLineInterface.h:229
int count
Definition: FileIOFactory.cpp:132
Definition: ecvCommandLineCommands.h:70
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
Generic saving parameters.
Definition: FileIOFilter.h:84
Definition: ecvCommandLineCommands.h:130
static CVLog * TheInstance()
Returns the static and unique instance.
Definition: CVLog.cpp:53
bool isAncestorOf(const ccHObject *anObject) const
Returns true if the current object is an ancestor of the specified one.
Definition: ecvHObject.cpp:699
ccGenericMesh * mesh
Definition: ecvCommandLineInterface.h:91
QString getExportFilename(const CLEntityDesc &entityDesc, QString extension=QString(), QString suffix=QString(), QString *baseOutputFilename=nullptr, bool forceNoTimestamp=false) const override
Returns the name of a to-be-exported entity.
Definition: ecvCommandLineParser.cpp:174
Loaded group description.
Definition: ecvCommandLineInterface.h:53
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
bool error(const QString &message) const override
Definition: ecvCommandLineParser.cpp:52
QString exportEntity(CLEntityDesc &entityDesc, const QString &suffix=QString(), QString *baseOutputFilename=nullptr, ccCommandLineInterface::ExportOptions options=ExportOption::NoOptions) override
Exports a cloud or a mesh.
Definition: ecvCommandLineParser.cpp:223
Definition: ecvCommandLineCommands.h:51
Loaded mesh description.
Definition: ecvCommandLineInterface.h:90
Definition: ecvCommandLineCommands.h:246
Definition: ecvCommandCrossSection.h:15
QVector< ccPluginInterface * > ccPluginInterfaceList
Simply a list of.
Definition: ecvPluginManager.h:18
@ DP_NONE
Definition: ecvHObject.h:258
Definition: ecvCommandLineCommands.h:278
Definition: ecvCommandLineCommands.h:136
void cleanup()
Definition: ecvCommandLineParser.cpp:696
std::vector< CLCloudDesc > m_clouds
Currently opened point clouds and their filename.
Definition: ecvCommandLineInterface.h:322
Definition: ecvCommandLineCommands.h:172
virtual ccHObject * getEntity()=0
static bool IsCommand(const QString &token, const char *command)
Test whether a command line token is a valid command keyword or not.
Definition: ecvCommandLineInterface.cpp:119
QStringList & arguments() override
Returns the list of arguments.
Definition: ecvCommandLineParser.h:41
const QStringList & arguments() const override
Returns the list of arguments (const version)
Definition: ecvCommandLineParser.h:42
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
Definition: ecvHObject.cpp:534
@ CC_FERR_NO_ERROR
Definition: FileIOFilter.h:21
ccCommandLineParser()
Default constructor.
Definition: ecvCommandLineParser.cpp:135
std::vector< CLMeshDesc > m_meshes
Currently opened meshes and their filename.
Definition: ecvCommandLineInterface.h:325
Definition: ecvCommandLineCommands.h:405
static Shared GetFilter(const QString &fileFilter, bool onImport)
Returns the filter corresponding to the given 'file filter'.
Definition: FileIOFilter.cpp:212
Definition: ecvCommandLineCommands.h:274
static int Parse(int nargs, char **args, ccPluginInterfaceList &plugins)
Parses the input command.
Definition: ecvCommandLineParser.cpp:58
Definition: ecvCommandLineCommands.h:154
void registerBuiltInCommands()
Definition: ecvCommandLineParser.cpp:627
void warning(const QString &message) const override
Definition: ecvCommandLineParser.cpp:48
constexpr char COMMAND_SILENT_MODE[]
Definition: ecvCommandLineParser.cpp:38
Definition: ecvCommandLineCommands.h:216
static void SetFileDesc(CLEntityDesc &desc, const QString &fileName)
Definition: ecvCommandLineCommands.cpp:5020
Definition: ecvCommandLineCommands.h:88
static ccGenericMesh * ToGenericMesh(ccHObject *obj)
Converts current object to ccGenericMesh (if possible)
Definition: ecvHObjectCaster.cpp:123