VTK  9.3.20240329
vtkTextureIO.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkTextureIO_h
10 #define vtkTextureIO_h
11 
12 #include "vtkPixelExtent.h" // for pixel extent
13 #include "vtkRenderingLICOpenGL2Module.h" // for export
14 
15 // included vtkSystemIncludes in vtkPixelExtent
16 #include <cstddef> // for NULL
17 #include <deque> // for deque
18 #include <string> // for string
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkTextureObject;
22 
23 class VTKRENDERINGLICOPENGL2_EXPORT vtkTextureIO
24 {
25 public:
29  static void Write(VTK_FILEPATH const char* filename, vtkTextureObject* texture,
30  const unsigned int* subset = nullptr, const double* origin = nullptr);
31 
35  static void Write(VTK_FILEPATH std::string filename, vtkTextureObject* texture,
36  const unsigned int* subset = nullptr, const double* origin = nullptr)
37  {
38  Write(filename.c_str(), texture, subset, origin);
39  }
40 
44  static void Write(VTK_FILEPATH std::string filename, vtkTextureObject* texture,
45  const vtkPixelExtent& subset, const double* origin = nullptr)
46  {
47  Write(filename.c_str(), texture, subset.GetDataU(), origin);
48  }
49 
53  static void Write(VTK_FILEPATH const char* filename, vtkTextureObject* texture,
54  const std::deque<vtkPixelExtent>& exts, const double* origin = nullptr);
55 
57 
60  static void Write(VTK_FILEPATH std::string filename, vtkTextureObject* texture,
61  const std::deque<vtkPixelExtent>& exts, const double* origin = nullptr)
62  {
63  Write(filename.c_str(), texture, exts, origin);
64  }
66 };
67 
68 VTK_ABI_NAMESPACE_END
69 #endif
70 // VTK-HeaderTest-Exclude: vtkTextureIO.h
Representation of a cartesian pixel plane and common operations on it.
unsigned int * GetDataU()
A small collection of I/O routines that write vtkTextureObject to disk for debugging.
Definition: vtkTextureIO.h:24
static void Write(VTK_FILEPATH std::string filename, vtkTextureObject *texture, const std::deque< vtkPixelExtent > &exts, const double *origin=nullptr)
Write list of subsets to disk as multiblock image data at dataset origin(optional).
Definition: vtkTextureIO.h:60
static void Write(VTK_FILEPATH std::string filename, vtkTextureObject *texture, const vtkPixelExtent &subset, const double *origin=nullptr)
Write to disk as image data with subset(optional) at dataset origin(optional)
Definition: vtkTextureIO.h:44
static void Write(VTK_FILEPATH std::string filename, vtkTextureObject *texture, const unsigned int *subset=nullptr, const double *origin=nullptr)
Write to disk as image data with subset(optional) at dataset origin(optional)
Definition: vtkTextureIO.h:35
static void Write(VTK_FILEPATH const char *filename, vtkTextureObject *texture, const std::deque< vtkPixelExtent > &exts, const double *origin=nullptr)
Write list of subsets to disk as multiblock image data at dataset origin(optional).
static void Write(VTK_FILEPATH const char *filename, vtkTextureObject *texture, const unsigned int *subset=nullptr, const double *origin=nullptr)
Write to disk as image data with subset(optional) at dataset origin(optional)
abstracts an OpenGL texture object.
@ string
Definition: vtkX3D.h:490
#define VTK_FILEPATH