Examples of AxisType


Examples of net.imglib2.meta.AxisType

          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

Examples of net.imglib2.meta.AxisType

      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

Examples of net.imglib2.meta.AxisType

    // 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

Examples of net.imglib2.meta.AxisType

        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

Examples of org.primefaces.model.chart.AxisType

        CartesianChartModel model = (CartesianChartModel) chart.getModel();
        Map<AxisType,Axis> axes = model.getAxes();
       
        writer.write(",axes:{");
        for(Iterator<AxisType> it = axes.keySet().iterator(); it.hasNext();) {
            AxisType axisType = it.next();
            Axis axis = model.getAxes().get(axisType);
           
            encodeAxis(context, axisType, axis);
           
            if(it.hasNext()) {
View Full Code Here

Examples of ucar.nc2.constants.AxisType

    super.findCoordinateAxes(ds);
  }

  protected AxisType getAxisType( NetcdfDataset ncd, VariableEnhanced v) {

    AxisType atype = super.getAxisType(ncd, v);
    if (atype != null) return atype;

    String unit = v.getUnitsString();
    if (unit == null)
      return null;
View Full Code Here

Examples of ucar.nc2.constants.AxisType

    int count = 0;
    while (stoker.hasMoreTokens()) {
      String vname = stoker.nextToken();
      Variable v = ds.findVariable(vname);
      if (v != null) {
        AxisType atype = count == 0 ? AxisType.Lat : count == 1 ? AxisType.Lon : AxisType.Height;
        v.addAttribute(new Attribute(_Coordinate.AxisType, atype.toString()));
      } else {
        parseInfo.format(" cant find time variable %s\n",vname);
      }
      count++;
    }
View Full Code Here

Examples of ucar.nc2.constants.AxisType

    if (positive != null) {
      v.addAttribute(new Attribute("positive", positive));
    }

    if (units != null) {
      AxisType axisType;
      if (SimpleUnit.isCompatible("millibar", units)) {
        axisType = AxisType.Pressure;
      } else if (SimpleUnit.isCompatible("m", units)) {
        axisType = AxisType.Height;
      } else {
        axisType = AxisType.GeoZ;
      }

      if (lookup instanceof Grib2GridTableLookup || lookup instanceof Grib1GridTableLookup) {
        v.addAttribute(new Attribute("GRIB_level_type", Integer.toString(typicalRecord.getLevelType1())));
      } else {
        v.addAttribute(new Attribute("level_type", Integer.toString(typicalRecord.getLevelType1())));
      }
      v.addAttribute(new Attribute(_Coordinate.AxisType, axisType.toString()));
    }

    if (coordValues == null) {
      coordValues = new double[levels.size()];
      for (int i = 0; i < levels.size(); i++) {
View Full Code Here

Examples of ucar.nc2.constants.AxisType

      HashMap<AxisType, VarProcess> map = new HashMap<AxisType, VarProcess>();

      // find existing axes, so we dont duplicate
      for (VarProcess vp : varList) {
        if (vp.isCoordinateAxis) {
          AxisType atype = getAxisType(ds, (VariableEnhanced) vp.v);
          if (atype != null)
            map.put(atype, vp);
        }
      }

      // look for time axes based on units
      if (map.get(AxisType.Time) == null) {
        for (VarProcess vp : varList) {
          Variable ncvar = vp.v;
          if (!(ncvar instanceof VariableDS)) continue; // cant be a structure
          String unit = ncvar.getUnitsString();

          if (SimpleUnit.isDateUnit(unit)) {
            vp.isCoordinateAxis = true;
            map.put(AxisType.Time, vp);
            parseInfo.format(" Time Coordinate Axis added (unit) = %s from unit %s\n", vp.v.getFullName(), unit);
            //break; // allow multiple time coords
          }
        }
      }

      // look for missing axes by using name hueristics
      for (VarProcess vp : varList) {
        if (vp.isCoordinateVariable) continue;
        Variable ncvar = vp.v;
        if (!(ncvar instanceof VariableDS)) continue; // cant be a structure

        AxisType atype = getAxisType(ds, (VariableEnhanced) vp.v);
        if (atype != null) {
          if (map.get(atype) == null) {
            vp.isCoordinateAxis = true;
            parseInfo.format(" Coordinate Axis added (Default forced) = %s for axis %s\n", vp.v.getFullName(), atype);
            map.put(atype, vp);
View Full Code Here

Examples of ucar.nc2.constants.AxisType

      }
      super.makeCoordinateTransforms(ds);
    }

    protected AxisType getAxisType(NetcdfDataset ds, VariableEnhanced ve) {
      AxisType result = getAxisTypeCoards(ds, ve);
      if (result != null) return result;

      Variable v = (Variable) ve;
      String vname = v.getShortName();
      String unit = v.getUnitsString();
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.