Examples of ImageProcessor


Examples of jsky.image.ImageProcessor

        JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem("Flip Y");
        menuItem.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                JCheckBoxMenuItem rb = (JCheckBoxMenuItem) e.getSource();
                ImageProcessor imageProcessor = _imageDisplay.getImageProcessor();
                imageProcessor.setFlipY(rb.getState());
                imageProcessor.update();
            }
        });

        return menuItem;
    }
View Full Code Here

Examples of jsky.image.ImageProcessor

        ItemListener itemListener = new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                JRadioButtonMenuItem rb = (JRadioButtonMenuItem) e.getSource();
                double rad = Math.PI / 180.;
                ImageProcessor imageProcessor = _imageDisplay.getImageProcessor();
                if (rb.isSelected()) {
                    if (rb.getText().equals("No Rotation")) {
                        imageProcessor.setAngle(0.0);
                    } else if (rb.getText().equals("  90 deg")) {
                        imageProcessor.setAngle(90.0 * rad);
                    } else if (rb.getText().equals(" 180 deg")) {
                        imageProcessor.setAngle(180.0 * rad);
                    } else if (rb.getText().equals(" -90 deg")) {
                        imageProcessor.setAngle(-90.0 * rad);
                    }
                    //else if (rb.getText().equals("  45 deg (XXX not impl)")) {
                    //    imageProcessor.setAngle(45.0*rad);
                    //}
                    imageProcessor.update();
                }
            }
        };

        b1.addItemListener(itemListener);
View Full Code Here

Examples of jsky.image.ImageProcessor

        JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem("Flip X");
        menuItem.addItemListener(new ItemListener() {

            public void itemStateChanged(ItemEvent e) {
                JCheckBoxMenuItem rb = (JCheckBoxMenuItem) e.getSource();
                ImageProcessor imageProcessor = _imageDisplay.getImageProcessor();
                imageProcessor.setFlipX(rb.getState());
                imageProcessor.update();
            }
        });

        return menuItem;
    }
View Full Code Here

Examples of jsky.image.ImageProcessor

    public ImagePanner(MainImageDisplay mainImageDisplay, int width, int height) {
        _imageDisplay = new ImageDisplay("pan window");
        _imageDisplay.setPrescaled(true);
        _imageDisplay.addImageGraphicsHandler(this);

        ImageProcessor ip = _imageDisplay.getImageProcessor();
        ip.removeChangeListener((ChangeListener) _imageDisplay); // not needed here
        ip.setName("Panner ip"); // for debugging

        JComponent c = (JComponent) _imageDisplay;
        _panWidth = width;
        _panHeight = height;
        c.setPreferredSize(new Dimension(_panWidth, _panHeight));
View Full Code Here

Examples of jsky.image.ImageProcessor

        // try to save time by getting a prescaled thumbnail image
        if (_pannerImage == null) {
            _pannerImage = _getPannerImage();
        }

        ImageProcessor ip = _imageDisplay.getImageProcessor();
        ip.setSourceImage(_pannerImage, _mainImageDisplay.getImageProcessor());
        ip.update();

        _imageDisplay.updateImage();
    }
View Full Code Here

Examples of jsky.image.ImageProcessor

     * Construct an image display widget with the given name.
     *
     * @param name name to associate with this instance
     */
    public ImageDisplay(String name) {
        this(new ImageProcessor(), name);
    }
View Full Code Here

Examples of jsky.image.ImageProcessor

            // try to extract the pixel value under the mouse and display it
            p = new Point2D.Double(e.getX(), e.getY());
            imageDisplay.getCoordinateConverter().screenToUserCoords(p, false);
            float pixel = imageDisplay.getPixelValue(p, 0);

            ImageProcessor imageProcessor = imageDisplay.getImageProcessor();
            if (pixel == imageProcessor.getBlank()) {
                pixelValueTextField.setText(_I18N.getString("blank"));
            } else {
                pixelValueTextField.setText(String.valueOf(pixel));
            }
        } catch (Exception ex) {
View Full Code Here

Examples of jsky.image.ImageProcessor

     * Construct an image display widget with the given name.
     *
     * @param name name to associate with this instance
     */
    public DivaGraphicsImageDisplay(String name) {
        this(new ImageProcessor(), name);
    }
View Full Code Here

Examples of jsky.image.ImageProcessor

        this.title = title;
        this.filename = new File(filename).getAbsolutePath();
        this.url = url;
        this.scale = imageDisplay.getScale();

        ImageProcessor imageProcessor = imageDisplay.getImageProcessor();
        this.cmap = imageProcessor.getColorLookupTableName();
        this.itt = imageProcessor.getIntensityLookupTableName();
        this.hcut = imageProcessor.getHighCut();
        this.lcut = imageProcessor.getLowCut();
        this.userSetCutLevels = imageProcessor.isUserSetCutLevels();
        this.scaleAlg = imageProcessor.getScaleAlgorithm();

        _initAction();
    }
View Full Code Here

Examples of jsky.image.ImageProcessor

     */
    public void stateChanged(ChangeEvent ce) {
        ImageChangeEvent e = (ImageChangeEvent) ce;
        if (e.isNewImage() && !e.isBefore()) {
            DivaMainImageDisplay imageDisplay = (DivaMainImageDisplay) e.getSource();
            ImageProcessor imageProcessor = imageDisplay.getImageProcessor();
            imageDisplay.removeChangeListener(this);

            // restore image processor settings
            imageProcessor.setColorLookupTable(cmap);
            imageProcessor.setIntensityLookupTable(itt);
            imageProcessor.setScaleAlgorithm(scaleAlg);
            imageProcessor.setCutLevels(lcut, hcut, userSetCutLevels);
            imageDisplay.setScale(scale);

            imageProcessor.update();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.