HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PXL_Raster.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: PXL_Raster.h (Pixel Library, C++)
7  *
8  * COMMENTS:
9  * Defines a more generic raster for texture maps & display.
10  *
11  */
12 #ifndef PXL_RASTER_H
13 #define PXL_RASTER_H
14 
15 #include "PXL_API.h"
16 #include "PXL_Common.h"
17 #include <UT/UT_Rect.h>
18 #include <UT/UT_SmallObject.h>
19 #include <UT/UT_StringHolder.h>
20 #include <UT/UT_UniquePtr.h>
21 #include <SYS/fpreal16Limits.h>
22 #include <SYS/SYS_TypeTraits.h>
23 #include <iosfwd>
24 #include <limits>
25 
26 class UT_IStream;
27 
28 #define PXL_ROFF 0
29 
34 };
35 
37  : public UT_SmallObject<PXL_Raster,
38  UT_SMALLOBJECT_CLEANPAGES_OFF, 250,
39  UT_SMALLOBJECT_THREADSAFE_ON>
40 {
41 public:
42  PXL_Raster();
43  PXL_Raster(const PXL_Raster &);
44  PXL_Raster(const PXL_Raster &,
45  exint x1, exint y1, exint x2, exint y2);
47  exint xres = 0, exint yres = 0, int clear = 0,
48  int alloc = 1);
49  virtual ~PXL_Raster();
50 
51  virtual int64 getMemoryUsage(bool inclusive) const;
52 
53  enum class Visualization
54  {
55  NONE,
56  SDF,
57  RANDOMID,
58  IMAGECOORD,
59  HUENML,
60  HUEVEL
61  };
62 
63 
64  /// Assignment disallowed, use copy() instead. @see copyProperties()
65  PXL_Raster& operator=(const PXL_Raster &) = delete;
66 
67  /// Copy over all the information and data from the src. This allocates a
68  /// new raster (rather than doing a shallow copy).
69  virtual void copy(const PXL_Raster &src);
70 
71  /// copies only the raster properties (res, type, etc), not the data, nor
72  /// does this method allocate memory for a raster.
73  virtual void copyProperties(const PXL_Raster &src);
74 
75  // initializes the raster (destroys any previous image data). If you call
76  // any of these methods, call init() after to reallocate the raster.
77  void setPacking(PXL_Packing p);
78  void setFormat(PXL_DataFormat f);
79  void setRes(exint x, exint y);
80  void setBWPoints(float black, float white);
81 
82 
83  /// Visualization of the raster, which does not affect the raster
84  /// but is hint for how to display it.
85  void setVisualization(Visualization vis) { myVis = vis; }
86  Visualization getVisualization() const { return myVis; }
87 
88  /// Colorspace that this raster is in. Changing the color space does not
89  /// affect the image values stored in this raster, only how they are
90  /// interpreted. custom_gamma must be specified for PXL_CS_CUSTOM_GAMMA.
91  void setColorSpace(PXL_ColorSpace space,
92  fpreal custom_gamma = 0.0);
93  void setOCIOColorSpace(const UT_StringHolder &space);
94  void setOCIODisplayView(const UT_StringHolder &baked_display,
95  const UT_StringHolder &baked_view);
96  void setOCIOParms(const UT_StringHolder &color_space,
97  const UT_StringHolder &baked_display,
98  const UT_StringHolder &baked_view);
99 
100  void init();
101 
102  // sets the raster data to r, optionally giving this class ownership of it.
103  // make sure it's the right packing type, res & format!
104  void setRaster(void *r, bool give_ownership = true,
105  bool use_offset = false);
106 
107  // steals ownership from this raster. Returns NULL if this raster doesn't
108  // own the image.
109  void * steal();
110 
111  // packing, format & xres/yres must be set for the raster to be valid.
112  int isValid() const { return myRaster ? 1 : 0; }
113  // accessers.
114  exint getXres() const { return myXres; }
115  exint getYres() const { return myYres; }
116  exint getNumPixels() const { return myXres * myYres; }
117  int64 getStride() const { return myStride; }
118  int64 getSize() const { return myRasterSize; } // bytes
119  PXL_DataFormat getFormat() const { return myFormat; }
120  PXL_Packing getPacking() const { return myPacking; }
121  void getBWPoints(float &black, float &white) const;
122  int getNumChannels() const
123  { return PXLpackingComponents(myPacking); }
124 
125  // Rotation of the raster. Must be between [-360, 360] in 90 degree increments
126  void setRotation(int rotation);
127  int getRotation() const { return myRotation; }
128  bool isRotated() const { return myRotation != 0; }
129 
130  // Raster width and height taking the rotation into consideration
131  exint getCorrectedXres() const;
132  exint getCorrectedYres() const;
133 
134  /// Colorspace this raster requires for correct display
135  PXL_ColorSpace getColorSpace() const { return myColorSpace; }
136 
137  /// Gamma that must be applied to this raster to get accurate color. Only
138  /// valid for PXL_CS_LINEAR, PXL_CS_GAMMA2_2, and PXL_CS_CUSTOM_GAMMA.
139  fpreal getColorSpaceGamma() const { return myColorSpaceGamma; }
140  /// OCIO colorspace name, valid for PXL_CS_OCIO
141  const UT_StringHolder &getColorSpaceName() const { return myColorSpaceName;}
142  const UT_StringHolder &getOCIODisplay() const { return myOCIODisplay;}
143  const UT_StringHolder &getOCIOView() const { return myOCIOView; }
144 
145  // data window
146  void setDataWindow(const UT_DimRect &new_rect);
147  const UT_DimRect & getDataWindow() const
148  { return myDataWindow; }
149  bool hasDataWindow() const
150  { return !myDataWindow.isEmpty(); }
151 
152  // returns the min/max values. black & white specify the black & white
153  // of the raster, comp specifies an optional component to get the range
154  // from. If ignore_farthest is true, 'max' will contain the 2nd largest
155  // value. Good for ignoring the background.
156  void getRange(float &min, float &max,
157  float black = 0.0f, float white = 1.0f,
158  exint comp = -1,
159  bool ignore_farthest = false) const;
160 
161  // leave 2 pixels to draw grey single channels (R,G,B)
162  void * getPixels()
163  { return (unsigned char *)myRaster+myRasterOffset; }
164 
165  const void * getPixels() const
166  { return (unsigned char *)myRaster+myRasterOffset; }
167 
168  // this is for drawing single greyscale R,G,B images.
169  const void * getRawPixels() const
170  { return myRaster; }
171 
172  // x/y coords, + comp# for Non-interleaved data (0-2 for RGB, 0-3 RGBA).
173  void * getPixel(exint x, exint y, exint comp = 0);
174  const void * getPixel(exint x, exint y, exint comp = 0) const;
175 
176  void setPixelValue(exint x, exint y, const float *vals);
177  void setPixelValueI(exint x, exint y, exint val);
178  void getPixelValue(exint x, exint y, float *vals) const;
179 
180  // returns 1 if interleaved (RGBRGB), 0 otherwise.
181  bool isInterleaved() const;
182 
183  // returns 1 if this raster can have its components rendered separately.
184  int areComponentsRenderable() const;
185 
186  // if not interleaved, returbs the size of 1 channel's data.
187  int64 getNonInterleavedSize() const;
188 
189  // simple operations.
190 
191  // clears the raster to 0, unless color is not null; it assumes it points
192  // to 8/16/32 bit int or float single/triple/quad value, depending on
193  // packing type & data format.
194  void clear(const void *color = 0);
195  void clearNormal(const float *color,
196  unsigned ib = 0,
197  unsigned iw = 0);
198 
199 
200  // reads a scanline from the raster. THe buffer must be big enough to
201  // hold a single scanline at the data format and packing of the raster.
202  void readFromRow(exint y, void *data) const;
203 
204  // Writes a scanline to the raster. The data format and packing are
205  // assumed to match the raster's.
206  void writeToRow(exint y, const void *data);
207 
208  // instead of writing a scanline, this writes a column of data. The
209  // data format and packing are assumed to match the raster's, and
210  // have yres pixels. Useful for flopping images.
211  void writeToColumn(exint x, const void *data);
212 
213  // deletes the image memory. If full = 1, everything is reset - xres/yres
214  // to 0, packing and format to invalid.
215  virtual void reset(int full = 0);
216 
217  // Extracts a portion of the image 'from' into this raster, setting the
218  // res, data format and packing if needed.
219  void extract(const PXL_Raster &from,
220  exint x1, exint y1, exint x2, exint y2);
221 
222  // Inserts a portion of the image 'from' into this raster. The res,
223  // data format and packing must match.
224  void insert(const PXL_Raster &from,exint x, exint y);
225 
226  // If RGB, add an Alpha channel to this raster.
227  void promoteRGBToRGBA(fpreal alpha = 1.0);
228  // If RGB, add an Alpha channel to dest, or create dest if it doesn't exist.
229  // returns false if no conversion was needed.
230  bool promoteRGBToRGBA(UT_UniquePtr<PXL_Raster> &dest,
231  fpreal alpha = 1.0) const;
232 
233  void applyLUT(const PXL_Raster *src, float *lptr[4],
234  exint comp, float lstart, float lend);
235 
236  // of the raster. The rectangle can go outside of the raster.
237  void streakEdges(exint x1,exint y1, exint x2,exint y2,
238  PXL_StreakComponents streak_comps = PXL_STREAK_ALL);
239  void convert8Bit(unsigned b, unsigned w);
240 
241  void adjustSaturation(float sat);
242 
243  // flip the raster in-place
244  void flipVertical();
245 
246  bool load(UT_IStream &is);
247  int save(std::ostream &os, int binary = 1) const;
248 
249  int getProxyIndex() const { return myProxyIndex; }
250 
251  void setDataWritten(bool written = true)
252  { myWriteFlag = written; }
253  bool getDataWritten() const { return myWriteFlag; }
254 
255  void setTextureID(void *id) { myTextureID = id; }
256  void *getTextureID() const;
257  void clearTextureID();
258  void setManagesOwnTextureID(bool manages_own)
259  { myManagesOwnTextureID = manages_own; }
260  bool managesOwnTextureID() const
261  { return myManagesOwnTextureID; }
262 
263  // dither the image in a subdued way for mplay's render over previous.
264  // If a crop region is provided, only pixels inside the crop will be
265  // dimmed.
266  void dither(const UT_DimRect &crop);
267  void dither();
268 
269  bool premultiply(const PXL_Raster *other = nullptr);
270  bool unpremultiply(const PXL_Raster *other = nullptr);
271 
272  bool hasAlpha() const;
273 
274  bool clampAlpha();
275 
276  void addInterest(void *callerData,
277  void (*changeCB)(PXL_Raster *, void *));
278  void removeInterest();
279 
280 protected:
281  virtual void initialize();
282  bool allocRaster(int alloc_mem = 1);
283  void freeRaster();
284 
285  void applyLUT8(const PXL_Raster *src, float *lptr[4],
286  exint comp, float lscale, float lshift,
287  exint size);
288  void applyLUT16(const PXL_Raster *src, float *lptr[4],
289  exint comp, float lscale, float lshift,
290  exint size);
291 
292  virtual void attemptRealloc(int64 size);
293 
303  exint myXres, myYres;
306  float myBlack, myWhite;
308  void *myRaster;
309  bool myAmOwner;
313  void *myTextureID;
314  void (*myChangeCB)(PXL_Raster *, void *);
316 
317  UT_DimRect myDataWindow; // (0,0) is lower-left corner
318 };
319 
320 /// This is a wrapper for when the PXL_DataFormat and PXL_Packing are known
321 /// at compile-time, e.g. constructing this inside a branch of a switch
322 /// statement over all types.
323 template<typename T, int NCOMPONENTS, bool INTERLEAVED, bool READ_ONLY>
325 {
326 public:
329 
331  {
332  UT_ASSERT_COMPILETIME(NCOMPONENTS >= 1 && NCOMPONENTS <= 4);
334 
335  setRaster(raster);
336  }
337 
339  {
341  }
342 
344  {
345  return myRaster;
346  }
347 
349  {
350  return myRaster->getXres();
351  }
353  {
354  return myRaster->getYres();
355  }
356 
358  {
359  myRaster = raster;
360  if (!raster)
361  return;
362 
363  UT_ASSERT(PXLpackingComponents(raster->getPacking()) == NCOMPONENTS);
364  UT_ASSERT(NCOMPONENTS==1 || raster->isInterleaved() == INTERLEAVED);
365  UT_ASSERT(sizeof(T) == PXLformatDepth(raster->getFormat()));
367  raster->getFormat() == PXL_INT8 ||
368  raster->getFormat() == PXL_INT16 ||
369  raster->getFormat() == PXL_INT32));
370  UT_ASSERT(raster->getRawPixels() != nullptr);
371  }
372 
373  DataType *getPixel(exint x, exint y, exint comp = 0) const
374  {
375  UT_ASSERT_P(myRaster);
376  if (!myRaster)
377  return nullptr;
378  const exint xres = myRaster->getXres();
379  const exint yres = myRaster->getYres();
380  if (x < 0 || y < 0 || x >= xres || y >= yres || !myRaster->getRawPixels())
381  return nullptr;
382 
383  const exint stride = myRaster->getStride();
384  int64 offset;
385  if (NCOMPONENTS==1)
386  offset = x*sizeof(T) + y * stride;
387  else if (INTERLEAVED)
388  offset = (comp+x*NCOMPONENTS)*sizeof(T) + y * stride;
389  else
390  offset = x *sizeof(T) + (y + comp*yres) * stride;
391 
392  return (DataType *)(((typename SYS_ConstType<unsigned char,READ_ONLY>::type *)myRaster->getPixels()) + offset);
393  }
394 
395  SYS_FORCE_INLINE DataType *getPixelFast(void *pixels, exint x, exint y/*, exint comp = 0*/) const
396  {
397  UT_ASSERT_P(myRaster);
398  const exint stride = myRaster->getStride();
399  int64 offset;
400  if (NCOMPONENTS==1)
401  offset = x*sizeof(T) + y * stride;
402  else if (INTERLEAVED)
403  offset = (/*comp+*/x*NCOMPONENTS)*sizeof(T) + y * stride;
404  else
405  offset = x *sizeof(T) + (y /*+ comp*myRaster->getYres()*/) * stride;
406  return (DataType *)(((typename SYS_ConstType<unsigned char,READ_ONLY>::type *)pixels) + offset);
407  }
408 
409  SYS_FORCE_INLINE void getPixelValueFast(const void *pixels, exint x, exint y, float *vals) const
410  {
411  // const even if READ_ONLY is false
412  const DataType *data = getPixelFast(pixels, x, y);
413  if (INTERLEAVED || NCOMPONENTS==1)
414  {
415  for (int i = 0; i < NCOMPONENTS; ++i)
416  {
418  vals[i] = float(data[i])/float(std::numeric_limits<T>::max());
419  else
420  vals[i] = float(data[i]);
421  }
422  }
423  else
424  {
425  const exint yres_stride = myRaster->getYres()*myRaster->getStride();
426  for (int i = 0; i < NCOMPONENTS; ++i,
427  data = (const DataType *)(((const unsigned char *)data) + yres_stride))
428  {
430  vals[i] = float(*data)/float(std::numeric_limits<T>::max());
431  else
432  vals[i] = float(*data);
433  }
434  }
435  }
436 
438  {
439  UT_ASSERT_P(!READ_ONLY);
440 
441  DataType *data = getPixelFast(pixels, x, y);
442  if (INTERLEAVED || NCOMPONENTS==1)
443  {
444  for (int i = 0; i < NCOMPONENTS; ++i)
445  data[i] = T(0);
446  }
447  else
448  {
449  const exint yres_stride = myRaster->getYres()*myRaster->getStride();
450  for (int i = 0; i < NCOMPONENTS; ++i,
451  data = (DataType *)(((typename SYS_ConstType<unsigned char,READ_ONLY>::type *)data) + yres_stride))
452  {
453  *data = T(0);
454  }
455  }
456  }
457 
459  {
461  return T(val * std::numeric_limits<T>::max());
462  else
463  return T(val);
464  }
465 
466  SYS_FORCE_INLINE void setPixelValueFast(void *pixels, exint x, exint y, const T *vals) const
467  {
468  UT_ASSERT_P(!READ_ONLY);
469 
470  DataType *data = getPixelFast(pixels, x, y);
471  if (INTERLEAVED || NCOMPONENTS==1)
472  {
473  for (int i = 0; i < NCOMPONENTS; ++i)
474  data[i] = vals[i];
475  }
476  else
477  {
478  const exint yres_stride = myRaster->getYres()*myRaster->getStride();
479  for (int i = 0; i < NCOMPONENTS; ++i,
480  data = (DataType *)(((typename SYS_ConstType<unsigned char,READ_ONLY>::type *)data) + yres_stride))
481  {
482  *data = vals[i];
483  }
484  }
485  }
486 
487 private:
488  RasterType *myRaster;
489 };
490 
491 #endif
SYS_FORCE_INLINE DataType * getPixelFast(void *pixels, exint x, exint y) const
Definition: PXL_Raster.h:395
void * getPixels()
Definition: PXL_Raster.h:162
SYS_FORCE_INLINE void getPixelValueFast(const void *pixels, exint x, exint y, float *vals) const
Definition: PXL_Raster.h:409
int PXLpackingComponents(PXL_Packing p)
Definition: PXL_Common.h:126
fpreal myColorSpaceGamma
Definition: PXL_Raster.h:297
UT_ASSERT_COMPILETIME(BRAY_EVENT_MAXFLAGS<=32)
SYS_FORCE_INLINE exint getYres() const
Definition: PXL_Raster.h:352
void * myTextureID
Definition: PXL_Raster.h:313
bool myManagesOwnTextureID
Definition: PXL_Raster.h:312
exint getYres() const
Definition: PXL_Raster.h:115
int getNumChannels() const
Definition: PXL_Raster.h:122
int getRotation() const
Definition: PXL_Raster.h:127
void setTextureID(void *id)
Definition: PXL_Raster.h:255
void
Definition: png.h:1083
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
PXL_DataFormat myFormat
Definition: PXL_Raster.h:294
exint myRasterOffset
Definition: PXL_Raster.h:302
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
UT_StringHolder myColorSpaceName
Definition: PXL_Raster.h:299
PXL_ColorSpace getColorSpace() const
Colorspace this raster requires for correct display.
Definition: PXL_Raster.h:135
const void * getRawPixels() const
Definition: PXL_Raster.h:169
bool_constant< is_integral< T >::value &&!std::is_same< T, bool >::value &&!std::is_same< T, char >::value &&!std::is_same< T, wchar_t >::value > is_integer
Definition: format.h:2010
int64 exint
Definition: SYS_Types.h:125
fpreal getColorSpaceGamma() const
Definition: PXL_Raster.h:139
const UT_StringHolder & getOCIODisplay() const
Definition: PXL_Raster.h:142
const UT_StringHolder & getOCIOView() const
Definition: PXL_Raster.h:143
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
Definition: glcorearb.h:108
GLint y
Definition: glcorearb.h:103
bool myWriteFlag
Definition: PXL_Raster.h:311
std::integral_constant< bool, std::numeric_limits< T >::is_signed||std::is_same< T, int128_t >::value > is_signed
Definition: format.h:821
OIIO_FORCEINLINE vbool4 insert(const vbool4 &a, bool val)
Helper: substitute val for a[i].
Definition: simd.h:3436
bool getDataWritten() const
Definition: PXL_Raster.h:253
SYS_FORCE_INLINE PXL_RasterWrapper< T, NCOMPONENTS, INTERLEAVED, true > makeConstant() const
Definition: PXL_Raster.h:338
#define PXL_API
Definition: PXL_API.h:10
void * myRaster
Definition: PXL_Raster.h:308
GLdouble GLdouble x2
Definition: glad.h:2349
PXL_DataFormat getFormat() const
Definition: PXL_Raster.h:119
int64 myStride
Definition: PXL_Raster.h:304
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
#define UT_ASSERT_MSG(ZZ,...)
Definition: UT_Assert.h:159
OIIO_FORCEINLINE bool extract(const vbool4 &a)
Definition: simd.h:3426
SYS_FORCE_INLINE exint getXres() const
Definition: PXL_Raster.h:348
GLfloat f
Definition: glcorearb.h:1926
GLintptr offset
Definition: glcorearb.h:665
PXL_ColorSpace myColorSpace
Definition: PXL_Raster.h:296
PXL_Packing getPacking() const
Definition: PXL_Raster.h:120
IMATH_NAMESPACE::V2f float
GLboolean reset
Definition: glad.h:5138
bool myAmOwner
Definition: PXL_Raster.h:309
exint getNumPixels() const
Definition: PXL_Raster.h:116
#define UT_ASSERT_P(ZZ)
Definition: UT_Assert.h:155
SYS_FORCE_INLINE void setRaster(RasterType *raster)
Definition: PXL_Raster.h:357
int isValid() const
Definition: PXL_Raster.h:112
bool isRotated() const
Definition: PXL_Raster.h:128
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
GLint GLenum GLboolean GLsizei stride
Definition: glcorearb.h:872
GLdouble y1
Definition: glad.h:2349
SYS_ConstType< T, READ_ONLY >::type DataType
Definition: PXL_Raster.h:328
float myWhite
Definition: PXL_Raster.h:306
PXL_Packing
Definition: PXL_Common.h:32
bool isInterleaved() const
HUSD_API const char * raster()
UT_StringHolder myOCIOView
Definition: PXL_Raster.h:301
long long int64
Definition: SYS_Types.h:116
GLuint id
Definition: glcorearb.h:655
bool managesOwnTextureID() const
Definition: PXL_Raster.h:260
GLfloat GLfloat GLfloat alpha
Definition: glcorearb.h:112
SIM_API const UT_StringHolder rotation
int myProxyIndex
Definition: PXL_Raster.h:310
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition: logging.h:294
bool hasDataWindow() const
Definition: PXL_Raster.h:149
int64 myRasterSize
Definition: PXL_Raster.h:305
PXL_DataFormat
Definition: PXL_Common.h:20
Visualization myVis
Definition: PXL_Raster.h:298
static SYS_FORCE_INLINE T convertFromFloat(const float val)
Definition: PXL_Raster.h:458
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
const UT_DimRect & getDataWindow() const
Definition: PXL_Raster.h:147
GLint GLenum GLint x
Definition: glcorearb.h:409
const void * getPixels() const
Definition: PXL_Raster.h:165
SYS_FORCE_INLINE RasterType * getRaster() const
Definition: PXL_Raster.h:343
exint myYres
Definition: PXL_Raster.h:303
const UT_StringHolder & getColorSpaceName() const
OCIO colorspace name, valid for PXL_CS_OCIO.
Definition: PXL_Raster.h:141
int64 getStride() const
Definition: PXL_Raster.h:117
GLsizeiptr size
Definition: glcorearb.h:664
Visualization getVisualization() const
Definition: PXL_Raster.h:86
GLuint color
Definition: glcorearb.h:1261
fpreal64 fpreal
Definition: SYS_Types.h:277
LeafData & operator=(const LeafData &)=delete
int64 getSize() const
Definition: PXL_Raster.h:118
void * myCallerData
Definition: PXL_Raster.h:315
PXL_ColorSpace
Definition: PXL_Common.h:72
GLuint GLfloat * val
Definition: glcorearb.h:1608
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
int PXLformatDepth(PXL_DataFormat d)
Definition: PXL_Common.h:123
void setVisualization(Visualization vis)
Definition: PXL_Raster.h:85
int myRotation
Definition: PXL_Raster.h:307
PXL_Packing myPacking
Definition: PXL_Raster.h:295
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
int getProxyIndex() const
Definition: PXL_Raster.h:249
void setDataWritten(bool written=true)
Definition: PXL_Raster.h:251
GLboolean r
Definition: glcorearb.h:1222
GLdouble GLdouble GLdouble y2
Definition: glad.h:2349
void setManagesOwnTextureID(bool manages_own)
Definition: PXL_Raster.h:258
ImageBuf OIIO_API crop(const ImageBuf &src, ROI roi={}, int nthreads=0)
SYS_ConstType< PXL_Raster, READ_ONLY >::type RasterType
Definition: PXL_Raster.h:327
PXL_StreakComponents
Definition: PXL_Raster.h:30
SYS_FORCE_INLINE void zeroPixelValueFast(void *pixels, exint x, exint y) const
Definition: PXL_Raster.h:437
exint getXres() const
Definition: PXL_Raster.h:114
DataType * getPixel(exint x, exint y, exint comp=0) const
Definition: PXL_Raster.h:373
SYS_FORCE_INLINE PXL_RasterWrapper(RasterType *raster=nullptr)
Definition: PXL_Raster.h:330
UT_StringHolder myOCIODisplay
Definition: PXL_Raster.h:300
Definition: format.h:895
SYS_FORCE_INLINE void setPixelValueFast(void *pixels, exint x, exint y, const T *vals) const
Definition: PXL_Raster.h:466
UT_DimRect myDataWindow
Definition: PXL_Raster.h:317
GLenum src
Definition: glcorearb.h:1793