HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_DeepShadow.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: IMG_DeepShadow.h ( IMG Library, C++)
7  *
8  * COMMENTS: Deep shadow API
9  */
10 
11 #pragma once
12 
13 #ifndef __IMG_DeepShadow__
14 #define __IMG_DeepShadow__
15 
16 #include "IMG_API.h"
17 #include "IMG_DeepStat.h"
18 #include "IMG_FileTypes.h"
19 
20 #include <PXL/PXL_Forward.h>
21 #include <UT/UT_NonCopyable.h>
22 #include <UT/UT_Rect.h>
23 #include <UT/UT_SharedPtr.h>
24 #include <UT/UT_StringHolder.h>
25 #include <UT/UT_UniquePtr.h>
26 #include <UT/UT_ValArray.h>
27 #include <UT/UT_VectorTypes.h>
28 
29 class PXL_DeepPixel;
30 class img_DeepShadow;
31 class IMG_DeepShadow;
33 class IMG_FileParms;
34 class IMG_Format;
35 class IMG_Stat;
36 class IMG_File;
37 class UT_WorkBuffer;
38 class UT_Options;
39 
40 /// @brief Thread-safe convenience class to make reading DSM pixels easy
41 ///
42 /// This is a thread-safe convenience class to wrap around reading pixels
43 /// which ensures that the pixel is closed properly.
44 ///
45 /// @warning Beware when declaring an IMG_DeepPixelReader in the same scope
46 /// as an IMG_DeepShadow. Since the pixel reader keeps a reference to the
47 /// file, the destruction order is important -- though calling close()
48 /// should avoid any problems.
49 ///
50 /// The class should be used as follows: @code
51 ///
52 /// IMG_DeepPixelReader pixel(dsm);
53 /// for (x, y) in raster {
54 /// if (pixel.open(x, y)) {
55 /// for (int i = 0; i < pixel.getDepth(); i++)
56 /// data = pixel.getData(chp, i);
57 /// }
58 /// }
59 /// @endcode
60 ///
63 {
64 public:
66  {
67  }
69  : myHandle(nullptr)
70  {
71  init(dsm);
72  }
74  {
75  clear();
76  }
77 
79 
80  // Check to see if the deep pixel reader is valid
81  bool isValid() const { return myHandle != nullptr; }
82 
83  // Initialize given a DSM
84  void init(const IMG_DeepShadow &dsm);
85 
86  // Clear the reader handle
87  void clear();
88 
89  /// Open a pixel for reading
90  bool open(int x, int y);
91  /// Close the pixel. This is called automatically on destruction.
92  /// However, if an IMG_DeepPixelReader and IMG_DeepShadow are created in
93  /// the same scope, the IMG_DeepPixelReader may hold onto references (and
94  /// cause crashing errors). Calling close() manually is a safe thing to
95  /// do.
96  void close();
97  /// Returns the number of z-records
98  int getDepth() const;
99  /// Return the data for the channel at the given depth index.
100  const float *getData(const IMG_DeepShadowChannel &chp,
101  int depth_index);
102 
103  /// Alternately, just fill a PXL_DeepSampleList with the appropriate
104  /// data. This manages zback, coverage, flags and other special deep
105  /// channels.
106  bool readPixel(int x, int y, PXL_DeepSampleList &pixel) const;
107 
108 
109  /// After opening, you can call either of these methods to ensure that the
110  /// data is in the correct form for your application. "composited" pixels
111  /// will have the data accumulated over from front to back. "uncomposited"
112  /// pixels will have the raw data for each z-record.
113  ///
114  /// If the force flag is false, then the state of the file will be used
115  /// to determine whether the deep records need to be processed or not.
116  ///
117  /// These methods should be called after the pixel has been opened.
118  void composite(const IMG_DeepShadowChannel &pz,
119  const IMG_DeepShadowChannel &of,
120  bool force = false);
121  void uncomposite(const IMG_DeepShadowChannel &pz,
122  const IMG_DeepShadowChannel &of,
123  bool force = false);
124 
125 private:
126  class DeepShadowPixel; // Forward declaration
127  DeepShadowPixel *myHandle;
128 };
129 
130 /// @brief Thread-safe convenience class to make writing DSM pixels easy
131 ///
132 /// This is a thread-safe convenience class to wrap around writing pixels
133 /// which ensures that the pixel is closed properly.
134 ///
135 /// @warning Beware when declaring an IMG_DeepPixelReader in the same scope
136 /// as an IMG_DeepShadow. Since the pixel reader keeps a reference to the
137 /// file, the destruction order is important -- though calling close()
138 /// should avoid any problems.
139 ///
140 /// The class should be used as follows for sequential samples: @code
141 ///
142 /// IMG_DeepPixelWriter pixel(dsm);
143 /// for (x, y) in raster {
144 /// if (pixel.open(x, y)) {
145 /// for (int i = 0; i < depth; i++)
146 /// data = pixel.writeOrdered(z, data, vsize);
147 /// pixel.close();
148 /// }
149 /// }
150 /// @endcode
151 ///
154 {
155 public:
158 
160 
161  /// Ignore the desired sample compositing state in IMG_DeepShadow.
162  /// The default is to assume the incoming samples are pre-composited.
163  /// Writing raw samples will ignore compression levels, since the
164  /// compressors assume pre-composited samples.
165  void writeRawSamples(bool enable);
166 
167  /// Open a pixel for writing
168  bool open(int x, int y);
169 
170  /// Close the pixel. This is called automatically on destruction.
171  /// However, if an IMG_DeepPixelWriter and IMG_DeepShadow are created in
172  /// the same scope, the IMG_DeepPixelReader may hold onto references (and
173  /// cause crashing errors). Calling close() manually is a safe thing to
174  /// do.
175  bool close();
176 
177  /// Write data to the currently open pixel. This method inserts an
178  /// unordered data record with the given z-value and data into the
179  /// current pixel. vsize is the number of floats that are contained
180  /// in the data array.
181  ///
182  /// The first 3 floats of the data array must be the opacity (RGB). Any
183  /// extra channel data follows this according to the float_offset
184  /// associated with the channel. This data may be quantized to a single
185  /// float depending on the options.
186  ///
187  /// If @c vsize doesn't contain a full record, then this method will fail.
188  /// vsize must be greater or equal to 3 (depending on extra channels)
189  ///
190  /// Currently, mantra will always interpret the data as a rgb opacity
191  /// triple.
192  ///
193  /// The @c flags parameter is used to pass information to the
194  /// @c PXL_DeepSampleList interface. Possible values are:
195  /// - 0x00: No special meaning
196  /// - 0x01: Sample represents a volume
197  /// - 0x02: Sample is a matte surface
198  /// These values are found in the @c PXL_DeepSampleList::SampleFlag enum.
199  ///
200  /// The @c sampleid parameter specifies which pixel sample is associated
201  /// with these values (see @c sxres and @c syres on the create() method).
202  ///
203  /// The @c z value represents the "z-front" value for the depth sample.
204  /// For hard surfaces @c dz should be 0. For volumes @c dz should be set
205  /// to the extent of the volume sample so that the "z-back" data can be set
206  /// appropriately.
207  bool write(float z,
208  const float *chdata, int chsize,
209  int flags,
210  int sampleid,
211  float dz=0);
212 
213  /// Perform the same operation as write() except assume that data
214  /// is pre-sorted by increasing z-value. This method will perform
215  /// slightly better than write() as data does not need to be sorted.
216  bool writeOrdered(float z,
217  const float *chdata, int chsize,
218  int flags,
219  int sampleid,
220  float dz=0)
221  {
222  return write(z, chdata, chsize, flags, sampleid, dz);
223  }
224 
225  /// Alternatively, you can do something like: @code
226  /// PXL_DeepPixel pixel;
227  /// pixel.startPixel(x, y);
228  /// for (rec : records) pixel.store(rec);
229  /// write(pixel.closePixel(writer.compressor()));
230  /// @endcode
231  bool writePixel(int pixel_x, int pixel_y,
232  const PXL_DeepSampleListPtr &pixel);
233 
234  /// Access to the pixel compressor.
235  const PXL_DeepCompressorPtr &compressor() const { return myDeepCompressor; }
236 
237 private:
238  img_DeepShadow *myFile;
239  int myPixelX, myPixelY;
240  UT_UniquePtr<PXL_DeepPixel> myDeepPixel;
241  PXL_DeepCompressorPtr myDeepCompressor;
242  bool myWriteRaw;
243 };
244 
245 /// @brief Single channel of a Houdini DSM image
246 ///
247 /// A Houdini deep shadow/camera file can have any number of image channels
248 /// (planes). A DSM image contains a single channel for opacity. A deep
249 /// camera image has the opacity channel along with any number of extra image
250 /// channels.
252 {
253 public:
254  /// @param name The unique name of the DSM channel
255  /// @param float_offset
256  /// When data is read or written in deep shadow files, the pixel
257  /// data is interleaved. That is, the data for a single pixel can
258  /// be represented as an array of floats. Each channel has a
259  /// unique offset into the array. The user should @b not assume
260  /// that the offsets are contiguous. For example, the pixel data
261  /// might look like: @code
262  /// [ Of.r, // Opacity red
263  /// Of.g, // Opacity green
264  /// Of.b, // Opacity blue
265  /// Cf.r, // Color (red)
266  /// Cf.g, // Color (green)
267  /// Cf.b, // Color (blue)
268  /// s, // s coordinate
269  /// t, // t coordinate
270  /// N.x, // Normal x
271  /// N.y, // Normal y
272  /// N.z, // Normal z
273  /// ]
274  /// @endcode
275  /// Where the channels would be defined by: @code
276  /// IMG_DeepShadowChannel("Of", 0, 3);
277  /// IMG_DeepShadowChannel("Cf", 3, 3);
278  /// IMG_DeepShadowChannel("s", 6, 1);
279  /// IMG_DeepShadowChannel("t", 7, 1);
280  /// IMG_DeepShadowChannel("N", 8, 3);
281  /// @endcode
282  /// @param tuple_size Number of floats
283  /// @param storage
284  /// Storage type. This may be one of { "real16", "real32",
285  /// "real64" }. This value represents the storage of the channel
286  /// in the file.
287  /// @see IMG_DeepShadow::addExtraChannel()
288  IMG_DeepShadowChannel(const char *name,
289  int float_offset,
290  int tuple_size,
291  const char *storage="real32");
292 
293  bool operator==(const IMG_DeepShadowChannel &s) const;
294 
295  /// @{
296  /// Data acceess function
297  const char *getName() const { return myName.c_str(); }
298  const char *getStorage() const { return myStorage.c_str(); }
299  int getOffset() const { return myOffset; }
300  int getTupleSize() const { return myTupleSize; }
301  /// @}
302 
303 private:
304  UT_StringHolder myName;
305  UT_StringHolder myStorage;
306  int myOffset;
307  int myTupleSize;
308 };
309 
310 /// @brief Class to read or write deep shadow/camera images
311 ///
312 /// This class provides a creation interface for deep shadow maps.
313 /// The class can be used as follows: @code
314 /// setOption(...);
315 /// setOption(...);
316 /// ...
317 /// open(fname, xres, yres);
318 /// IMG_DeepPixelWriter writer;
319 /// foreach pixel loop
320 /// writer.open(pixel);
321 /// foreach record
322 /// writer.write(record);
323 /// end loop
324 /// writer.close();
325 /// end loop
326 /// close();
327 /// @endcode
328 ///
329 /// To read from an existing deep shadow map, the class can be used as
330 /// follows: @code
331 /// IMG_DeepShadow dsm;
332 /// IMG_DeepPixelReader pixel;
333 /// dsm.open(fname);
334 /// foreach (x,y) in raster:
335 /// pixel.open(x, y)
336 /// for (i = 0; i < pixel.getDepth(); i++)
337 /// pixel.getData(chp, i);
338 /// close();
339 /// @endcode
340 ///
341 /// @see
342 /// - TIL_TextureMap - for filtered evaluation of DSM/DCM's)
343 /// - IMG_DeepPixelReader - For thread-safe reading of DSM pixels
344 /// - IMG_DeepShadowChannel
346 {
347 public:
348  IMG_DeepShadow();
349  virtual ~IMG_DeepShadow();
350 
352 
353  /// Certain channel names are reserved as "special" channels. These
354  /// channels have special interpretations for deep images (i.e. "Z",
355  /// "ZBack", etc.). Each format registers their special channel names
356  static void addSpecialChannel(const UT_StringHolder &channel_name,
358  static IMG_DeepPlaneMask isSpecialChannel(const char *name);
359 
360  /// Set a file creation option. Options must be set before the
361  /// file is opened with open() below.
362  ///
363  /// Currently (and this list may be out of date), the options are:
364  /// - "ofstorage" = one of { "int8", "int16", "int32", "int64",
365  /// "uint8", "uint16", "uint32", "uint64",
366  /// "real16", "real32", "real64" }
367  /// - "pzstorage" = one of { "int8" ... "real64" }
368  /// - "ofsize" = one of { "1", "3" }
369  /// - "compression = a value between "0" and "9" (lossyness)
370  /// - "zbias" = minimum delta between z-values (float value)
371  /// - "depth_mode" = one of { "nearest", "midpoint", "farthest" }
372  /// - "depth_interp" = one of { "discrete", "continuous" }
373  /// - "compositing" = "0" will turn off pre-compositing of the z-records
374  /// This is recommended when dealing with deep camera maps (i.e. if
375  /// there are extra channels)
376  void setOption(const char *option, const UT_StringHolder &value);
377  void setOption(const char *option, fpreal value);
378  void setOption(const char *option, int64 value);
379  void setOption(const char *option, int value)
380  { setOption(option, (int64)value); }
381 
382  /// Set options based on the "texture:*" options defined in the UT_Options.
383  /// The UT_Options will be checked for options:
384  /// - @c texture:ofstorage
385  /// - @c texture:pzstorage
386  /// - @c texture:ofsize
387  /// - @c etc.
388  void setOptions(const UT_Options &options);
389 
390  /// Print the current values of the file options into the work buffer
391  void printArgs(UT_WorkBuffer &wbuf, bool json);
392 
393  /// Get a description of the available options that can be provided in
394  /// setOption()
395  const char *getDescription();
396 
397  /// Add an extra channel to be stored along with Of and Pz. Any number of
398  /// channels may be added (though the file size will increase accordingly).
399  /// - The name must be unique among (and not Of or Pz)
400  /// - The float_offset is the offset into the "data" in the
401  /// IMG_DeepPixelWriter::write() method. Note that the opacity
402  /// must occupy the first 3
403  /// floats of the data array. So, the float_offset @b must be at least 3.
404  /// - The tuple_size is the number of elements in the channel
405  /// Currently, this must be 1, 3 or 4.
406  /// - The storage specifies the storage type (and uses the same
407  /// tokens as the "ofstorage" option (i.e. int8, int16, int32, int64,
408  /// uint8, uint16, uint32, uint64, real16, real32 or real64.
409  /// The extra channels must be added @b before open() is called.
410  bool addExtraChannel(const IMG_DeepShadowChannel &def,
411  const UT_Options *options=0);
412 
413  /// Open a deep shadow map for writing. This method will return false
414  /// if there were errors opening the texture.
415  /// The resolution of the image is specified by @c xres and @c yres, while
416  /// the @c sxres and @c syres parameters specify the samples per pixel
417  /// (i.e. 3x3 sampling). The pixel_aspect is typically 1.0, while the crop
418  /// can be a NULL ptr.
419  ///
420  /// If the sample resolution is unknown, you can set @c sxres and @c syres
421  /// to 1 (the @c sampleid should be set to 0).
422  /// @{
423  bool create(const char *name, int xres, int yres,
424  int sxres, int syres,
425  float pixel_aspect = 1.0,
426  const UT_DimRect *crop = NULL);
427  bool create(
428  const char *name,
429  const IMG_Stat &stat,
430  const IMG_FileParms *options = NULL,
431  const IMG_Format *fmt = NULL);
432  ///@}
433 
434  /// Open a deep shadow map for reading.
435  bool open(const char *name);
436 
437 
438  /// These methods are now deprecated in favor of the
439  /// IMG_DeepPixelWriter class, which allows thread-safe writes to
440  /// deep images.
441  /// {
442  SYS_DEPRECATED(13.0)
443  bool pixelStart(int x, int y);
444  SYS_DEPRECATED(13.0)
445  bool pixelWrite(float z, const float *data, int vsize);
446  SYS_DEPRECATED(13.0)
447  bool pixelWriteOrdered(float z, const float *data,
448  int vsize);
449  SYS_DEPRECATED(13.0)
450  bool pixelClose();
451  /// }
452 
453  /// Close the deep shadow map and write it to disk.
454  bool close();
455 
456 public:
457 
458  /// Get the resolution of the deep shadow map.
459  void resolution(int &xres, int &yres) const;
460 
461  /// Get the number of channels in the DSM
462  int getChannelCount() const;
463 
464  /// Get a channel definition
465  const IMG_DeepShadowChannel *getChannel(int i) const;
466 
467  /// Get UT_Option structure from the file. These options are stored with
468  /// the file and may be queried in VEX using teximport().
469  UT_SharedPtr<UT_Options> getTextureOptions() const;
470 
471  /// Store the UT_Options structure in the file. These options are stored with
472  /// the file and may be queried in VEX using teximport() on load.
473  bool setTextureOptions(const UT_Options &opts);
474 
475  /// @{
476  /// Extract the worldToCamera transform from a UT_Options. Returns false
477  /// if there was no matrix available.
478  ///
479  /// This extracts the "space:world" matrix from the UT_Options.
480  static bool getWorldToCamera(const UT_Options *options,
481  UT_Matrix4F &xform);
482  static bool getWorldToCamera(const UT_Options *options,
483  UT_Matrix4D &xform);
484  template <typename T>
485  bool getWorldToCamera(UT_Matrix4T<T> &xform) const
486  { return getWorldToCamera(getTextureOptions().get(),
487  xform); }
488  /// @}
489 
490  /// @{
491  /// Get the camera's projection transform from the file options. Returns
492  /// false if there was no matrix available.
493  /// If @c fit_z is true, the projection will attempt to fit the z
494  /// coordinates to the NDC near/far to the range (0,1). If the camera:clip
495  /// option is not saved, this will not be possible (z coordinates will
496  /// remain unchanged). The method will @b not fail if there is no
497  /// camera:clip saved, but the z coordinates will have unexpected values
498  ///
499  /// The method gets the values for the projection matrix from the following
500  /// options:
501  /// - float camera:zoom
502  /// - int camera:projection (optional, defaults to 0)
503  /// - float image:pixelaspect (optional, defaults to 1)
504  /// - vector4 image:window (optional, defaults to [0, 1, 0, 1])
505  /// - vector2 camera:clip (used iff @c fit_z is true, defaults to (0,1))
506  /// - float camera:orthowidth (required iff @c projection != 0)
507  static bool getCameraToNDC(const UT_Options *options,
508  UT_Matrix4F &xform,
509  int xres, int yres,
510  bool fit_z=true);
511  static bool getCameraToNDC(const UT_Options *options,
512  UT_Matrix4D &xform,
513  int xres, int yres,
514  bool fit_z=true);
515  template <typename T>
517  bool fit_z=true) const
518  {
519  int xres, yres;
520  resolution(xres, yres);
521  return getCameraToNDC(getTextureOptions().get(),
522  xform, xres, yres, fit_z);
523  }
524  /// @}
525 
526  /// @{
527  /// Get the world to camera NDC space transform using the file options.
528  /// Returns false if there is no matrix available.
529  /// If @c fit_z is true, the projection will attempt to fit the z
530  /// coordinates to the NDC near/far to the range (0,1). If the camera:clip
531  /// option is not saved, this will not be possible (z coordinates will
532  /// remain unchanged).
533  /// @note This simply returns getWorldToCamera()*getCameraToNDC()
534  static bool getWorldToNDC(const UT_Options *options,
535  UT_Matrix4F &xform,
536  int xres, int yres, bool fit_z);
537  static bool getWorldToNDC(const UT_Options *options,
538  UT_Matrix4D &xform,
539  int xres, int yres, bool fit_z);
540  template <typename T>
542  bool fit_z) const
543  {
544  int xres, yres;
545  resolution(xres, yres);
546  return getWorldToNDC(getTextureOptions().get(),
547  xform, xres, yres, fit_z);
548  }
549  /// @}
550 
551  /// Return deep stats
552  UT_SharedPtr<IMG_DeepStat> getDeepStat() const;
553 
554  float ofBias() const;
555  float zBias() const;
556 
557  /// Return the PXL_DeepChannelList being written to the DSM
558  const PXL_DeepChannelListPtr &deepChannels() const;
559 
560  static PXL_DeepChannelListPtr deepChannels(IMG_File *fp);
561 
562  /// Return the number of samples per pixel
563  int deepSampleListsPerPixel() const;
564 
565  /// Metadata to send to deep image file
566  void setWriteTag(
567  const char *tag,
568  int datasize,
569  const char *const *data);
570 
571  bool copyImageTextureOptions(const IMG_DeepShadow &src, bool clear_existing);
572 
573 protected:
574  /// Perform all computation for creating an image, but don't actually open
575  /// the IMG_File. This can be done when you want to make sure all the deep
576  /// information is set up properly, but don't actually want to create the
577  /// image. One example of this might be when doing distributed rendering.
578  ///
579  /// This takes the same arguments as @c create().
580  bool createStat(IMG_Stat &stat,
581  const char *name, int xres, int yres,
582  int sxres, int syres,
583  float pixel_aspect,
584  const UT_DimRect *crop);
585 
586 private:
587  friend class IMG_DeepPixelReader;
588  friend class IMG_DeepPixelWriter;
589 
590  bool openPixelRead(IMG_DeepPixelReader &h, int x, int y);
591  void closePixelRead(IMG_DeepPixelReader &h);
592 
593 private:
594  friend class img_DeepShadow;
595 
596 private:
598  img_DeepShadow *myFile;
599 };
600 
601 #endif
GLbitfield flags
Definition: glcorearb.h:1596
PXL_API const char * getDescription(const ColorSpace *space)
Return the description of the color space.
#define SYS_DEPRECATED(__V__)
Thread-safe convenience class to make reading DSM pixels easy.
getFileOption("OpenEXR:storage") storage
Definition: HDK_Image.dox:276
GLsizei const GLfloat * value
Definition: glcorearb.h:824
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
Single channel of a Houdini DSM image.
const PXL_DeepCompressorPtr & compressor() const
Access to the pixel compressor.
Thread-safe convenience class to make writing DSM pixels easy.
GLdouble s
Definition: glad.h:3009
GLint y
Definition: glcorearb.h:103
Class to read or write deep shadow/camera images.
void close() override
OutGridT const XformOp bool bool
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
void setOption(const char *option, int value)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
#define IMG_API
Definition: IMG_API.h:10
const char * getName() const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
IMG_DeepPixelReader(const IMG_DeepShadow &dsm)
int open(float queuesize) override
bool getCameraToNDC(UT_Matrix4T< T > &xform, bool fit_z=true) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
int getTupleSize() const
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
IMG_DeepPlaneMask
Definition: IMG_DeepStat.h:35
long long int64
Definition: SYS_Types.h:116
HUSD_API const char * resolution()
GLuint const GLchar * name
Definition: glcorearb.h:786
GLint GLenum GLint x
Definition: glcorearb.h:409
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
A map of string to various well defined value types.
Definition: UT_Options.h:87
SIM_API const UT_StringHolder force
fpreal64 fpreal
Definition: SYS_Types.h:278
bool getWorldToNDC(UT_Matrix4T< T > &xform, bool fit_z) const
File options for manipulating image data on load or save. This class allows you to modify the incomin...
Definition: IMG_FileParms.h:39
Contains the details of a specific image file, used by IMG_File. This class contains all the high-lev...
Definition: IMG_Stat.h:38
UT_SharedPtr< PXL_DeepCompressor > PXL_DeepCompressorPtr
Definition: PXL_Forward.h:26
const char * getStorage() const
ImageBuf OIIO_API crop(const ImageBuf &src, ROI roi={}, int nthreads=0)
bool writeOrdered(float z, const float *chdata, int chsize, int flags, int sampleid, float dz=0)
Definition: format.h:1821
GLenum src
Definition: glcorearb.h:1793