// Path: desktop/src/main/java/com/cv4j/exception/CV4JException.java
// public class CV4JException extends RuntimeException {
// 
//     private static final long serialVersionUID = -2565764903880816387L;
// 
//     public CV4JException(String message) {
//         super(message);
//     }
// 
//     public CV4JException(Throwable throwable) {
//         super(throwable);
//     }
// 
//     public CV4JException(String message, Throwable throwable) {
//         super(message, throwable);
//     }
// }


import com.cv4j.exception.CV4JException;
        this.image = data;
    }

    public ImageData getImage() {
        return this.image;
    }

    @Override
    public float[] toFloat(int index) {
        if(index == 0) {
            float[] data = new float[R.length];
            int length = data.length;
            for(int i=0; i<length; i++)
                data[i] = R[i]&0xff;
            return data;
        }
        else if(index == 1) {
            float[] data = new float[G.length];
            int length = data.length;
            for(int i=0; i<length; i++)
                data[i] = G[i]&0xff;
            return data;
        }
        else if(index == 2) {
            float[] data = new float[B.length];
            int length = data.length;
            for(int i=0; i<length; i++)
                data[i] = B[i]&0xff;
            return data;
        } else {
// Path: desktop/src/main/java/com/cv4j/exception/CV4JException.java
// public class CV4JException extends RuntimeException {
// 
//     private static final long serialVersionUID = -2565764903880816387L;
// 
//     public CV4JException(String message) {
//         super(message);
//     }
// 
//     public CV4JException(Throwable throwable) {
//         super(throwable);
//     }
// 
//     public CV4JException(String message, Throwable throwable) {
//         super(message, throwable);
//     }
// }


// Path: desktop/src/main/java/com/cv4j/core/datamodel/ColorProcessor.java
import com.cv4j.exception.CV4JException;

        this.image = data;
    }

    public ImageData getImage() {
        return this.image;
    }

    @Override
    public float[] toFloat(int index) {
        if(index == 0) {
            float[] data = new float[R.length];
            int length = data.length;
            for(int i=0; i<length; i++)
                data[i] = R[i]&0xff;
            return data;
        }
        else if(index == 1) {
            float[] data = new float[G.length];
            int length = data.length;
            for(int i=0; i<length; i++)
                data[i] = G[i]&0xff;
            return data;
        }
        else if(index == 2) {
            float[] data = new float[B.length];
            int length = data.length;
            for(int i=0; i<length; i++)
                data[i] = B[i]&0xff;
            return data;
        } else {
            throw new CV4JException("invalid argument...");