28 #if defined _MSC_VER && _MSC_VER<1900 29 #define snprintf _snprintf 51 enum ImageFormat { TIF, JPEG2000, UNSUPPORTED };
67 std::string imagePath;
70 std::string fileSystemPrefix;
73 std::string fileNamePattern;
85 void measureHorizontalAngles();
88 void measureVerticalAngles();
91 std::list <int> horizontalAnglesList;
94 std::list <int> verticalAnglesList;
133 std::vector <float>
min, max;
148 std::map <const std::string, std::string>
metadata;
160 format( UNSUPPORTED ),
167 sampleType( FIXEDPOINT ),
181 format( UNSUPPORTED ),
188 sampleType( FIXEDPOINT ),
199 : imagePath( image.imagePath ),
200 fileSystemPrefix( image.fileSystemPrefix ),
201 fileNamePattern( image.fileNamePattern ),
202 isFile( image.isFile ),
203 suffix( image.suffix ),
204 horizontalAnglesList( image.horizontalAnglesList ),
205 verticalAnglesList( image.verticalAnglesList ),
207 virtual_levels( image.virtual_levels ),
208 format( image.format ),
209 image_widths( image.image_widths ),
210 image_heights( image.image_heights ),
211 tile_width( image.tile_width ),
212 tile_height( image.tile_height ),
213 colourspace( image.colourspace ),
214 numResolutions( image.numResolutions ),
216 channels( image.channels ),
217 sampleType( image.sampleType ),
220 quality_layers( image.quality_layers ),
221 isSet( image.isSet ),
222 currentX( image.currentX ),
223 currentY( image.currentY ),
224 histogram( image.histogram ),
225 metadata( image.metadata ),
226 timestamp( image.timestamp ) {};
253 const std::string getFileName(
int x,
int y );
262 void updateTimestamp(
const std::string& s );
265 const std::string getTimestamp();
268 bool set() {
return isSet; };
320 return metadata[index];
330 virtual void Load(
const std::string& module ) {;};
333 virtual const std::string
getDescription() {
return std::string(
"IIPImage Base Class" ); };
371 virtual RawTile getRegion(
int ha,
int va,
unsigned int r,
int layers,
int x,
int y,
unsigned int w,
unsigned int h ){
return RawTile(); };
376 swap( *
this, image );
float getMaxValue(int n=0)
Return the minimum sample value for each channel.
Definition: IIPImage.h:293
unsigned int getNumBitsPerPixel()
Return the number of bits per pixel for this image.
Definition: IIPImage.h:280
unsigned int getTileWidth()
Return the base tile width in pixels.
Definition: IIPImage.h:312
SampleType getSampleType()
Return the sample format type.
Definition: IIPImage.h:296
float getMinValue(int n=0)
Return the minimum sample value for each channel.
Definition: IIPImage.h:288
unsigned int getImageWidth(int n=0)
Return the image width in pixels for a given resolution.
Definition: IIPImage.h:301
time_t timestamp
Image modification timestamp.
Definition: IIPImage.h:151
std::map< const std::string, std::string > metadata
STL map to hold string metadata.
Definition: IIPImage.h:148
unsigned int getNumResolutions()
Return the number of available resolutions in the image.
Definition: IIPImage.h:277
unsigned int getNumChannels()
Return the number of channels for this image.
Definition: IIPImage.h:283
unsigned int numResolutions
The number of available resolutions in this image.
Definition: IIPImage.h:121
std::vector< float > min
The min and max sample value for each channel.
Definition: IIPImage.h:133
virtual RawTile getTile(int h, int v, unsigned int r, int l, unsigned int t)
Return an individual tile for a given angle and resolution.
Definition: IIPImage.h:356
unsigned int virtual_levels
Number of resolution levels that don't physically exist in file.
Definition: IIPImage.h:103
IIPImage()
Default Constructor.
Definition: IIPImage.h:157
unsigned int getTileHeight()
Return the base tile height in pixels for a given resolution.
Definition: IIPImage.h:309
unsigned int quality_layers
Quality layers.
Definition: IIPImage.h:136
virtual bool regionDecoding()
Return whether this image type directly handles region decoding.
Definition: IIPImage.h:324
const std::string & getImagePath()
Return the image path.
Definition: IIPImage.h:247
std::vector< unsigned int > histogram
Image histogram.
Definition: IIPImage.h:145
virtual const std::string getDescription()
Return codec description: Overloaded by child class.
Definition: IIPImage.h:333
IIPImage(const std::string &s)
Constructer taking the image path as parameter.
Definition: IIPImage.h:177
const std::string & getMetadata(const std::string &index)
Return image metadata.
Definition: IIPImage.h:319
std::list< int > getHorizontalViewsList()
Return a list of horizontal angles.
Definition: IIPImage.h:244
std::vector< int > lut
LUT.
Definition: IIPImage.h:100
unsigned int getImageHeight(int n=0)
Return the image height in pixels for a given resolution.
Definition: IIPImage.h:306
virtual RawTile getRegion(int ha, int va, unsigned int r, int layers, int x, int y, unsigned int w, unsigned int h)
Return a region for a given angle and resolution.
Definition: IIPImage.h:371
virtual void openImage()
Open the image: Overloaded by child class.
Definition: IIPImage.h:336
Define our own derived exception class for file errors.
Definition: IIPImage.h:43
std::list< int > getVerticalViewsList()
Return a list of available vertical angles.
Definition: IIPImage.h:241
file_error(std::string s)
Definition: IIPImage.h:46
Main class to handle the pyramidal image source.
Definition: IIPImage.h:62
unsigned int tile_width
The base tile pixel dimensions.
Definition: IIPImage.h:115
IIPImage(const IIPImage &image)
Copy Constructor taking reference to another IIPImage object.
Definition: IIPImage.h:198
virtual void loadImageInfo(int x, int y)
Load information about the image eg. number of channels, tile size etc.
Definition: IIPImage.h:342
ImageFormat format
Return the image format e.g. tif.
Definition: IIPImage.h:106
void setFileSystemPrefix(const std::string &prefix)
Set a file system prefix for added security.
Definition: IIPImage.h:271
bool isSet
Indicate whether we have opened and initialised some parameters for this image.
Definition: IIPImage.h:139
ColourSpaces colourspace
The colour space of the image.
Definition: IIPImage.h:118
unsigned int channels
The number of channels for this image.
Definition: IIPImage.h:127
virtual void closeImage()
Close the image: Overloaded by child class.
Definition: IIPImage.h:345
int currentX
If we have an image sequence, the current X and Y position.
Definition: IIPImage.h:142
SampleType sampleType
The sample format type (fixed or floating point)
Definition: IIPImage.h:130
Class to represent a single image tile.
Definition: RawTile.h:45
void setFileNamePattern(const std::string &pattern)
Set the file name pattern used in image sequences.
Definition: IIPImage.h:274
ColourSpaces getColourSpace()
Return the colour space for this image.
Definition: IIPImage.h:315
virtual void Load(const std::string &module)
Load the appropriate codec module for this image type.
Definition: IIPImage.h:330
ImageFormat getImageFormat()
Get the image format.
Definition: IIPImage.h:257
virtual ~IIPImage()
Virtual Destructor.
Definition: IIPImage.h:229
unsigned int bpc
The bits per channel for this image.
Definition: IIPImage.h:124
std::vector< unsigned int > image_widths
The image pixel dimensions.
Definition: IIPImage.h:112