iipsrv 1.3
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
View Class Reference

Class to intelligently handle Image Transforms. More...

#include <View.h>

Public Member Functions

 View ()
 Constructor.
 
void setMaxSize (int m)
 Set the maximum view port dimension.
 
int getMaxSize ()
 Get the maximum allowed output size.
 
unsigned int getMinSize ()
 Get the minimum allowed output size.
 
void setAllowUpscaling (bool upscale)
 Set the allow_upscaling flag.
 
bool allowUpscaling ()
 Get the allow_upscaling flag.
 
void setMaxICC (int max)
 Set the maximum ICC profile size we allow to be embedded.
 
int maxICC ()
 Get the maximum ICC profile size we allow to be embedded - disable if certain processing has been carried out.
 
void setMaxResolutions (unsigned int r)
 Set the maximum view port dimension.
 
void setRequestWidth (unsigned int w)
 Set the size of the requested width.
 
std::vector< unsigned int > getRequestSize ()
 Get requested image size.
 
void setRequestHeight (unsigned int h)
 Set the size of the requested height.
 
unsigned int getResolution ()
 Return the resolution level needed for the requested view.
 
float getScale ()
 Return the scaling required in case our requested width or height is in between available resolutions.
 
void setViewLeft (float x)
 Set the left co-ordinate of the viewport.
 
void setViewTop (float y)
 Set the top co-ordinate of the viewport.
 
void setViewWidth (float w)
 Set the width co-ordinate of the viewport.
 
void setViewHeight (float h)
 Set the height co-ordinate of the viewport.
 
std::vector< float > getViewSize ()
 Return the view dimensions scaled to the full resolution of the image.
 
void setImageSize (unsigned int w, unsigned int h)
 Set the source image pixel size.
 
void setMaxLayers (int l)
 Limit the maximum number of quality layers we are allowed to decode.
 
void setLayers (int l)
 Set the number of quality layers to decode, limiting to our max value.
 
int getLayers ()
 Return the number of layers to decode.
 
unsigned int getImageWidth ()
 Return the image width at our requested resolution.
 
unsigned int getImageHeight ()
 Return the image height at our requested resolution.
 
unsigned int getViewLeft ()
 Return the left pixel of the viewport.
 
unsigned int getViewTop ()
 Return the top pixel of the viewport.
 
unsigned int getViewWidth ()
 Return the pixel width of the viewport.
 
unsigned int getViewHeight ()
 Return the pixel height of the viewport.
 
bool viewPortSet ()
 Indicate whether the viewport has been set.
 
void setRotation (float r)
 Set rotation.
 
float getRotation ()
 Get rotation.
 
bool floatProcessing ()
 Whether view requires floating point processing.
 
bool requireHistogram ()
 Whether we require a histogram.
 

Public Attributes

int xangle
 Horizontal View.
 
int yangle
 Vertical View.
 
bool shaded
 Whether to use shading view.
 
int shade [3]
 Shading incident light angles (x,y,z)
 
bool cmapped
 Whether to modify colormap.
 
enum cmap_type cmap
 colormap
 
bool inverted
 Whether to invert colormap.
 
int max_layers
 Maximum number of quality layers allowed.
 
int layers
 Number of quality layers.
 
ColorSpace colorspace
 Requested colorspace.
 
std::vector< std::vector< float > > ctw
 Colour twist matrix.
 
int flip
 Flip (1=horizontal, 2=vertical)
 
bool maintain_aspect
 Indicate whether aspect ratio should be maintained.
 
bool allow_upscaling
 Indicate whether images may be served larger than the source file.
 
int max_icc
 Maximum ICC profile size we allow to be embedded.
 
ImageEncoding output_format
 Requested output format.
 
float contrast
 Contrast adjustment requested by CNT command.
 
float gamma
 Gamma adjustment requested by GAM command.
 
std::vector< float > convolution
 Convolution matrix.
 
bool equalization
 Whether to perform histogram equalization.
 
bool minmax
 Whether to perform contrast stretching using user-defined min/max.
 

Detailed Description

Class to intelligently handle Image Transforms.

Member Function Documentation

◆ allowUpscaling()

bool View::allowUpscaling ( )
inline

Get the allow_upscaling flag.

Returns
true or false

References allow_upscaling.

◆ getImageHeight()

unsigned int View::getImageHeight ( )
inline

Return the image height at our requested resolution.

Returns
image height

◆ getImageWidth()

unsigned int View::getImageWidth ( )
inline

Return the image width at our requested resolution.

Returns
image width

◆ getMaxSize()

int View::getMaxSize ( )
inline

Get the maximum allowed output size.

Returns
maximum output dimension

Referenced by IIIF::run().

◆ getMinSize()

unsigned int View::getMinSize ( )
inline

Get the minimum allowed output size.

Returns
minimum output dimension

Referenced by CVT::send().

◆ getRequestSize()

vector< unsigned int > View::getRequestSize ( )

Get requested image size.

Returns
output size as a vector

References maintain_aspect.

Referenced by getResolution(), and CVT::send().

◆ getResolution()

unsigned int View::getResolution ( )

Return the resolution level needed for the requested view.

Returns
requested resolution level

Calculate the optimal resolution and the size of this resolution for the requested view, taking into account any maximum size settings

References getRequestSize(), and getScale().

Referenced by IIIF::run(), and CVT::send().

◆ getRotation()

float View::getRotation ( )
inline

Get rotation.

Returns
requested rotation angle in degrees

Referenced by IIIF::run(), CVT::send(), and JTL::send().

◆ getScale()

float View::getScale ( )

Return the scaling required in case our requested width or height is in between available resolutions.

Returns
scaling factor

Referenced by getResolution().

◆ getViewHeight()

unsigned int View::getViewHeight ( )

Return the pixel height of the viewport.

Returns
height of viewport in pixels

Referenced by IIIF::run(), and CVT::send().

◆ getViewLeft()

unsigned int View::getViewLeft ( )

Return the left pixel of the viewport.

Returns
position of left of viewport in pixels

Referenced by IIIF::run(), and CVT::send().

◆ getViewSize()

std::vector< float > View::getViewSize ( )
inline

Return the view dimensions scaled to the full resolution of the image.

Returns
size view dimensions on the full resolution canvas packed into a vector

◆ getViewTop()

unsigned int View::getViewTop ( )

Return the top pixel of the viewport.

Returns
position of top of viewport in pixels

Referenced by IIIF::run(), and CVT::send().

◆ getViewWidth()

unsigned int View::getViewWidth ( )

Return the pixel width of the viewport.

Returns
width of viewport in pixels

Referenced by IIIF::run(), and CVT::send().

◆ maxICC()

int View::maxICC ( )
inline

Get the maximum ICC profile size we allow to be embedded - disable if certain processing has been carried out.

Returns
max ICC profile size

References cmapped, colorspace, ctw, max_icc, and shaded.

Referenced by CVT::send(), and JTL::send().

◆ setAllowUpscaling()

void View::setAllowUpscaling ( bool  upscale)
inline

Set the allow_upscaling flag.

Parameters
upscaleallow upscaling of source image

References allow_upscaling.

◆ setImageSize()

void View::setImageSize ( unsigned int  w,
unsigned int  h 
)
inline

Set the source image pixel size.

Parameters
wpixel width
hpixel height

Referenced by IIIF::run(), and CVT::send().

◆ setLayers()

void View::setLayers ( int  l)
inline

Set the number of quality layers to decode, limiting to our max value.

Parameters
lNumber of layers to decode

References layers.

Referenced by LYR::run().

◆ setMaxICC()

void View::setMaxICC ( int  max)
inline

Set the maximum ICC profile size we allow to be embedded.

Parameters
maxmaximum icc profile size

References max_icc.

◆ setMaxLayers()

void View::setMaxLayers ( int  l)
inline

Limit the maximum number of quality layers we are allowed to decode.

Parameters
lMax number of layers to decode

References max_layers.

◆ setMaxResolutions()

void View::setMaxResolutions ( unsigned int  r)
inline

Set the maximum view port dimension.

Parameters
rnumber of availale resolutions

Referenced by IIIF::run(), and CVT::send().

◆ setMaxSize()

void View::setMaxSize ( int  m)
inline

Set the maximum view port dimension.

Parameters
mmaximum viewport dimension

◆ setRequestHeight()

void View::setRequestHeight ( unsigned int  h)
inline

Set the size of the requested height.

Parameters
hrequested image height

Referenced by HEI::run(), and IIIF::run().

◆ setRequestWidth()

void View::setRequestWidth ( unsigned int  w)
inline

Set the size of the requested width.

Parameters
wrequested image width

Referenced by WID::run(), and IIIF::run().

◆ setRotation()

void View::setRotation ( float  r)
inline

Set rotation.

Parameters
rangle of rotation in degrees

Referenced by ROT::run(), and IIIF::run().

◆ setViewHeight()

void View::setViewHeight ( float  h)

Set the height co-ordinate of the viewport.

Parameters
hheight resolution independent co-ordinate

Referenced by RGN::run(), and IIIF::run().

◆ setViewLeft()

void View::setViewLeft ( float  x)

Set the left co-ordinate of the viewport.

Parameters
xleft resolution independent co-ordinate

Referenced by RGN::run(), and IIIF::run().

◆ setViewTop()

void View::setViewTop ( float  y)

Set the top co-ordinate of the viewport.

Parameters
ytop resolution independent co-ordinate

Referenced by RGN::run(), and IIIF::run().

◆ setViewWidth()

void View::setViewWidth ( float  w)

Set the width co-ordinate of the viewport.

Parameters
wwidth resolution independent co-ordinate

Referenced by RGN::run(), and IIIF::run().

◆ viewPortSet()

bool View::viewPortSet ( )

Indicate whether the viewport has been set.

Returns
boolean indicating whether viewport specified

Referenced by IIIF::run(), and CVT::send().


The documentation for this class was generated from the following files: