Package net.imagej.overlay

Examples of net.imagej.overlay.Overlay


        minima[0] = center_x - 25.0;
        minima[1] = center_y - 10.0;
        maxima[0] = center_x + 10.0;
        maxima[1] = center_y + 10.0;
      }};
    Overlay o = new AbstractROIOverlay<RegionOfInterest>(context.getContext(), roi) {

      /* (non-Javadoc)
       * @see imagej.data.overlay.Overlay#move(double[])
       */
      public void move(double[] deltas) {
View Full Code Here


      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

TOP

Related Classes of net.imagej.overlay.Overlay

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.