13 #ifndef __IMG_DeepShadow__
14 #define __IMG_DeepShadow__
80 bool isValid()
const {
return myHandle !=
nullptr; }
125 class DeepShadowPixel;
126 DeepShadowPixel *myHandle;
164 void writeRawSamples(
bool enable);
207 const float *chdata,
int chsize,
216 const float *chdata,
int chsize,
221 return write(z, chdata, chsize, flags, sampleid, dz);
230 bool writePixel(
int pixel_x,
int pixel_y,
237 img_DeepShadow *myFile;
238 int myPixelX, myPixelY;
296 const char *
getName()
const {
return myName.c_str(); }
376 void setOption(
const char *option,
fpreal value);
377 void setOption(
const char *option,
int64 value);
379 { setOption(option, (
int64)value); }
422 bool create(
const char *name,
int xres,
int yres,
423 int sxres,
int syres,
424 float pixel_aspect = 1.0,
434 bool open(
const char *name);
442 bool pixelStart(
int x,
int y);
444 bool pixelWrite(
float z, const
float *
data,
int vsize);
446 bool pixelWriteOrdered(
float z, const
float *data,
461 int getChannelCount() const;
472 bool setTextureOptions(const
UT_Options &opts);
479 static
bool getWorldToCamera(const
UT_Options *options,
481 static
bool getWorldToCamera(const
UT_Options *options,
483 template <typename
T>
485 {
return getWorldToCamera(getTextureOptions().
get(),
506 static bool getCameraToNDC(
const UT_Options *options,
510 static bool getCameraToNDC(
const UT_Options *options,
514 template <
typename T>
516 bool fit_z=
true)
const
520 return getCameraToNDC(getTextureOptions().
get(),
521 xform, xres, yres, fit_z);
533 static bool getWorldToNDC(
const UT_Options *options,
535 int xres,
int yres,
bool fit_z);
536 static bool getWorldToNDC(
const UT_Options *options,
538 int xres,
int yres,
bool fit_z);
539 template <
typename T>
545 return getWorldToNDC(getTextureOptions().
get(),
546 xform, xres, yres, fit_z);
553 float ofBias()
const;
560 int deepSampleListsPerPixel()
const;
566 const char *
const *
data);
578 const char *name,
int xres,
int yres,
579 int sxres,
int syres,
591 friend class img_DeepShadow;
595 img_DeepShadow *myFile;
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
GLdouble GLdouble GLdouble z
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.
Class to read or write deep shadow/camera images.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
void setOption(const char *option, int value)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
const char * getName() const
IMG_DeepPixelReader(const IMG_DeepShadow &dsm)
bool getCameraToNDC(UT_Matrix4T< T > &xform, bool fit_z=true) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
HUSD_API const char * resolution()
GLuint const GLchar * name
GLfloat GLfloat GLfloat GLfloat h
A map of string to various well defined value types.
SIM_API const UT_StringHolder force
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...
Contains the details of a specific image file, used by IMG_File. This class contains all the high-lev...
UT_SharedPtr< PXL_DeepCompressor > PXL_DeepCompressorPtr
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)