VTK  9.0.1
vtkTextureIO.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTextureIO.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkTextureIO_h
23 #define vtkTextureIO_h
24 
25 #include "vtkPixelExtent.h" // for pixel extent
26 #include "vtkRenderingLICOpenGL2Module.h" // for export
27 
28 // included vtkSystemIncludes in vtkPixelExtent
29 #include <cstddef> // for NULL
30 #include <deque> // for deque
31 #include <string> // for string
32 
33 class vtkTextureObject;
34 
35 class VTKRENDERINGLICOPENGL2_EXPORT vtkTextureIO
36 {
37 public:
41  static void Write(const char* filename, vtkTextureObject* texture,
42  const unsigned int* subset = nullptr, const double* origin = nullptr);
43 
47  static void Write(std::string filename, vtkTextureObject* texture,
48  const unsigned int* subset = nullptr, const double* origin = nullptr)
49  {
50  Write(filename.c_str(), texture, subset, origin);
51  }
52 
56  static void Write(std::string filename, vtkTextureObject* texture, const vtkPixelExtent& subset,
57  const double* origin = nullptr)
58  {
59  Write(filename.c_str(), texture, subset.GetDataU(), origin);
60  }
61 
65  static void Write(const char* filename, vtkTextureObject* texture,
66  const std::deque<vtkPixelExtent>& exts, const double* origin = nullptr);
67 
69 
72  static void Write(std::string filename, vtkTextureObject* texture,
73  const std::deque<vtkPixelExtent>& exts, const double* origin = nullptr)
74  {
75  Write(filename.c_str(), texture, exts, origin);
76  }
78 };
79 
80 #endif
81 // VTK-HeaderTest-Exclude: vtkTextureIO.h
static void Write(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:72
static void Write(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:56
abstracts an OpenGL texture object.
Representation of a cartesian pixel plane and common operations on it.
A small collection of I/O routines that write vtkTextureObject to disk for debugging.
Definition: vtkTextureIO.h:35
static void Write(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:47
unsigned int * GetDataU()