pqImageUtil.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef pqImageUtil_h
6 #define pqImageUtil_h
7 
8 #include "pqCoreModule.h"
9 
10 class QByteArray;
11 class QImage;
12 class QString;
13 class vtkImageData;
14 
19 {
20 public:
24  static bool toImageData(const QImage& img, vtkImageData* vtkimage);
25 
30  static bool fromImageData(vtkImageData* vtkimage, QImage& img);
31 
38  static bool imageDataToFormatedByteArray(
39  vtkImageData* vtkimage, QByteArray& bArray, const char* format);
40 
47  static int saveImage(vtkImageData* vtkimage, const QString& filename, int quality = -1);
48 
55  static int saveImage(const QImage& image, const QString& filename, int quality = -1);
56 };
57 
58 #endif
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
image
Utility class to convert VTK images to Qt images and vice versa.
Definition: pqImageUtil.h:18