Package ome.xml.model

Examples of ome.xml.model.Channel


      final WellSample sample = well.getWellSample(d.site);
      Image image = new Image();
      Pixels pixels = new Pixels();
      Channel [] channels = new Channel[d.sizeC];
      for (int i=0; i<d.sizeC; i++) {
        Channel c = new Channel();
        c.setName(MockImageDescription.DEFAULT_CHANNEL_NAMES[i]);
        pixels.addChannel(c);
        channels[i] = c;
      }
      pixels.setSizeX(new PositiveInteger(d.sizeX));
      pixels.setSizeY(new PositiveInteger(d.sizeY));
View Full Code Here


      putIfNotNull(map, MD_Z, plane.getTheZ().toString());
      final NonNegativeInteger c = plane.getTheC();
      if (c != null) {
        final int cidx = c.getValue().intValue();
        if (pixels.sizeOfChannelList() > cidx) {
          Channel channel = pixels.getChannel(cidx);
          if (channel != null) {
            putIfNotNull(map, MD_CHANNEL_NAME, channel.getName());
            final PositiveInteger samplesPerPixel = channel.getSamplesPerPixel();
            if (samplesPerPixel != null) {
              final int nSamplesPerPixel = samplesPerPixel.getValue().intValue();
              map.put(MD_COLOR_FORMAT, (nSamplesPerPixel == 1)?MD_MONOCHROME:MD_RGB);
            }
          }
        }
      }
    } else {
      if (pixels != null){
        if (pixels.getSizeC().getValue().intValue() == 1) {
          map.put(MD_COLOR_FORMAT, MD_MONOCHROME);
          Channel channel = pixels.getChannel(0);
          if (channel != null) {
            putIfNotNull(map, MD_CHANNEL_NAME, channel.getName());
          }
        } else if (pixels.sizeOfChannelList() == 1) {
          map.put(MD_COLOR_FORMAT, MD_RGB);
        } else {
          map.put(MD_COLOR_FORMAT, MD_MONOCHROME);
          Channel channel = pixels.getChannel(source.theC());
          if (channel != null) {
            putIfNotNull(map, MD_CHANNEL_NAME, channel.getName());
          }
        }
      } else {
        /*
         * Use the channel within the plane to guess at the format.
View Full Code Here

TOP

Related Classes of ome.xml.model.Channel

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.