9 #ifndef __HOM_ImageLayer_h__
10 #define __HOM_ImageLayer_h__
23 #include <hboost/any.hpp>
57 InterpreterObject
type, InterpreterObject
value,
58 InterpreterObject traceback)
63 virtual void close() = 0;
73 virtual int channelCount()
const = 0;
74 virtual void setChannelCount(
int chan) = 0;
76 virtual std::vector<int> bufferResolution()
const = 0;
78 virtual bool onCPU()
const = 0;
79 virtual bool onGPU()
const = 0;
80 virtual bool isConstant()
const = 0;
81 virtual bool storesIntegers()
const = 0;
82 virtual bool isMetadataOnly()
const = 0;
83 virtual void setIsMetadataOnly(
bool v) = 0;
85 virtual void makeConstant(std::vector<double>
val) = 0;
86 virtual void expandConstant() = 0;
91 virtual std::vector<double> pixelScale()
const = 0;
93 virtual void setDataWindow(
int x,
int y,
int w,
int h) = 0;
94 virtual void setDisplayWindow(
double x,
double y,
double w,
double h) = 0;
95 virtual void setPixelAspectRatio(
double aspect) = 0;
96 virtual void setPixelScale(std::vector<double>
scale) = 0;
102 virtual double aperture()
const = 0;
103 virtual double focalLength()
const = 0;
104 virtual std::vector<double> cameraPosition()
const = 0;
105 virtual double fStop()
const = 0;
106 virtual std::vector<double> clippingRange()
const = 0;
107 virtual double focusDistance()
const = 0;
108 virtual double imagingDistance()
const = 0;
109 virtual std::vector<double> shutter()
const = 0;
110 virtual double guideScale()
const = 0;
113 virtual void setAperture(
double aperture) = 0;
114 virtual void setFocalLength(
double focal) = 0;
115 virtual void setCameraPosition(std::vector<double> pos) = 0;
116 virtual void setFStop(
double fstop) = 0;
117 virtual void setClippingRange(std::vector<double>
range) = 0;
118 virtual void setFocusDistance(
double focus) = 0;
119 virtual void setImagingDistance(
double imagingdist) = 0;
120 virtual void setShutter(std::vector<double> shutter) = 0;
121 virtual void setGuideScale(
double scale) = 0;
123 virtual void setImageToWorldTransform(
const HOM_Matrix4&) = 0;
126 virtual HOM_Matrix4 projectionTransform()
const = 0;
127 virtual HOM_Matrix4 imageToWorldTransform()
const = 0;
129 virtual std::vector<double> imageToPixelScale()
const = 0;
130 virtual std::vector<double> imageToPixelTranslate()
const = 0;
131 virtual std::vector<double> imageToBufferScale()
const = 0;
132 virtual std::vector<double> imageToBufferTranslate()
const = 0;
134 virtual std::vector<double> bufferToPixelScale()
const = 0;
135 virtual std::vector<double> bufferToPixelTranslate()
const = 0;
137 virtual std::vector<double> textureToBufferScale()
const = 0;
142 virtual std::vector<double> imageToPixel(std::vector<double> p)
const = 0;
143 virtual std::vector<double> imageToBuffer(std::vector<double> p)
const = 0;
144 virtual std::vector<double> imageToTexture(std::vector<double> p)
const = 0;
145 virtual std::vector<double> imageToWorld(std::vector<double> p)
const = 0;
146 virtual std::vector<double> image3ToWorld(std::vector<double> p)
const = 0;
147 virtual std::vector<double> imageToLocal(std::vector<double> p)
const = 0;
148 virtual std::vector<double> image3ToLocal(std::vector<double> p)
const = 0;
149 virtual std::vector<double> pixelToImage(std::vector<double> p)
const = 0;
150 virtual std::vector<double> pixelToBuffer(std::vector<double> p)
const = 0;
151 virtual std::vector<double> pixelToTexture(std::vector<double> p)
const = 0;
152 virtual std::vector<double> bufferToPixel(std::vector<double> p)
const = 0;
153 virtual std::vector<double> bufferToImage(std::vector<double> p)
const = 0;
154 virtual std::vector<double> bufferToTexture(std::vector<double> p)
const = 0;
155 virtual std::vector<double> textureToPixel(std::vector<double> p)
const = 0;
156 virtual std::vector<double> textureToImage(std::vector<double> p)
const = 0;
157 virtual std::vector<double> textureToBuffer(std::vector<double> p)
const = 0;
158 virtual std::vector<double> worldToBuffer(std::vector<double> p)
const = 0;
159 virtual std::vector<double> worldToImage(std::vector<double> p)
const = 0;
160 virtual std::vector<double> worldToImage3(std::vector<double> p)
const = 0;
161 virtual std::vector<double> worldToLocal(std::vector<double> p)
const = 0;
162 virtual std::vector<double> localToImage(std::vector<double> p)
const = 0;
163 virtual std::vector<double> localToImage3(std::vector<double> p)
const = 0;
164 virtual std::vector<double> localToWorld(std::vector<double> p)
const = 0;
168 virtual std::vector<float> bufferIndexV4(
int x,
int y)
const = 0;
169 virtual int bufferIndexI(
int x,
int y)
const = 0;
174 virtual void setBufferIndex(
int x,
int y,
hboost::any rgba) = 0;
175 virtual void setBufferIndexI(
int x,
int y,
int id) = 0;
176 virtual void setBufferIndexV4(
int x,
int y, std::vector<double> rgba) = 0;
180 virtual bool isFrozen()
const = 0;
182 virtual std::map<std::string, hboost::any> properties()
const = 0;
183 virtual void setProperties(
const std::map<std::string, hboost::any> &p) = 0;
184 virtual void updateProperties(
const std::map<std::string, hboost::any> &p) = 0;
187 virtual std::map<std::string, hboost::any> attributes()
const = 0;
188 virtual void setAttributes(
const std::map<std::string, hboost::any> &p) = 0;
189 virtual void updateAttributes(
const std::map<std::string, hboost::any> &p) = 0;
197 void setAllBufferElements(InterpreterObject
values)
199 HOM_PyBuffer
buffer(values);
200 self->opaqueSetAllBufferElements(
211 HOM_PyBuffer
buffer(values);
212 self->opaqueSetAllBufferElements(
214 storagetype, channels);
220 virtual void opaqueSetAllBufferElements(
const char *values,
int64 length,
224 virtual void opaqueSetAllBufferElements(
const char *values,
int64 length) = 0;
227 virtual hboost::any computeMin(
int channel = 0)
const = 0;
228 virtual hboost::any computeMax(
int channel = 0)
const = 0;
231 virtual double computeAverage(
int channel = 0)
const = 0;
virtual HOM_ImageLayer * newImageLayer(HOM_ImageLayer *layer=nullptr)=0
#define HOM_DESTRUCT_OBJECT(pointer)
GLsizei const GLfloat * value
GLuint GLsizei GLsizei * length
string __repr__(VtArray< T > const &self)
HOM_ImageLayer(const HOM_ImageLayer &)
GLenum GLuint GLint GLint layer
GA_API const UT_StringHolder scale
GLint GLint GLsizei GLint GLenum GLenum type
bool any(const vbool4 &v)
void ignore(T const &) VULKAN_HPP_NOEXCEPT
#define HOM_CONSTRUCT_OBJECT(pointer)
virtual ~HOM_ImageLayer()
HUSD_API const char * pixelAspectRatio()
GA_API const UT_StringHolder transform
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLsizei GLint border
GLenum GLsizei GLsizei GLint * values
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
GLubyte GLubyte GLubyte GLubyte w
HOM_API HOM_Module & HOM()
virtual HOM_ImageLayer * __enter__()
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)