Examples of Overlay


Examples of net.imagej.overlay.Overlay

      if (! view.isSelected()) continue;
      OverlayView oView = (OverlayView)view;
      if (mask == null) {
        mask = createBitMask(display);
      }
      Overlay overlay = oView.getData();
      /*
       * The view can have an offset. Since there are two ways
       * of handling the ROI, we offset the image instead of the view.
       *
       * We also will attempt to make the axes conform to what's
       * expected by CP.
       */
      RandomAccessibleInterval<BitType> adapter = mask;
      long [] offset = new long[display.numDimensions()];
      AxisType [] dAxes = new AxisType [] { Axes.Y, Axes.X };
       
      for (int j=0; j<dAxes.length; j++) {
        int i = overlay.dimensionIndex(dAxes[j]);
        offset[j] = display.getLongPosition(dAxes[j]) - oView.getLongPosition(dAxes[j]);
        if (i != j) {
          /*
           * Perform an axis permutation.
           */
          adapter = Views.permute(adapter, j, i);
          final AxisType temp = dAxes[i];
          dAxes[i] = dAxes[j];
          dAxes[j] = temp;
        }
      }
      adapter = Views.translate(adapter, offset);
      RegionOfInterest roi = overlay.getRegionOfInterest();
      if (roi instanceof IterableRegionOfInterest) {
        /*
         * Yay! We can iterate over the pixels to turn each of them on.
         */
        IterableInterval<BitType> ii =
View Full Code Here

Examples of org.apache.fop.afp.modca.Overlay

     */
    public Overlay createOverlay(int width, int height,
            int widthRes, int heightRes, int overlayRotation) {
        String overlayName = OVERLAY_NAME_PREFIX
        + StringUtils.lpad(String.valueOf(++overlayCount), '0', 5);
        Overlay overlay = new Overlay(this, overlayName, width, height,
                overlayRotation, widthRes, heightRes);
        return overlay;
    }
View Full Code Here

Examples of org.apache.fop.afp.modca.Overlay

     */
    public Overlay createOverlay(int width, int height,
            int widthRes, int heightRes, int overlayRotation) {
        String overlayName = OVERLAY_NAME_PREFIX
        + StringUtils.lpad(String.valueOf(++overlayCount), '0', 5);
        Overlay overlay = new Overlay(this, overlayName, width, height,
                overlayRotation, widthRes, heightRes);
        return overlay;
    }
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

    {
        final Iterator it = overlays.iterator();
        final List result = new ArrayList();
        while ( it.hasNext() )
        {
            Overlay overlay = (Overlay) it.next();
            result.add( overlay.getId() );
        }
        return result;

    }
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

        // refer to a valid artifact
        final List configuredWarArtifacts = new ArrayList();
        final ListIterator it = overlays.listIterator();
        while ( it.hasNext() )
        {
            Overlay overlay = (Overlay) it.next();
            if ( overlay == null )
            {
                throw new InvalidOverlayConfigurationException( "overlay could not be null." );
            }
            // If it's the current project, return the project instance
            if ( overlay.isCurrentProject() )
            {
                overlay = Overlay.currentProjectInstance();
                it.set( overlay );
            }
            // default includes/excludes - only if the overlay uses the default settings
            if ( Arrays.equals( Overlay.DEFAULT_INCLUDES, overlay.getIncludes() )
                && Arrays.equals( Overlay.DEFAULT_EXCLUDES, overlay.getExcludes() ) )
            {
                overlay.setIncludes( defaultIncludes );
                overlay.setExcludes( defaultExcludes );
            }

            final Artifact artifact = getAssociatedArtifact( overlay );
            if ( artifact != null )
            {
                configuredWarArtifacts.add( artifact );
                overlay.setArtifact( artifact );
            }
        }

        // Build the list of missing overlays
        final Iterator it2 = artifactsOverlays.iterator();
        while ( it2.hasNext() )
        {
            Artifact artifact = (Artifact) it2.next();
            if ( !configuredWarArtifacts.contains( artifact ) )
            {
                // Add a default overlay for the given artifact which will be applied after
                // the ones that have been configured
                overlays.add( new DefaultOverlay( artifact, defaultIncludes, defaultExcludes ) );
            }
        }

        // Final validation, make sure that the current project is in there. Otherwise add it first
        final Iterator it3 = overlays.iterator();
        while ( it3.hasNext() )
        {
            Overlay overlay = (Overlay) it3.next();
            if ( overlay.equals( Overlay.currentProjectInstance() ) )
            {
                return;
            }
        }
        overlays.add( 0, Overlay.currentProjectInstance() );
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

    {
        final MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
        final List overlays = new ArrayList();
        try
        {
            final Overlay currentProjectOVerlay = Overlay.createInstance();
            OverlayManager manager = new OverlayManager( overlays, project, DEFAULT_INCLUDES, DEFAULT_EXCLUDES,
                                                         currentProjectOVerlay );
            assertNotNull( manager.getOverlays() );
            assertEquals( 1, manager.getOverlays().size() );
            assertEquals( currentProjectOVerlay, manager.getOverlays().get( 0 ) );
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

        final List overlays = new ArrayList();

        try
        {
            final Overlay overlay = currentProjectOverlay;
            OverlayManager manager = new OverlayManager( overlays, project, DEFAULT_INCLUDES, DEFAULT_EXCLUDES,
                                                         overlay );
            assertNotNull( manager.getOverlays() );
            assertEquals( 2, manager.getOverlays().size() );
            assertEquals( overlay, manager.getOverlays().get( 0 ) );
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

        final List overlays = new ArrayList();
        overlays.add( new DefaultOverlay( first ) );

        try
        {
            final Overlay currentProjectOverlay = Overlay.createInstance();
            OverlayManager manager = new OverlayManager( overlays, project, DEFAULT_INCLUDES, DEFAULT_EXCLUDES,
                                                         currentProjectOverlay );
            assertNotNull( manager.getOverlays() );
            assertEquals( 2, manager.getOverlays().size() );
            assertEquals( Overlay.createInstance(), manager.getOverlays().get( 0 ) );
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

        final MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
        final ArtifactStub first = newWarArtifact( "test", "test-webapp" );
        project.addArtifact( first );

        final List overlays = new ArrayList();
        overlays.add( new Overlay( "test", "test-webapp-2" ) );

        try
        {
            final Overlay currentProjectOVerlay = Overlay.createInstance();
            new OverlayManager( overlays, project, DEFAULT_INCLUDES, DEFAULT_EXCLUDES, currentProjectOVerlay );
            fail( "Should have failed to validate an unknown overlay" );
        }
        catch ( InvalidOverlayConfigurationException e )
        {
View Full Code Here

Examples of org.apache.maven.plugin.war.Overlay

        project.addArtifact( first );
        project.addArtifact( second );

        final List overlays = new ArrayList();
        overlays.add( new DefaultOverlay( first ) );
        final Overlay currentProjectOverlay = Overlay.createInstance();
        overlays.add( currentProjectOverlay );

        try
        {
            OverlayManager manager = new OverlayManager( overlays, project, DEFAULT_INCLUDES, DEFAULT_EXCLUDES,
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.