ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ImageFileFilter.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "FileIOFilter.h"
11 
14 public:
16 
17  // inherited from FileIOFilter
18  virtual CC_FILE_ERROR loadFile(const QString& filename,
19  ccHObject& container,
20  LoadParameters& parameters) override;
21 
22  virtual bool canSave(CV_CLASS_ENUM type,
23  bool& multiple,
24  bool& exclusive) const override;
26  const QString& filename,
27  const SaveParameters& parameters) override;
28 
30  static QString GetLoadFilename(const QString& dialogTitle,
31  const QString& imageLoadPath,
32  QWidget* parentWidget = nullptr);
33 
35  static QString GetSaveFilename(const QString& dialogTitle,
36  const QString& baseName,
37  const QString& imageSavePath,
38  QWidget* parentWidget = nullptr);
39 };
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
std::string filename
#define CV_IO_LIB_API
Definition: CV_io.h:15
char type
CC_FILE_ERROR
Typical I/O filter errors.
Definition: FileIOFilter.h:20
Generic file I/O filter.
Definition: FileIOFilter.h:46
Filter to load or save an image (all types supported by Qt)
virtual CC_FILE_ERROR loadFile(const QString &filename, ccHObject &container, LoadParameters &parameters) override
Loads one or more entities from a file.
virtual CC_FILE_ERROR saveToFile(ccHObject *entity, const QString &filename, const SaveParameters &parameters) override
Saves an entity (or a group of) to a file.
static QString GetSaveFilename(const QString &dialogTitle, const QString &baseName, const QString &imageSavePath, QWidget *parentWidget=nullptr)
Helper: select an output image filename.
virtual bool canSave(CV_CLASS_ENUM type, bool &multiple, bool &exclusive) const override
Returns whether this I/O filter can save the specified type of entity.
static QString GetLoadFilename(const QString &dialogTitle, const QString &imageLoadPath, QWidget *parentWidget=nullptr)
Helper: select an input image filename.
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Generic loading parameters.
Definition: FileIOFilter.h:51
Generic saving parameters.
Definition: FileIOFilter.h:84