Package vash.operation

Examples of vash.operation.ColorNode


  private void runTest(String test, OperationNode a) {
    this.runTest(test, a, a.clone(), a.clone());
  }

  private void runTest(String test, OperationNode r, OperationNode g, OperationNode b) {
    ColorNode tree = new RGB_Space(r, g, b);
    byte[] actual = tree.compute(this.ip, true);
    int w = this.opt.getWidth();
    int h = this.opt.getHeight();
   
    // write the image to show what we got so we can compare on failures
    BufferedImage bactual = Output.dataToImage(actual, w, h);
View Full Code Here


 
  private ColorNode _buildToplevel() {
    // only allow one plane to have the singleton class
    if(this.params.getSeed().getAlgorithm().equals("1.1")) {
      // toplevel (color) node
      ColorNode rgb = (ColorNode)_selectAndCreateOp(0, new ChannelParameters());
     
      // channel parameters
      ChannelParameters[] chan = {
          new ChannelParameters(),
          new ChannelParameters(),
          new ChannelParameters()
      };
      _setupChannelExclusions(chan);
     
      // build each channel and attach to color node
      OperationNode r = _buildNode(1, chan[0]);
      OperationNode g = _buildNode(1, chan[1]);
      OperationNode b = _buildNode(1, chan[2]);
      rgb.setChild(0, r);
      rgb.setChild(1, g);
      rgb.setChild(2, b);

      return rgb;
    } else {
      return (ColorNode)_buildNode(0, new ChannelParameters());
    }
View Full Code Here

TOP

Related Classes of vash.operation.ColorNode

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.