11 #ifndef TIL_HISTOGRAM_H
12 #define TIL_HISTOGRAM_H
32 void setRaster(
const TIL_Raster *generate_from,
34 void setMaxBuckets(
int max);
43 int isHistogram()
const;
46 const char *
getName()
const {
return myGraphName; }
49 int &floatval,
int &usesbwpoints,
53 int &floatval,
int &usesbwpoints,
56 void getBWPoints(
float &black,
float &white)
const;
58 unsigned int getHistogramSize(
bool rebinned =
true)
const;
59 const unsigned int *getHistogram(
bool rebinned =
true)
const;
60 float getCutoffPoint()
const;
62 bool getUVPos(
float &pos,
int &dir)
const;
64 void getGraphDimensions(
int &
width,
int &
height)
const;
66 unsigned int getGraphCount(
int x,
int y)
const;
69 static void RGBtoHSV(
float r,
float g,
float b,
70 float &
h,
float &
s,
float &
v);
71 static void HSVtoRGB(
float h,
float s,
float v,
72 float &
r,
float &
g,
float &
b);
74 void rebin(
const float histwidth);
75 void getRangeForBar(
int bar,
float&
start,
float&
end);
79 void scanRange(
float &
min,
float &max);
80 void scanHistogram(
float &
min,
float &max);
81 static void scanHistogram(
unsigned int const*
histogram,
int num_buckets,
82 float &
start,
float &
end,
float& cutoff_point
89 unsigned int *allocHistogram(
int size = -1);
90 unsigned int *allocGraph(
int width,
int depth = -1);
92 void convertGraphToRaster(
int use_huex,
int use_huey,
95 void generateRawHist();
96 void generateHSVHist(
int which);
98 void generateRaw(
int uv,
bool uvmode,
float uvpos);
99 void generateHSV(
int which,
int uv,
100 bool uvmode,
float uvpos);
101 void generateHueGraph(
int which);
109 const char *myGraphName;
110 const char *myXLabel;
111 const char *myYLabel;
112 float myXStart, myXEnd;
113 float myYStart, myYEnd;
114 int myXFloat, myYFloat;
116 int myXLimited, myYLimited;
117 int myWhitePointAxis;
124 unsigned int *myHistogram;
128 unsigned int* myRebinnedHistogram;
129 unsigned int* myBinRangeTable;
132 float myRebinnedCutoffPoint;
133 bool myHasRebinnedHistogram;
136 unsigned int myGraphWidth;
137 unsigned int myGraphHeight;
138 unsigned char *myGraph;
OIIO_API std::vector< imagesize_t > histogram(const ImageBuf &src, int channel=0, int bins=256, float min=0.0f, float max=1.0f, bool ignore_empty=false, ROI roi={}, int nthreads=0)
const char * getName() const
GLuint GLsizei const GLchar * label
GA_API const UT_StringHolder uv
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLint GLsizei GLsizei height
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
GLboolean GLboolean GLboolean b
GLint GLint GLsizei GLsizei GLsizei depth
GLfloat GLfloat GLfloat GLfloat h
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
that also have some descendant prim *whose name begins with bar