Tabnine Logo
ChannelSelection.setGrayChannel
Code IndexAdd Tabnine to your IDE (free)

How to use
setGrayChannel
method
in
org.geotools.styling.ChannelSelection

Best Java code snippets using org.geotools.styling.ChannelSelection.setGrayChannel (Showing top 16 results out of 315)

origin: geotools/geotools

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    sel.setGrayChannel(chan);
  }
},
origin: geotools/geotools

protected ChannelSelection copy(ChannelSelection channelSelection) {
  if (channelSelection == null) return null;
  SelectedChannelType[] channels = copy(channelSelection.getSelectedChannels());
  ChannelSelection copy = sf.createChannelSelection(channels);
  copy.setGrayChannel(copy(channelSelection.getGrayChannel()));
  copy.setRGBChannels(copy(channelSelection.getRGBChannels()));
  return copy;
}
origin: geotools/geotools

  /**
   *
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated modifiable
   */
  public Object parse(ElementInstance instance, Node node, Object value) throws Exception {

    ChannelSelection cs = styleFactory.createChannelSelection(null);

    if (node.hasChild("GrayChannel")) {
      cs.setGrayChannel((SelectedChannelType) node.getChildValue("GrayChannel"));
    } else {
      SelectedChannelType[] rgb =
          new SelectedChannelType[] {
            (SelectedChannelType) node.getChildValue("RedChannel"),
            (SelectedChannelType) node.getChildValue("GreenChannel"),
            (SelectedChannelType) node.getChildValue("BlueChannel")
          };
      cs.setRGBChannels(rgb);
    }

    return cs;
  }
}
origin: org.geotools/gt-ysld

  @Override
  public void setTo(
      org.geotools.styling.ChannelSelection sel,
      org.geotools.styling.SelectedChannelType chan) {
    sel.setGrayChannel(chan);
  }
},
origin: geotools/geotools

  @Override
  public void handle(YamlObject<?> obj, YamlParseContext context) {
    YamlMap map = obj.map();
    if (map.has(Band.GRAY.key)) {
      if (map.has(Band.RED.key) || map.has(Band.GREEN.key) || map.has(Band.BLUE.key))
        throw new IllegalArgumentException("grey and RGB can not be combined");
      SelectedChannelType gray = factory.style.selectedChannelType((String) null, null);
      selection.setGrayChannel(gray);
      parse(Band.GRAY, gray, map, context);
    } else {
      if (!(map.has(Band.RED.key) && map.has(Band.GREEN.key) && map.has(Band.BLUE.key)))
        throw new IllegalArgumentException("all of red green and blue must be preset");
      SelectedChannelType red = factory.style.selectedChannelType((String) null, null);
      SelectedChannelType green = factory.style.selectedChannelType((String) null, null);
      SelectedChannelType blue = factory.style.selectedChannelType((String) null, null);
      selection.setRGBChannels(red, green, blue);
      parse(Band.RED, red, map, context);
      parse(Band.GREEN, green, map, context);
      parse(Band.BLUE, blue, map, context);
    }
  }
}
origin: org.geotools/gt-widgets-swing-pending

public void apply() {
  if (channel != null) {
    if(guiChkRGB.isSelected()){
      SelectedChannelType[] sct = new SelectedChannelType[3];
      sct[0] = guiRed.getEdited();
      sct[1] = guiGreen.getEdited();
      sct[2] = guiBlue.getEdited();
    }else{
      channel.setGrayChannel(guiGray.getEdited());
    }
  }
}
origin: geotools/geotools

chTypeGray.setChannelName("1");
chTypeGray.setContrastEnhancement(cntEnh);
chSel.setGrayChannel(chTypeGray);
rsb_1.setChannelSelection(chSel);
rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
origin: geotools/geotools

chTypeGray.setChannelName("1");
chTypeGray.setContrastEnhancement(cntEnh);
chSel.setGrayChannel(chTypeGray);
rsb_1.setChannelSelection(chSel);
origin: geotools/geotools

chSel.setGrayChannel(chTypeGray);
origin: geotools/geotools

chTypeGray.setContrastEnhancement(cntEnh);
chSel.setGrayChannel(chTypeGray);
origin: org.geotools/gt-main

protected ChannelSelection copy(ChannelSelection channelSelection) {
  if( channelSelection == null ) return null;
   SelectedChannelType[] channels = copy( channelSelection.getSelectedChannels() );
  ChannelSelection copy = sf.createChannelSelection( channels);
  copy.setGrayChannel( copy( channelSelection.getGrayChannel() ));
  copy.setRGBChannels( copy( channelSelection.getRGBChannels() ));
  return copy;
}

origin: geotools/geotools

chSel.setGrayChannel(chTypeGray);
rsb_1.setChannelSelection(chSel);
rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
chSel_2.setGrayChannel(chTypeGray_2);
rsb_2.setChannelSelection(chSel_2);
rsb_2.setOpacity(sldBuilder.literalExpression(1.0));
chSel_3.setGrayChannel(chTypeGray_3);
rsb_3.setChannelSelection(chSel_3);
rsb_3.setOpacity(sldBuilder.literalExpression(1.0));
chSel_4.setGrayChannel(chTypeGray_4);
rsb_4.setChannelSelection(chSel_4);
chSel_4f.setGrayChannel(chTypeGray_4f);
rsb_4f.setChannelSelection(chSel_4f);
chSel_5.setGrayChannel(chTypeGray_5);
rsb_5.setChannelSelection(chSel_5);
chSel_5f.setGrayChannel(chTypeGray_5f);
rsb_5f.setChannelSelection(chSel_5f);
chSel_5g.setGrayChannel(chTypeGray_5g);
rsb_5g.setChannelSelection(chSel_5g);
chSel_5c.setGrayChannel(chTypeGray_5c);
rsb_5c.setChannelSelection(chSel_5c);
origin: org.geotools.xsd/gt-xsd-sld

  /**
   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated modifiable
   */
  public Object parse(ElementInstance instance, Node node, Object value)
    throws Exception {
    
    ChannelSelection cs = styleFactory.createChannelSelection(null);
    
    if (node.hasChild("GrayChannel")) {
      cs.setGrayChannel((SelectedChannelType) node.getChildValue("GrayChannel"));
    }
    else {
      SelectedChannelType[] rgb = new SelectedChannelType[] {
        (SelectedChannelType) node.getChildValue("RedChannel"),
        (SelectedChannelType) node.getChildValue("GreenChannel"),
        (SelectedChannelType) node.getChildValue("BlueChannel")
      };
      cs.setRGBChannels(rgb);
    }
    
    return cs;
  }
}
origin: org.geotools.xsd/gt-sld

  /**
   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated modifiable
   */
  public Object parse(ElementInstance instance, Node node, Object value)
    throws Exception {
    if ((node.getChild("RedChannel") == null) || (node.getChild("BlueChannel") == null)
        || (node.getChild("GreenChannel") == null)
        || (node.getChild("GrayChannel") == null)) {
      String msg = "All of Red,Blue,Green,Gray must be specified";
      throw new RuntimeException(msg);
    }

    SelectedChannelType[] rgb = new SelectedChannelType[] {
        (SelectedChannelType) node.getChildValue("RedChannel"),
        (SelectedChannelType) node.getChildValue("GreenChannel"),
        (SelectedChannelType) node.getChildValue("BlueChannel")
      };
    SelectedChannelType gray = (SelectedChannelType) node.getChildValue("GrayChannel");

    ChannelSelection cs = styleFactory.createChannelSelection(null);
    cs.setGrayChannel(gray);
    cs.setRGBChannels(rgb);

    return cs;
  }
}
origin: geotools/geotools

final SelectedChannelType chTypeGray = new SelectedChannelTypeImpl();
chTypeGray.setChannelName("1");
chSel.setGrayChannel(chTypeGray);
rsb_1.setChannelSelection(chSel);
rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
origin: org.geotools/gt-ysld

  @Override
  public void handle(YamlObject<?> obj, YamlParseContext context) {
    YamlMap map = obj.map();
    if (map.has(Band.GRAY.key)) {
      if (map.has(Band.RED.key) || map.has(Band.GREEN.key) || map.has(Band.BLUE.key))
        throw new IllegalArgumentException("grey and RGB can not be combined");
      SelectedChannelType gray = factory.style.selectedChannelType((String) null, null);
      selection.setGrayChannel(gray);
      parse(Band.GRAY, gray, map, context);
    } else {
      if (!(map.has(Band.RED.key) && map.has(Band.GREEN.key) && map.has(Band.BLUE.key)))
        throw new IllegalArgumentException("all of red green and blue must be preset");
      SelectedChannelType red = factory.style.selectedChannelType((String) null, null);
      SelectedChannelType green = factory.style.selectedChannelType((String) null, null);
      SelectedChannelType blue = factory.style.selectedChannelType((String) null, null);
      selection.setRGBChannels(red, green, blue);
      parse(Band.RED, red, map, context);
      parse(Band.GREEN, green, map, context);
      parse(Band.BLUE, blue, map, context);
    }
  }
}
org.geotools.stylingChannelSelectionsetGrayChannel

Javadoc

Set the gray channel to be used

Popular methods of ChannelSelection

  • getRGBChannels
    get the RGB channels to be used
  • getGrayChannel
    Get the gray channel to be used
  • setRGBChannels
    set the RGB channels to be used
  • getSelectedChannels
    get the channels to be used
  • accept
  • setSelectedChannels
    set the channels to be used

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • putExtra (Intent)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JTable (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now