29 #include "Transforms.h"
33 #include "../windows/Time.h"
47 float view_left, view_top, view_width, view_height;
50 unsigned int max_resolutions;
51 unsigned int width, height;
52 unsigned int res_width, res_height;
53 unsigned int min_size;
54 unsigned int max_size;
55 unsigned int requested_width;
56 unsigned int requested_height;
67 void calculateResolution(
unsigned int m,
unsigned int r );
82 std::vector< std::vector<float> >
ctw;
89 view_left = 0.0; view_top = 0.0; view_width = 1.0; view_height = 1.0;
90 resolution = 0; max_resolutions = 0;
91 width = 0; height = 0;
92 res_width = 0; res_height = 0;
93 min_size = 1; max_size = 0;
94 requested_width = 0; requested_height = 0;
95 contrast = 1.0; gamma = 1.0;
96 xangle = 0; yangle = 90;
97 shaded =
false; shade[0] = 0; shade[1] = 0; shade[2] = 0;
98 cmapped =
false; cmap = HOT; inverted =
false;
99 max_layers = 0; layers = 0;
100 rotation = 0.0; flip = 0;
101 maintain_aspect =
true;
134 if( (max_size > 0) && (w > max_size) ) requested_width = max_size;
135 else requested_width = w;
147 if( (max_size > 0) && (h > max_size) ) requested_height = max_size;
148 else requested_height = h;
186 void setImageSize(
unsigned int w,
unsigned int h ){ width = w; height = h; };
250 if( contrast != 1.0 || gamma != 1.0 || cmapped || shaded || inverted || ctw.size() ){
void setRotation(float r)
Set rotation.
Definition: View.h:242
void setViewHeight(float h)
Set the height co-ordinate of the viewport.
void setImageSize(unsigned int w, unsigned int h)
Set the source image pixel size.
Definition: View.h:186
bool shaded
Vertical View.
Definition: View.h:74
unsigned int getViewTop()
Return the top pixel of the viewport.
float getRotation()
Get rotation.
Definition: View.h:246
std::vector< std::vector< float > > ctw
Requested colourspace.
Definition: View.h:82
void setContrast(float c)
Set the contrast adjustment.
Definition: View.h:108
int flip
Colour twist matrix.
Definition: View.h:83
int shade[3]
Whether to use shading view.
Definition: View.h:75
enum cmap_type cmap
Whether to modify colormap.
Definition: View.h:77
void setViewLeft(float x)
Set the left co-ordinate of the viewport.
void setLayers(int l)
Set the number of quality layers to decode, limiting to our max value.
Definition: View.h:195
void setViewWidth(float w)
Set the width co-ordinate of the viewport.
unsigned int getViewWidth()
Return the pixel width of the viewport.
bool inverted
colormap
Definition: View.h:78
void setGamma(float g)
Set gamma.
Definition: View.h:234
int getLayers()
Return the number of layers to decode.
float getGamma()
Get gamma.
Definition: View.h:238
unsigned int getResolution()
Return the requested resolution.
float getScale()
Return the scaling required in case our requested width or height is in between available resolutions...
int yangle
Horizontal View.
Definition: View.h:73
void setMaxSize(unsigned int m)
Set the maximum view port dimension.
Definition: View.h:113
unsigned int getImageHeight()
Return the image height at our requested resolution.
Definition: View.h:210
View()
Indicate whether aspect ratio should be maintained.
Definition: View.h:88
bool maintain_aspect
Flip (1=horizontal, 2=vertical)
Definition: View.h:84
bool viewPortSet()
Indicate whether the viewport has been set.
ColourSpaces colourspace
Number of quality layers.
Definition: View.h:81
Class to intelligently handle Image Transforms.
Definition: View.h:41
bool cmapped
Shading incident light angles (x,y,z)
Definition: View.h:76
bool floatProcessing()
Whether view requires floating point processing.
Definition: View.h:249
unsigned int getMaxSize()
Get the maximum allowed output size.
Definition: View.h:118
unsigned int getViewLeft()
Return the left pixel of the viewport.
unsigned int getImageWidth()
Return the image width at our requested resolution.
Definition: View.h:206
float getContrast()
Return the contrast adjustment.
Definition: View.h:202
unsigned int getRequestHeight()
Get the size of the requested height.
unsigned int getRequestWidth()
Get the size of the requested width.
unsigned int getViewHeight()
Return the pixel height of the viewport.
void setViewTop(float y)
Set the top co-ordinate of the viewport.
void setMaxLayers(int l)
Limit the maximum number of quality layers we are allowed to decode.
Definition: View.h:191
void setRequestWidth(unsigned int w)
Set the size of the requested width.
Definition: View.h:133
int layers
Maximum number of quality layers allowed.
Definition: View.h:80
void setMaxResolutions(unsigned int r)
Set the maximum view port dimension.
Definition: View.h:123
void setRequestHeight(unsigned int h)
Set the size of the requested height.
Definition: View.h:146
int max_layers
Whether to invert colormap.
Definition: View.h:79