Package net.imglib2.meta

Examples of net.imglib2.meta.AxisType


  // this is the constructor if you want it to be a variable
  public GenericShortType( final short value )
  {
    img = null;
    dataAccess = new ShortArray( 1 );
    setValue( value );
  }
View Full Code Here


  }

  @Override
  public CellImg< T, ShortArray, DefaultCell< ShortArray > > createShortInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return createInstance( new ShortArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

  }

  @Override
  public NativeImg< T, ShortArray > createShortInstance( final long[] dimensions, final Fraction entitiesPerPixel )
  {
    return new PlanarImg< T, ShortArray >( new ShortArray( 1 ), dimensions, entitiesPerPixel );
  }
View Full Code Here

          coords[j] = 0;
        } else {
          coords[j]++;
          done = true;
        }
        final AxisType axisType = axis(j).type();
        if (axisType.equals(Axes.CHANNEL) ) {
          c = coords[j];
        } else if (axisType.equals(Axes.Z)) {
          z = coords[j];
        } else {
          t = coords[j];
        }
      }
View Full Code Here

      final int idx = location.getIFD().getValue();
      final int channel = getLongAnnotationFromPlane(plane, CHANNEL_ANNOTATION_DESCRIPTION, ImagePlane.ALWAYS_MONOCHROME);
      final ImagePlane imagePlane = new ImagePlane(isd.getImageSeries(), idx, channel);
      final ImagePlaneDetails ipd = new ImagePlaneDetails(imagePlane, isd);
      for (int didx=0; didx<numDimensions();didx++) {
        AxisType at = axis(didx).type();
        if (at.equals(Axes.CHANNEL)) {
          coords[didx] = plane.getTheC().getValue();
        } else if (at.equals(Axes.Z)) {
          coords[didx] = plane.getTheZ().getValue();
        } else if (at.equals(Axes.TIME)) {
          coords[didx] = plane.getTheT().getValue();
        } else if (at.equals(OBJECT_PLANE_AXIS_TYPE)) {
          coords[didx] = planeIdx;
        }
      }
      add(ipd, coords);
    }
View Full Code Here

    // Determine the dimension order
    //
    if (ipds.numDimensions() == 2) {
      pixels.setDimensionOrder(DimensionOrder.XYCZT);
    } else {
      final AxisType type = ipds.axis(2).type();
      if (type.equals(Axes.CHANNEL)) {
        if (ipds.numDimensions() == 3) {
          pixels.setDimensionOrder(DimensionOrder.XYCZT);
        } else if (ipds.axis(3).type().equals(Axes.Z)) {
          pixels.setDimensionOrder(DimensionOrder.XYCZT);
        } else {
          pixels.setDimensionOrder(DimensionOrder.XYCTZ);
        }
      } else if (type.equals(Axes.Z)) {
        if (ipds.numDimensions() == 3) {
          pixels.setDimensionOrder(DimensionOrder.XYZCT);
        } else if (ipds.axis(3).type().equals(Axes.CHANNEL)) {
          pixels.setDimensionOrder(DimensionOrder.XYZCT);
        } else {
View Full Code Here

        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);
View Full Code Here

        }

        if ( optimizable )
        {
//          System.out.println( "interval = " + Util.printInterval( interval ) );
          final Interval sliceInterval = t.transform( new BoundingBox( interval ) ).getInterval();
//          System.out.println( "transformed interval = " + Util.printInterval( sliceInterval ) );
          if ( iterableSource.supportsOptimizedCursor( sliceInterval ) )
          {
            // check for FlatIterationOrder
            boolean flat = FlatIterationOrder.class.isInstance( iterableSource.subIntervalIterationOrder( sliceInterval ) );
View Full Code Here

      else
      {
        component[ e ] = e;
      }
    }
    final MixedTransform t = new MixedTransform( n, n );
    t.setComponentMapping( component );
    t.setComponentInversion( inv );
    return new MixedTransformView< T >( randomAccessible, t );
  }
View Full Code Here

    final int[] component = new int[ n ];
    for ( int e = 0; e < n; ++e )
      component[ e ] = e;
    component[ fromAxis ] = toAxis;
    component[ toAxis ] = fromAxis;
    final MixedTransform t = new MixedTransform( n, n );
    t.setComponentMapping( component );
    return new MixedTransformView< T >( randomAccessible, t );
  }
View Full Code Here

TOP

Related Classes of net.imglib2.meta.AxisType

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.