1 #ifndef _JPIP_REQUEST_H_ 2 #define _JPIP_REQUEST_H_ 39 istream& ParseModel(istream& stream);
47 istream& GetCodedChar(istream& in,
char& c);
53 virtual void ParseParameters(istream& stream);
61 virtual void ParseParameter(istream& stream,
const string& param,
string& value);
162 woi->
resolution = coding_parameters->GetClosestResolution(resolution_size, &res_image_size);
165 woi->
resolution = coding_parameters->GetRoundUpResolution(resolution_size, &res_image_size);
168 woi->
resolution = coding_parameters->GetRoundDownResolution(resolution_size, &res_image_size);
170 if (resolution_size != res_image_size)
174 woi->
size.
x = ceil((woi->
size.
x * res_image_size.
x) / resolution_size.
x);
175 woi->
size.
y = ceil((woi->
size.
y * res_image_size.
y) / resolution_size.
y);
RoundDirection round_direction
Round direction.
Definition: request.h:141
virtual ~Request()
Definition: request.h:179
Class derived from the HTTP Request class that contains the required code for properly analyzing a JP...
Definition: request.h:31
Size woi_size
WOI size.
Definition: request.h:129
void GetResolution(const CodingParameters::Ptr &coding_parameters, WOI *woi) const
Obtains the resolution level and modifies the given WOI to adjust it according to that level...
Definition: request.h:157
SHARED_PTR< CodingParameters > Ptr
Pointer to an object of this class.
Definition: coding_parameters.h:97
The cache model of a JPIP client is handled using this class.
Definition: cache_model.h:38
Size resolution_size
Size of the resolution level.
Definition: request.h:135
Class that identifies a WOI (Window Of Interest).
Definition: woi.h:24
bool HasWOI() const
Returns true if the mask contains the parameters associated to the WOI (fsiz, roff and rsiz)...
Definition: request.h:105
Round-up.
Definition: request.h:124
RoundDirection
Enumeration of the possible round directions of a WOI for specifying the resolution levels...
Definition: request.h:123
ParametersMask mask
Parameters mask.
Definition: request.h:134
Point woi_position
WOI position.
Definition: request.h:130
int length_response
Maximum response length.
Definition: request.h:133
int max_codestream
Maximum codestream.
Definition: request.h:132
Request()
Empty constructor.
Definition: request.h:147
Represents a couple of integer values that can be used to identify a coordinate as well as a size...
Definition: point.h:18
Size size
Size of the WOI (width and height)
Definition: woi.h:27
int y
Value Y.
Definition: point.h:22
CacheModel cache_model
Cache model.
Definition: request.h:136
Set of classes for handling (reading and indexing) image files with the format defined in the Part 1 ...
Definition: codestream_index.h:10
Closest.
Definition: request.h:126
Union used to control the presence of the different JPIP parameters in a request. ...
Definition: request.h:67
Round-down.
Definition: request.h:125
int x
Value X.
Definition: point.h:21
int resolution
Resolution level where the WOI is located (0 == the highest)
Definition: woi.h:29
int min_codestream
Minimum codestream.
Definition: request.h:131
Class used to identify a HTTP request (GET or POST).
Definition: request.h:27
Point position
Position of the upper-left corner of the WOI.
Definition: woi.h:28
ParametersMask()
Initializes the mask to zero.
Definition: request.h:95
Set of classes related to the JPIP protocol, defined in the Part 9 of the JPEG2000 standard...
Definition: cache_model.h:13
int value
Parameters mask as integer.
Definition: request.h:90
void Clear()
Sets the mask to zero.
Definition: request.h:113