VTK
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 "vtkRenderingLICOpenGL2Module.h" // for export
26 #include "vtkPixelExtent.h" // for pixel extent
27 
28 // included vtkSystemIncludes in vtkPixelExtent
29 #include <cstddef> // for NULL
30 #include <string> // for string
31 #include <deque> // for deque
32 
33 class vtkTextureObject;
34 
35 class VTKRENDERINGLICOPENGL2_EXPORT vtkTextureIO
36 {
37 public:
41  static void Write(
42  const char *filename,
43  vtkTextureObject *texture,
44  const unsigned int *subset=nullptr,
45  const double *origin=nullptr);
46 
50  static void Write(
51  std::string filename,
52  vtkTextureObject *texture,
53  const unsigned int *subset=nullptr,
54  const double *origin=nullptr)
55  {
56  Write(filename.c_str(), texture, subset, origin);
57  }
58 
62  static void Write(
63  std::string filename,
64  vtkTextureObject *texture,
65  const vtkPixelExtent &subset,
66  const double *origin=nullptr)
67  {
68  Write(filename.c_str(), texture, subset.GetDataU(), origin);
69  }
70 
74  static void Write(
75  const char *filename,
76  vtkTextureObject *texture,
77  const std::deque<vtkPixelExtent> &exts,
78  const double *origin=nullptr);
79 
81 
84  static void Write(
85  std::string filename,
86  vtkTextureObject *texture,
87  const std::deque<vtkPixelExtent> &exts,
88  const double *origin=nullptr)
89  {
90  Write(filename.c_str(),texture,exts,origin);
91  }
92 };
94 
95 #endif
96 // 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:84
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:62
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:50
unsigned int * GetDataU()