Package jjil.core

Examples of jjil.core.Error


     */
    public void push(Image image)
        throws jjil.core.Error
    {
        if (!(image instanceof Gray8Image)) {
            throw new Error(
                    Error.PACKAGE.ALGORITHM,
                    ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                    image.toString(),
                    null,
                    null);
View Full Code Here


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

     *    extends outside the input image, or 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 RgbImage image.
     * @throws jjil.core.Error if the input 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

     */
    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

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

     public Image getFront() throws jjil.core.Error
    {
        // reuse output image
        // check to make sure nobody damaged it somehow
        if (!(super.imageOutput instanceof Gray32OffsetImage)) {
            throw new Error(
                            Error.PACKAGE.ALGORITHM,
                            ErrorCodes.OBJECT_NOT_EXPECTED_TYPE,
                            super.imageOutput.toString(),
                            "Gray32SubImage",
                            null);
        }
        if (!advanceToNextSubImage()) {
            throw new Error(
                            Error.PACKAGE.ALGORITHM,
                            ErrorCodes.SUBIMAGE_NO_IMAGE_AVAILABLE,
                            this.toString(),
                            null,
                            null);
View Full Code Here

     * @throws jjil.core.Error if the input is not of type MaskedGray8Image or is smaller than the
     * subimages to be generated.
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof Gray32MaskedImage)) {
            throw new Error(
                            Error.PACKAGE.ALGORITHM,
                            ErrorCodes.OBJECT_NOT_EXPECTED_TYPE,
                            image.toString(),
                            "Gray32MaskedImage",
                            null);
        }
        if (image.getWidth() < this.nWidth || image.getHeight() < this.nHeight) {
            throw new Error(
                            Error.PACKAGE.ALGORITHM,
                            ErrorCodes.IMAGE_TOO_SMALL,
                            image.toString(),
                            new Integer(this.nWidth).toString(),
                            new Integer(this.nHeight).toString());
View Full Code Here

            int cMaxY,
            int cMinSlope,
            int cMaxSlope,
            int cSteps) throws jjil.core.Error {
        if (cMaxY < cMinY) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.PARAMETER_RANGE_NULL_OR_NEGATIVE,
                      new Integer(cMinY).toString(),
                      new Integer(cMaxY).toString(),
                      null);
        }
        this.cMinY = cMinY;
        this.cMaxY = cMaxY;
        if (cMaxSlope < cMinSlope) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.PARAMETER_RANGE_NULL_OR_NEGATIVE,
                      new Integer(cMinSlope).toString(),
                      new Integer(cMaxSlope).toString(),
                      null);
        }
        if (cSteps <= 0) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.PARAMETER_OUT_OF_RANGE,
                      new Integer(cSteps).toString(),
                      new Integer(1).toString(),
                      new Integer(Integer.MAX_VALUE).toString());
View Full Code Here

        /* fill the Hough accumulator
         */
        for (Enumeration e = points.elements(); e.hasMoreElements();) {
            Object o = e.nextElement();
            if (!(o instanceof Point)) {
                throw new Error(
                          Error.PACKAGE.ALGORITHM,
                          ErrorCodes.OBJECT_NOT_EXPECTED_TYPE,
                          o.toString(),
                          "Point",
                          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.