Package org.photovault.image

Examples of org.photovault.image.ChannelMapOperation


                Iterator colorIter = colorMappingFactories.entrySet().iterator();
                while ( colorIter.hasNext() ) {
                    Map.Entry e = (Map.Entry) colorIter.next();
                    PhotoInfo p = (PhotoInfo) e.getKey();
                    ChannelMapOperationFactory f = (ChannelMapOperationFactory) e.getValue();
                    ChannelMapOperation o = null;
                    o = f.create();
                    p.setColorChannelMapping( o );
                }
            }
        } catch ( LockNotGrantedException e ) {
View Full Code Here


    private ChannelMapOperationFactory getColorMappingFactory( PhotoInfo p ) {
        ChannelMapOperationFactory f = null;
        if ( colorMappingFactories.containsKey( p ) ) {
            f = (ChannelMapOperationFactory) colorMappingFactories.get( p );
        } else {
            ChannelMapOperation r = p.getColorChannelMapping();
            f = new ChannelMapOperationFactory( r );
            colorMappingFactories.put( p, f );
        }
        return f;       
    }
View Full Code Here

            }
            colorMappingChanged();
        }
        protected Object getModelValue( Object model ) {
            PhotoInfo obj = (PhotoInfo) model;
            ChannelMapOperation cm = obj.getColorChannelMapping();
            ColorCurve ret = null;
            if ( cm != null ) {
                ret = cm.getChannelCurve( name );
            }
            return ret;
        }
View Full Code Here

        assertEquals( "NIKON D200", p.getCamera() );
        assertEquals( 8.0, p.getFStop() );
        assertEquals( "Digital", p.getFilm() );
        assertEquals( 100, p.getFilmSpeed() );
        assertEquals( 0, p.getQuality() );
        ChannelMapOperation cm = p.getColorChannelMapping();
        ColorCurve c = cm.getChannelCurve( "value" );
        assertEquals( 0.4, c.getY( 1 ) );
        assertEquals( 0.5, c.getX( 1 ) );
        boolean foundOrig = false;
        for ( int n = 0; n < p.getNumInstances(); n++ ) {
            ImageInstance i = p.getInstance( n );
            if ( i.getInstanceType() == ImageInstance.INSTANCE_TYPE_ORIGINAL ) {
                cm = i.getColorChannelMapping();
                c = cm.getChannelCurve( "value" );
                assertEquals( 0.2, c.getY( 1 ) );
                assertEquals( 0.6, c.getX( 1 ) );               
                foundOrig = true;
            }
        }
View Full Code Here

        writer.write( "xmin=\"" + c.getMinX() + "\" " );
        writer.write( "xmax=\"" + c.getMaxX() + "\" " );
        writer.write( "ymin=\"" + c.getMinY() + "\" " );
        writer.write( "ymax=\"" + c.getMaxY() + "\"/>" );
        writer.newLine();
        ChannelMapOperation cm = p.getColorChannelMapping();
        if ( cm != null ) {
            String chanMapXml = cm.getAsXml( indent );
            writer.write( chanMapXml );
        }
        RawConversionSettings rs = p.getRawSettings();
        if ( rs != null ) {
            writeRawSettings( rs );
View Full Code Here

        writer.write( "xmin=\"" + c.getMinX() + "\" " );
        writer.write( "xmax=\"" + c.getMaxX() + "\" " );
        writer.write( "ymin=\"" + c.getMinY() + "\" " );
        writer.write( "ymax=\"" + c.getMaxY() + "\"/>" );
        writer.newLine();
        ChannelMapOperation cm = i.getColorChannelMapping();
        if ( cm != null ) {
            String chanMapXml = cm.getAsXml( indent );
            writer.write( chanMapXml );
        }
        RawConversionSettings rs = i.getRawSettings();
        if ( rs != null ) {
            writeRawSettings( rs );
View Full Code Here

            // Check for raw conversion
            if ( getRawSettings() != null ) {
                applied.add( ImageOperations.RAW_CONVERSION );
            }
            // Check for color mapping
            ChannelMapOperation colorMap = getColorChannelMapping();
            if ( colorMap != null ) {
                applied.add( ImageOperations.COLOR_MAP );
            }
        }
        return applied;
View Full Code Here

        if ( origImage != null ) {
            if ( c == null ) {
                // Null curve, use identity mapping
                c = new ColorCurve();
            }
            ChannelMapOperation cm = origImage.getColorAdjustment();
            ChannelMapOperationFactory f = new ChannelMapOperationFactory( cm );
            f.setChannelCurve( name, c );
            origImage.setColorAdjustment( f.create() );
            xformImage = null;
            repaint();
View Full Code Here

TOP

Related Classes of org.photovault.image.ChannelMapOperation

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.