# HG changeset patch # User robcast # Date 1454695425 -3600 # Node ID ef98becd15b1626010d8d1166f4214f22b87fee6 # Parent 5a3bd01c8ed11dba14264ddda90a2e58771d877c add methods to deal with image inputs that are not files (e.g. TextGrid TGCrud). diff -r 5a3bd01c8ed1 -r ef98becd15b1 common/src/main/java/digilib/conf/DigilibConfiguration.java --- a/common/src/main/java/digilib/conf/DigilibConfiguration.java Tue Jan 19 15:40:12 2016 +0100 +++ b/common/src/main/java/digilib/conf/DigilibConfiguration.java Fri Feb 05 19:03:45 2016 +0100 @@ -57,7 +57,7 @@ /** digilib version */ public static String getClassVersion() { - return "2.3.7a"; + return "2.3.8a"; } /* non-static getVersion for Java inheritance */ diff -r 5a3bd01c8ed1 -r ef98becd15b1 common/src/main/java/digilib/image/ImageJobDescription.java --- a/common/src/main/java/digilib/image/ImageJobDescription.java Tue Jan 19 15:40:12 2016 +0100 +++ b/common/src/main/java/digilib/image/ImageJobDescription.java Fri Feb 05 19:03:45 2016 +0100 @@ -183,6 +183,30 @@ } /** + * Creates new ImageJobDescription by merging Parameters from a + * DigilibRequest and adding an ImageSEt. + * + * @param dlReq + * @param imgs + * @param dlcfg + * @return + * @throws ImageOpException + * @throws IOException + */ + public static ImageJobDescription getInstanceWithImgs(DigilibRequest dlReq, ImageSet imgs, DigilibConfiguration dlcfg) + throws IOException, ImageOpException { + ImageJobDescription newMap = new ImageJobDescription(dlcfg); + // add all params to this map + newMap.params.putAll(dlReq.getParams()); + newMap.initOptions(); + newMap.setImageSet(imgs); + newMap.prepareScaleParams(); + // add ImageJobDescription back into DigilibRequest + dlReq.setJobDescription(newMap); + return newMap; + } + + /** * Creates new ImageJobDescription by merging Parameters from another * ParameterMap. * @@ -747,6 +771,14 @@ return imgSize; } + /** + * Set the image size. + * + * @param size + */ + public void setImgSize(ImageSize size) { + this.imgSize = size; + } /** * Return the X scale factor.