29#include "Transforms.h"
42 float view_left, view_top, view_width, view_height;
45 unsigned int max_resolutions;
46 unsigned int width, height;
47 unsigned int res_width, res_height;
48 unsigned int min_size;
50 unsigned int requested_width;
51 unsigned int requested_height;
60 void calculateResolution(
unsigned int m,
unsigned int r );
75 std::vector< std::vector<float> >
ctw;
90 view_left = 0.0; view_top = 0.0; view_width = 1.0; view_height = 1.0;
91 resolution = 0; max_resolutions = 0;
92 width = 0; height = 0;
93 res_width = 0; res_height = 0;
94 min_size = 1; max_size = 0;
95 requested_width = 0; requested_height = 0;
101 rotation = 0.0;
flip = 0;
173 requested_height = h;
210 std::vector<float> size = { width*view_width, height*view_height };
219 void setImageSize(
unsigned int w,
unsigned int h ){ width = w; height = h; };
Class to intelligently handle Image Transforms.
Definition View.h:36
void setMaxICC(int max)
Set the maximum ICC profile size we allow to be embedded.
Definition View.h:140
float contrast
Contrast adjustment requested by CNT command.
Definition View.h:81
bool viewPortSet()
Indicate whether the viewport has been set.
Definition View.cc:160
std::vector< unsigned int > getRequestSize()
Get requested image size.
Definition View.cc:217
unsigned int getViewWidth()
Return the pixel width of the viewport.
Definition View.cc:187
void setMaxSize(int m)
Set the maximum view port dimension.
Definition View.h:114
unsigned int getViewTop()
Return the top pixel of the viewport.
Definition View.cc:178
int yangle
Vertical View.
Definition View.h:66
unsigned int getResolution()
Return the resolution level needed for the requested view.
Definition View.cc:55
unsigned int getMinSize()
Get the minimum allowed output size.
Definition View.h:124
void setViewTop(float y)
Set the top co-ordinate of the viewport.
Definition View.cc:137
float getScale()
Return the scaling required in case our requested width or height is in between available resolutions...
Definition View.cc:101
unsigned int getViewLeft()
Return the left pixel of the viewport.
Definition View.cc:169
int max_icc
Maximum ICC profile size we allow to be embedded.
Definition View.h:79
void setViewWidth(float w)
Set the width co-ordinate of the viewport.
Definition View.cc:144
View()
Constructor.
Definition View.h:89
std::vector< float > convolution
Convolution matrix.
Definition View.h:83
bool requireHistogram()
Whether we require a histogram.
Definition View.h:278
bool minmax
Whether to perform contrast stretching using user-defined min/max.
Definition View.h:85
int flip
Flip (1=horizontal, 2=vertical)
Definition View.h:76
bool maintain_aspect
Indicate whether aspect ratio should be maintained.
Definition View.h:77
bool equalization
Whether to perform histogram equalization.
Definition View.h:84
float getRotation()
Get rotation.
Definition View.h:267
bool shaded
Whether to use shading view.
Definition View.h:67
int max_layers
Maximum number of quality layers allowed.
Definition View.h:72
float gamma
Gamma adjustment requested by GAM command.
Definition View.h:82
ColorSpace colorspace
Requested colorspace.
Definition View.h:74
int shade[3]
Shading incident light angles (x,y,z)
Definition View.h:68
int getMaxSize()
Get the maximum allowed output size.
Definition View.h:119
int maxICC()
Get the maximum ICC profile size we allow to be embedded - disable if certain processing has been car...
Definition View.h:146
void setRequestWidth(unsigned int w)
Set the size of the requested width.
Definition View.h:160
int xangle
Horizontal View.
Definition View.h:65
bool allow_upscaling
Indicate whether images may be served larger than the source file.
Definition View.h:78
std::vector< float > getViewSize()
Return the view dimensions scaled to the full resolution of the image.
Definition View.h:209
unsigned int getImageHeight()
Return the image height at our requested resolution.
Definition View.h:239
void setMaxResolutions(unsigned int r)
Set the maximum view port dimension.
Definition View.h:155
int getLayers()
Return the number of layers to decode.
Definition View.cc:268
bool cmapped
Whether to modify colormap.
Definition View.h:69
unsigned int getImageWidth()
Return the image width at our requested resolution.
Definition View.h:235
int layers
Number of quality layers.
Definition View.h:73
ImageEncoding output_format
Requested output format.
Definition View.h:80
void setImageSize(unsigned int w, unsigned int h)
Set the source image pixel size.
Definition View.h:219
void setViewHeight(float h)
Set the height co-ordinate of the viewport.
Definition View.cc:152
bool allowUpscaling()
Get the allow_upscaling flag.
Definition View.h:134
void setMaxLayers(int l)
Limit the maximum number of quality layers we are allowed to decode.
Definition View.h:224
void setAllowUpscaling(bool upscale)
Set the allow_upscaling flag.
Definition View.h:129
bool floatProcessing()
Whether view requires floating point processing.
Definition View.h:270
void setViewLeft(float x)
Set the left co-ordinate of the viewport.
Definition View.cc:130
void setRotation(float r)
Set rotation.
Definition View.h:263
enum cmap_type cmap
colormap
Definition View.h:70
void setRequestHeight(unsigned int h)
Set the size of the requested height.
Definition View.h:172
bool inverted
Whether to invert colormap.
Definition View.h:71
unsigned int getViewHeight()
Return the pixel height of the viewport.
Definition View.cc:202
void setLayers(int l)
Set the number of quality layers to decode, limiting to our max value.
Definition View.h:228
std::vector< std::vector< float > > ctw
Colour twist matrix.
Definition View.h:75