Package jjil.core

Examples of jjil.core.Error


        for (int i=0; i<n; i++) {
            this.hsc[i] = new HaarClassifierStump(isr, this.width, this.height);
        }
        n = isr.read();
        if (n == -1) {
            throw new Error(
                            Error.PACKAGE.ALGORITHM,
                            ErrorCodes.INPUT_TERMINATED_EARLY,
                            isr.toString(),
                            null,
                            null);
        }
        char c = (char) n;
        if (c != ')') {
            throw new Error(
                            Error.PACKAGE.ALGORITHM,
                            ErrorCodes.PARSE_ERROR,
                            new Character(c).toString(),
                            ")",
                            isr.toString());
View Full Code Here


           throws jjil.core.Error, IOException
        {
            char[] rC = new char[6];
            readChars(isr,rC, 0, 6);
            if ("(hwcs ".compareTo(new String(rC)) != 0) { //$NON-NLS-1$
                throw new Error(
                                Error.PACKAGE.ALGORITHM,
                                ErrorCodes.PARSE_ERROR,
                                new String(rC),
                                "(hwcs ",
                                isr.toString());
View Full Code Here

           throws jjil.core.Error, IOException
        {
            char[] rC = new char[5];
            readChars(isr,rC, 0, 5);
            if ("(hcs ".compareTo(new String(rC)) != 0) { //$NON-NLS-1$
                throw new Error(
                                Error.PACKAGE.ALGORITHM,
                                ErrorCodes.PARSE_ERROR,
                                new String(rC),
                                "(hcs ",
                                isr.toString());
View Full Code Here

     */
    public Image doJoin(Image imageFirst, Image imageSecond)
        throws jjil.core.Error
    {
        if (!(imageFirst instanceof Gray8Image)) {
                throw new Error(
                        Error.PACKAGE.ALGORITHM,
                        ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                        imageFirst.toString(),
                        null,
                        null);
            }
        if (!(imageSecond instanceof Gray8Image)) {
                throw new Error(
                        Error.PACKAGE.ALGORITHM,
                        ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                        imageSecond.toString(),
                        null,
                        null);
            }
        if (imageFirst.getWidth() != imageSecond.getWidth() ||
            imageSecond.getHeight() != imageSecond.getHeight()) {
            throw new Error(
                    Error.PACKAGE.ALGORITHM,
                    ErrorCodes.IMAGE_SIZES_DIFFER,
                    imageFirst.toString(),
                    imageSecond.toString(),
                    null);
View Full Code Here

     * @throws jjil.core.Error if the input is not an RgbImage, or is smaller than the target image either
     * horizontally or vertically.
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof RgbImage)) {
            throw new Error(
              Error.PACKAGE.ALGORITHM,
              ErrorCodes.IMAGE_NOT_RGBIMAGE,
              image.toString(),
              null,
              null);
        }
        if (image.getWidth() > this.cWidth || image.getHeight() > this.cHeight) {
            throw new Error(
                  Error.PACKAGE.ALGORITHM,
                  ErrorCodes.STRETCH_OUTPUT_SMALLER_THAN_INPUT,
                  image.toString(),
                  this.toString(),
                  null);
View Full Code Here

     * @param cHeight the new target height.
     * @throws jjil.core.Error if height is not positive
     */
    public void setHeight(int cHeight) throws jjil.core.Error {
        if (cHeight <= 0) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.OUTPUT_IMAGE_SIZE_NEGATIVE,
                      new Integer(cHeight).toString(),
                      null,
                      null);
View Full Code Here

     * @param cWidth the new target width.
     * @throws jjil.core.Error if height is not positive
     */
    public void setWidth(int cWidth) throws jjil.core.Error {
        if (cWidth <= 0) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.OUTPUT_IMAGE_SIZE_NEGATIVE,
                      new Integer(cWidth).toString(),
                      null,
                      null);
View Full Code Here

     * @param image the input RgbImage.
     * @throws jjil.core.Error if the input image is not an RgbImage
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof RgbImage)) {
            throw new Error(
            Error.PACKAGE.ALGORITHM,
            ErrorCodes.IMAGE_NOT_RGBIMAGE,
            image.toString(),
            null,
            null);
View Full Code Here

     *
     * @param image the input image.
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof RgbImage)) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.IMAGE_NOT_RGBIMAGE,
                      image.toString(),
                      null,
                      null);
View Full Code Here

     * @param image the input image.
     * @throws jjil.core.Error if the input is not a Gray8Image
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof Gray32Image)) {
            throw new Error(
            Error.PACKAGE.ALGORITHM,
            ErrorCodes.IMAGE_NOT_GRAY32IMAGE,
            image.toString(),
            null,
            null);
View Full Code Here

TOP

Related Classes of jjil.core.Error

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.