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

Class to represent a single image tile. More...

#include <RawTile.h>

Public Member Functions

 RawTile (int tn=0, int res=0, int hs=0, int vs=0, int w=0, int h=0, int c=0, int b=0)
 Main constructor.
 
 ~RawTile ()
 Destructor to free the data array if is has previously be allocated locally.
 
 RawTile (const RawTile &tile)
 Copy constructor - handles copying of data buffer.
 
RawTileoperator= (const RawTile &tile)
 Copy assignment constructor.
 
void allocate (uint32_t size=0)
 Allocate memory for the tile.
 
void deallocate (void *buffer)
 Free our data buffer.
 
void crop (const unsigned int w, const unsigned int h)
 Crop tile to the defined dimensions.
 

Public Attributes

std::string filename
 Name of the file from which this tile comes.
 
unsigned int width
 The width in pixels of this tile.
 
unsigned int height
 The height in pixels of this tile.
 
int channels
 The number of channels for this tile.
 
int bpc
 The number of bits per channel for this tile.
 
SampleType sampleType
 Sample format type (fixed or floating point)
 
CompressionType compressionType
 Compression type.
 
int quality
 Compression rate or quality.
 
time_t timestamp
 Tile timestamp.
 
int tileNum
 The tile number for this tile.
 
int resolution
 The resolution number to which this tile belongs.
 
int hSequence
 The horizontal angle to which this tile belongs.
 
int vSequence
 The vertical angle to which this tile belongs.
 
uint32_t capacity
 Amount of memory actually allocated in bytes.
 
uint32_t dataLength
 The size of the data pointed to by the data pointer in bytes.
 
int memoryManaged
 
void * data
 Pointer to the image data.
 

Friends

int operator== (const RawTile &A, const RawTile &B)
 Overloaded equality operator.
 
int operator!= (const RawTile &A, const RawTile &B)
 Overloaded non-equality operator.
 

Detailed Description

Class to represent a single image tile.

Constructor & Destructor Documentation

◆ RawTile()

RawTile::RawTile ( int  tn = 0,
int  res = 0,
int  hs = 0,
int  vs = 0,
int  w = 0,
int  h = 0,
int  c = 0,
int  b = 0 
)
inline

Main constructor.

Parameters
tntile number
resresolution
hshorizontal sequence angle
vsvertical sequence angle
wtile width
htile height
cnumber of channels
bbits per channel per sample

Member Function Documentation

◆ allocate()

void RawTile::allocate ( uint32_t  size = 0)
inline

Allocate memory for the tile.

Parameters
sizesize in bytes to allocate

References bpc, capacity, channels, data, height, memoryManaged, sampleType, and width.

Referenced by crop(), operator=(), and RawTile().

◆ crop()

void RawTile::crop ( const unsigned int  w,
const unsigned int  h 
)
inline

Crop tile to the defined dimensions.

Parameters
wwidth of cropped tile
hheight of cropped tile

References allocate(), bpc, capacity, channels, data, dataLength, deallocate(), height, memoryManaged, and width.

Member Data Documentation

◆ memoryManaged

int RawTile::memoryManaged

This tracks whether we have allocated memory locally for data or whether it is simply a pointer This is used in the destructor to make sure we deallocate correctly

Referenced by allocate(), crop(), operator=(), RawTile(), and ~RawTile().


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