Package rasj
Class RasFastScale
java.lang.Object
rasj.RasFastScale
- All Implemented Interfaces:
RasGlobalDefs
class for fast scaling
-
Field Summary
Fields inherited from interface rasj.global.RasGlobalDefs
ACC_DEN_CAPABILITY_WRONG, ACC_DEN_INC_LOGIN, ACC_DEN_NO_PERMISSION, BASE_DBS_ERROR, CREATED, DATABASE_NOT_DEFINED, DB_CONN_FAILED, DB_NOT_OPEN, DELETED, DIMENSION_MISMATCH, FAST_PRE_SCALE_FACTORS, FAST_PRE_SCALE_SUFFIXES, GETFREESERVER_WAIT_INCREMENT, GETFREESERVER_WAIT_INITIAL, GUESTIDENT_DEFAULT, ILLEGAL_ULONG_VALUE, ILLEGAL_USHORT_VALUE, INDEX_OUT_OF_BOUNDS, INTERNAL_CLIENT_ERROR, INTERNAL_DL_PARSE_EXCEPTION, INVALID_OBJECT_NAME_ERROR, KEYWORD_ATYPE, KEYWORD_BTYPE, KEYWORD_CLASS, KEYWORD_CODE, KEYWORD_COLNO, KEYWORD_DIM1, KEYWORD_DIM2, KEYWORD_ERRNO, KEYWORD_HIGH, KEYWORD_INDEX, KEYWORD_INVNAME, KEYWORD_LINENO, KEYWORD_LOW, KEYWORD_METHOD, KEYWORD_TAB, KEYWORD_TOKEN, KEYWORD_TYPE, KEYWORD_URL, KEYWORD_VAL, MANAGER_BUSY, MANAGER_CONN_FAILED, MAX_GETFREESERVER_ATTEMPTS, MODIFIED, NO_ACTIVE_SERVERS, NO_STATUS, NUM_FAST_PRE_SCALE, RAS_ARRAY, RAS_AUTO_COMPRESSION, RAS_BOOLEAN, RAS_BYTE, RAS_CHAR, RAS_COLLECTION, RAS_COMPLEX1, RAS_DOUBLE, RAS_FLOAT, RAS_HDF, RAS_INT, RAS_JPEG, RAS_LONG, RAS_MARRAY, RAS_MINTERVAL, RAS_OID, RAS_PNG, RAS_POINT, RAS_RGB, RAS_SHORT, RAS_SINTERVAL, RAS_STRING, RAS_STRUCTURE, RAS_TIFF, RAS_ULONG, RAS_UNKNOWN, RAS_USHORT, RAS_ZLIB, RASJ_VERSION, RASMGRPORT_DEFAULT, READ, REQUEST_FORMAT_ERROR, RESULT_IS_NO_CELL, RESULT_IS_NO_INTERVAL, SIZE_OF_BOOLEAN, SIZE_OF_BYTE, SIZE_OF_CHAR, SIZE_OF_DOUBLE, SIZE_OF_FLOAT, SIZE_OF_INTEGER, SIZE_OF_LONG, SIZE_OF_RAS_BOOLEAN, SIZE_OF_RAS_BYTE, SIZE_OF_RAS_CHAR, SIZE_OF_RAS_DOUBLE, SIZE_OF_RAS_FLOAT, SIZE_OF_RAS_LONG, SIZE_OF_RAS_SHORT, SIZE_OF_RAS_ULONG, SIZE_OF_RAS_USHORT, SIZE_OF_SHORT, STREAM_INPUT_OVERFLOW, TRANSIENT, TYPE_INVALID, TYPE_NOT_SUPPORTED, TYPE_UNKNOWN, URL_FORMAT_ERROR, WRITE_TRANS_IN_PROGRESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal RasMIntervalReturns the full (unscaled) Domain of the image.doublegets the last used scaleprotected RasGMArraygetMinimalArray(String collection) gets the minimal arraygetScaledDomain(RasMInterval area, double scale) gets the scaling domaingetScaledImage(RasMInterval trimDomain, double scalingFactor, int domType) Returns the scaled image.protected RasMIntervalreadFullDomain(String collection) Reads the full domain of the given image.scaleGetDomain(RasMInterval areaOp, RasPoint origin, double scale) Returns the scaled domain of the image.
-
Constructor Details
-
RasFastScale
Default constructor. This constructor gets the name of the image collection and and an OQLQuery object as parameters.Important:This class does not open its own connection to the database nor start or commit any transactions. This has to be done by the application using FastScale.
- Parameters:
collection- the name of the collection containing the image(s)queryObject- the OQLQuery object for connecting to the database
-
-
Method Details
-
getScaledImage
public Object getScaledImage(RasMInterval trimDomain, double scalingFactor, int domType) throws QueryException Returns the scaled image.- Parameters:
trimDomain- the domain of the desired image sectorscalingFactor- the scaling factor ( values greater than 1 mean magnification, lesser than 1 lead to a reduction )domType- determines wether the scaling or the trimmimg have to be executed first. Currently only domType=1 is supported by the server.- Throws:
QueryException
-
getFullDomain
Returns the full (unscaled) Domain of the image.- Returns:
- the original domain of the image
-
scaleGetDomain
public RasMInterval scaleGetDomain(RasMInterval areaOp, RasPoint origin, double scale) throws RasClientInternalException Returns the scaled domain of the image.- Throws:
RasClientInternalException
-
readFullDomain
Reads the full domain of the given image. This method is called in the RasFastScale constructor.- Parameters:
name- name of the collection containing the image- Returns:
- the full domain of the image
- Throws:
RasClientInternalException
-
getMinimalArray
gets the minimal array- Throws:
RasClientInternalException
-
getScaledDomain
public RasMInterval getScaledDomain(RasMInterval area, double scale) throws RasClientInternalException gets the scaling domain- Throws:
RasClientInternalException
-
getLastScale
public double getLastScale()gets the last used scale
-